-
Notifications
You must be signed in to change notification settings - Fork 30
CEP XXXX: Package metadata files served by conda channels #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
cep-XXXX.md
Outdated
|
|
||
| ### `channeldata.json` | ||
|
|
||
| Deprecated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really deprecated? I couldn't find any other notes that says that. And it looks like conda-build and conda-index still fully support features that rely on (or build) channeldata.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK this is the first public attempt to deprecate it, but it has come up in meetings and other conversations. For example, repo.prefix.dev does not generate it and seems to be perfectly functional as a channel. I'd need to check with conda-build, but AFAICR, it was only needed for run_exports and that's why we added CEP 12 (among other reasons). conda-index may still generate it for backwards compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer we document first (or as I said above move the channeldata.json definition into a seperate CEP), and then deprecate in a separate step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No non-CDN anaconda.org channel generates channeldata. There are lots of reasons why it should go away, including that it can be nondeterministic which subdir's package is representative in channeldata.
| Each entry in `packages` and `packages.conda`: | ||
|
|
||
| - MUST follow the `index.json` schema (see [CEP PR#133](https://github.com/conda/ceps/pull/133)). | ||
| - SHOULD report the same values as the artifact's `info/index.json` metadata. Small modifications MAY be introduced to apply metadata fixes (e.g. correct the constraints of a requirement in the `depends` field) without needing to rebuild the artifact. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a rule, or recommendation for how consumers should resolve differences between the artifact's info/index.json and the repodata info for the package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This clause is introduced mostly to support repodata patching. repodata.json has precedence at install time. See https://github.com/jaimergp/ceps/blob/conda-meta-json/cep-XXXX.md ("Management of a conda environment").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small, medium or large modifications perhaps.
cep-XXXX.md
Outdated
|
|
||
| ## Abstract | ||
|
|
||
| This CEP standardizes the schema for the metadata files served in conda channels. Namely, `repodata.json` (and its variants) and `channeldata.json`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if specifying channeldata.json in a separate CEP might make it easier to deprecate it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Moved to #140.
|
|
||
| A conda channel MAY serve additional `repodata.json` documents in each subdir. Their name SHOULD match the glob `*repodata*.json`, and their contents MUST follow the `repodata.json` schema. Common variants include `current_repodata.json`. | ||
|
|
||
| Channels SHOULD serve compressed versions of every repodata file. The following compression schemes are recognized: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if that's a SHOULD tbh; I think it should be a MUST, since practically speaking, conda-index does produce both. I'd think, for the sake of running compatible channels, we should clearly dictate what the minimum operationally reasonable set of files is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if you are creating a local channel on your machine you don't need the compressed repodata for any practical reason. And, I think that should still be a valid channel.
Does it make sense to have like an implementation recommendation section? That can information like:
- It's practical to serve compressed versions of repodata
- The channeldata.json file is not required
etc.
we should clearly dictate what the minimum operationally reasonable set of files is.
+1!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, the compression is an optimization of distribution-sized channels, which I guess sharding solves differently. I guess the source of truth is just the repodata.json, and having a "deployment" or "best practices" section is a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rattler-index allows to not write the zstd file: https://github.com/conda/rattler/blob/55014fa15730502bfea1f185c0c2c539672b9d55/crates/rattler_index/src/lib.rs#L999
i think it should be optional (but recommended) as i can see use cases for personal small channels where it's not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and having a "deployment" or "best practices" section is a good idea.
I'd rather leave that to the aggregated conda.org documentation, because those best practices may change over time and there's no need to "vote" on them on CEP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One reason to allow missing repodata.json.zst is to support old, frozen channels. Backwards compatibility is necessary.
How long until we have sharded-repodata-only channels that provide no repodata.json?
cep-XXXX.md
Outdated
|
|
||
| ### `channeldata.json` | ||
|
|
||
| Deprecated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer we document first (or as I said above move the channeldata.json definition into a seperate CEP), and then deprecate in a separate step.
cep-XXXX.md
Outdated
| The `channeldata.json` file is considered deprecated because the listed metadata may be unreliable. It assumes that all the artifacts for a given package name will always have a homogeneous composition, but this is not necessarily true. Some examples: | ||
|
|
||
| - Some artifacts may contain activation scripts on some platforms, but not on others. | ||
| - Prefix replacement may only be needed from a certain point in the lifetime of the project (e.g. the maintainers add a compiled extension for performance). | ||
| - The website or license may change during the project lifetime. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid reasons, but out of scope of the CEP
Checklist for submitter
cep-0000.mdnamedcep-XXXX.mdin the root level.Checklist for CEP approvals
${greatest-number-in-main} + 1.cep-XXXX.mdfile has been renamed accordingly.# CEP XXXX -header has been edited accordingly.pre-commitchecks are passing.