ceps icon indicating copy to clipboard operation
ceps copied to clipboard

CEP XXXX: A backwards-compatible repodata update strategy for repodata `v3`

Open jaimergp opened this issue 10 months ago • 8 comments

Checklist for submitter

jaimergp avatar Jan 12 '26 21:01 jaimergp

@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!

jaimergp avatar Mar 18 '26 16:03 jaimergp

Looks like we have no further comments, nice 😎

jaimergp avatar Mar 28 '26 18:03 jaimergp

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").

wolfv avatar May 04 '26 08:05 wolfv

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.

jaimergp avatar May 05 '26 22:05 jaimergp

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

wolfv avatar May 11 '26 14:05 wolfv

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:

  1. Strengthen the spec: REQUIRE that any artifact referenced by an absolute url in 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.

  2. 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

adam-browning avatar May 21 '26 08:05 adam-browning

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.

danyeaw avatar May 22 '26 12:05 danyeaw

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.

jaimergp avatar May 27 '26 18:05 jaimergp