Skip to content

fix: resolve artifactory/prefix/quetz publish targets to https channels - #2907

Merged
wolfv merged 1 commit into
mainfrom
claude/serene-ride-1cyta4
Oct 28, 2026
Merged

wolfv merged 1 commit into
mainfrom
claude/serene-ride-1cyta4

Conversation

@wolfv

@wolfv wolfv commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Problem

A user reported that rattler-build publish recipe.yaml --to artifactory://files.example.com/conda-internal fails before the build starts:

Error:   × Failed to resolve dependencies
  ╰─▶ 'artifactory' is not a supported scheme

publish adds the --to target as the first channel for solving. resolve_channel_for_repodata rewrote only cloudsmith://, so the other upload-only schemes went to rattler's repodata gateway unchanged, and the gateway rightly rejects them. This also affected prefix:// and quetz://. s3://, file:// and http(s):// can already be read by the gateway.

A second bug was waiting behind the first: the Quetz and Artifactory uploads called Url::set_scheme("https"). That call always fails when switching from a non-special scheme, so these uploads would have failed even after the solve worked.

Changes

  • resolve_channel_for_repodata now rewrites:
    • artifactory://host/path/repo → https://host/path/repo
    • prefix://host/channel → https://host/channel
    • quetz://host/channel → https://host/get/channel
  • Adds rewrite_scheme_to_https, a string-based scheme rewrite matching the helper pixi already has. Quetz, Artifactory and Prefix uploads now use it.
  • Artifactory uploads keep any context path before the repository name (e.g. /artifactory/) in the base URL. Before, the whole path was stripped, so artifactory://host/artifactory/repo uploaded to https://host/repo/....
  • Adds unit tests for all of the above.

Notes

  • No change is needed in rattler: the gateway is right to reject schemes it can't fetch.
  • pixi's publish doesn't hit the solve error because it solves against the workspace channels. The same Artifactory context-path fix for pixi is in fix(publish): keep Artifactory context path when uploading pixi#7388. The helper could later move into rattler_upload so both tools share it.

User prompt

Can you check that we are handling artifactory scheme correctly in rattler-build? … Feel free to check if we have the same problem with other custom schemes for uploading

🤖 Generated with Claude Code

https://claude.ai/code/session_01K2qg4BnzsQk3K8bu4dBcMz

`rattler-build publish --to artifactory://...` prepends the target channel
to the solver channels, but only `cloudsmith://` was rewritten to a URL the
repodata gateway can read, so solving failed with
"'artifactory' is not a supported scheme". The same applied to `prefix://`
and `quetz://`.

Also replace `Url::set_scheme("https")` (which always fails when switching
from a non-special scheme) with a string-based rewrite, matching pixi, and
keep Artifactory context paths (e.g. /artifactory/) in the upload base URL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K2qg4BnzsQk3K8bu4dBcMz
@wolfv
wolfv merged commit df102b3 into main Oct 28, 2026
12 checks passed
@wolfv
wolfv deleted the claude/serene-ride-1cyta4 branch October 28, 2026 12:46
@wolfv wolfv mentioned this pull request Oct 30, 2026
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.

2 participants