Skip to content

fix(publish): keep the server path prefix in upload URLs - #6692

Open
hunger wants to merge 1 commit into
prefix-dev:mainfrom
hunger:push-lytspmzkxvtr
Open

fix(publish): keep the server path prefix in upload URLs#6692
hunger wants to merge 1 commit into
prefix-dev:mainfrom
hunger:push-lytspmzkxvtr

Conversation

@hunger

@hunger hunger commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

pixi publish --target-channel artifactory://host/artifactory/repo uploaded to https://host/repo/<subdir>/<pkg> and got a 404: the channel was taken from the last path segment and the rest of the path was then cleared with set_path(""). JFrog Artifactory serves repositories under an /artifactory prefix, so that prefix is part of the server URL, not something to discard.

Keep every segment before the channel as the server's base path, with a trailing slash so rattler_upload's Url::join appends rather than replaces, and share the split between the artifactory, quetz and prefix backends, which all had the same lossy logic. Credential lookup is unaffected: rattler_networking matches non-S3 URLs on the host alone.

The three 'missing channel name' errors now show the expected URL shape, and the docs and CLI help spell out that a path prefix belongs in the URL.

Fixes #6622

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.

Tools: Claude

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added sufficient tests to cover my changes.
  • I have verified that changes that would impact the JSON schema have been made in schema/model.py.

`pixi publish --target-channel artifactory://host/artifactory/repo` uploaded to
`https://host/repo/<subdir>/<pkg>` and got a 404: the channel was taken from the
last path segment and the rest of the path was then cleared with `set_path("")`.
JFrog Artifactory serves repositories under an `/artifactory` prefix, so that
prefix is part of the server URL, not something to discard.

Keep every segment before the channel as the server's base path, with a trailing
slash so rattler_upload's `Url::join` appends rather than replaces, and share the
split between the artifactory, quetz and prefix backends, which all had the same
lossy logic. Credential lookup is unaffected: rattler_networking matches non-S3
URLs on the host alone.

The three 'missing channel name' errors now show the expected URL shape, and the
docs and CLI help spell out that a path prefix belongs in the URL.

Fixes prefix-dev#6622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pixi publish on jfrog artifactory with a path prefix fails

1 participant