CEP XXXX: A backwards-compatible repodata update strategy for repodata `v3`
Checklist for submitter
- [X] I am submitting a new CEP: A backwards-compatible repodata update strategy for repodata
v3.- [X] I am using the CEP template by creating a copy
cep-0000.mdnamedcep-XXXX.mdin the root level.
- [X] I am using the CEP template by creating a copy
- [ ] I am submitting modifications to CEP XX.
- [ ] Something else: (add your description here).
@conda/steering-council, I'd like to start the RFC period for this CEP. It will be open until March 30th, EOD, AoE. Thank you!
Looks like we have no further comments, nice 😎
There are two comments that would make this CEP better by @chenghlee and @dholth.
Using a dictionary for the repodata revisions would encode uniqueness into the revision scheme. This sounds straight forward and like a good change. We will loose the "order" but we can order by the following timestamps.
I propose to remove the metadata values that require "global" indexing state. Instead we should add one configurable timestamp:
accepted_since: Timestamp // default value hard coded in indexing tool, can be overwritten
I propose a second timestamp to indicate when a given revision was made the default (ie. all packages after this timestamp are published into the revision).
defaulted_at: Option<Timestamp>
However, when using the defaulted_at timestamp, previous revisions MUST also carry a defaulted_at timestamp, so that the index can be recreated deterministically from the information contained within (the time zones between two defaulted_at timestamps will create the "revision default window").
We will loose the "order" but we can order by the following timestamps.
I don't think the order is important. I defined vX as a sequence v[3..] so you can always sort them for pretty reporting.
The problem I see with accepted_since and defaulted_at is that it's unclear who makes that decision: the folks who publish packages? the maintainers of the channel infrastructure that govern the indexing tools and their configuration?
What's the intended usefulness of these fields?
I also changed the text so oldest / newest refer to the file itself, and not the global subdir state (for shards). The client can the aggregate across the consulted shards and report min(oldest), max(newest), which is again just informative for the error reporting and not some sort of universal truth needed for some important process.
I had some thoughts on the v3 metadata: instead of n_package, oldest / newest, how about we let the implementer define a "message" (free form string) to display to the user?
And how about we define two timestamps:
- one for the "first" v3 package on the channel (equivalent to oldest). This could also be a hard-coded timestamp from when the indexing tool started accepting v3 or when the v3 CEP was passed
- one for "hard cutover" time (this is important as that would be a configuration variable that others would have to know about if we want to ever allow publishing v2 packages into v3)
The other option to publish a v2 package to v3 would be to force v3 in the build tooling. In that case we should probably specify that the index tool SHOULD ALWAYS respect the version indicated by the package.
My motivation would be that we should be able to deterministically rebuild the repodata.
Then lastly maybe another question would be if we allow a repodata patch to move a package from v2 -> v3
Hi @jaimergp — thanks for the v3 rollout strategy.
I want to flag an interaction with CEP #151 that affects organizations consuming conda through an artifact proxy (Artifactory, Nexus, Cloudsmith, Anaconda Server, internal mirrors, air-gapped relays).
#146's backwards-compat guarantee protects older clients during a v3
rollout. It does not protect the proxy layer in between. Once a
client adopts v3, it starts honoring the absolute url field
(already required in packages.whl, and extended by #151). Those
fetches route directly to external CDNs and bypass every proxy
control — caching, vulnerability/license scanning, egress
allow-listing, audit, and tenant quotas. A compromised or typosquat
channel can weaponize this against any consumer behind a proxy they
trust for the channel host.
Two requests:
-
Strengthen the spec: REQUIRE that any artifact referenced by an absolute
urlin a v3 record also remain reachable at the v1/v2 flat path (base_url + fn) for the same record. This lets a proxy strip absolute URLs and keep both old and new clients working. -
Add a "Mirror / Proxy Compatibility" section that names the threat model and recommends the above. Today the CEP's compatibility story stops at the client and leaves the proxy ecosystem exposed.
Thanks in advance
Hi @adam-browning, I think any restrictions on usage of URL fields should be with that CEP and shouldn't be captured by this backwards compatibility update strategy one. This one just describes how we will revise repodata going forward.
As per the discussions in today's community meeting, the security implications of url inclusion in this CEP need further consideration and would delay the implementation of v3. Consensus in the call was to defer url to the next revision. Wheel-support implementers can still experiment with url fields before they are generalized to all repodata records.
Also, it was suggested to add a free form field to the revision metadata so channel operators can include custom messages per-revision. This is similar to the (unstandardized) notices.json mechanism, so that's worth discussing too.