Skip to content

Conversation

@jaimergp
Copy link
Contributor

@jaimergp jaimergp commented Mar 11, 2025

Rendered CEP

Comes from #115 (comment).

Addresses the long needed standardization of package names and channel names.

I took @beckermr's regexes and added some more details and structure. Very open to feedback in how descriptive vs prescriptive we should get. So far, only trying to describe roughly what we have in conda. I'd like to know more about how this is handled in rattler. cc @baszalmstra @wolfv

Copy link
Contributor

@beckermr beckermr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A backwards compatibility section needs to be added with information pulled from the OCI CEP.

Copy link
Contributor

@beckermr beckermr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I'd leave allowed versions out of this CEP all together. That topic will require a significant amount of work that will block the rest of these items which are basically good to go.

@jaimergp
Copy link
Contributor Author

I wonder if we should introduce maximum lengths across all categories, so we don't end up with something stupid like a package name of 50K characters.

@beckermr
Copy link
Contributor

A maximum of 128 seems good to me.

Copy link
Contributor

@beckermr beckermr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a few more comments and clarifications. Thoughts @jaimergp ?

Co-authored-by: Matthew R. Becker <[email protected]>
@jaimergp jaimergp changed the title Identifying Packages and Channels in the conda Ecosystem [CEP XXXX] Identifying Packages and Channels in the conda Ecosystem Apr 3, 2025
Copy link
Contributor

@beckermr beckermr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaimergp how do these changes look given our discussion?

Co-authored-by: jaimergp <[email protected]>
@jaimergp
Copy link
Contributor Author

Love it, thanks @beckermr

@jaimergp
Copy link
Contributor Author

jaimergp commented Apr 22, 2025

Hello @conda/steering-council. Requesting a vote for this CEP.

This vote falls under the "Enhancement Proposal Approval" policy of the conda governance policy,
please vote and/or comment on this proposal at your earliest convenience.

It needs 60% of the Steering Council to vote yes to pass.

To vote, please use the following form to vote. If you have questions concerning the proposal, you may also leave a comment or code review.

This vote will end on 2025-05-06, End of Day, Anywhere on Earth (AoE).

@xhochy (Uwe Korn)

  • yes
  • no
  • abstain

@CJ-Wright (Christopher J. 'CJ' Wright)

  • yes
  • no
  • abstain

@mariusvniekerk (Marius van Niekerk)

  • yes
  • no
  • abstain

@chenghlee (Cheng H. Lee)

  • yes
  • no
  • abstain

@ocefpaf (Filipe Fernandes)

  • yes
  • no
  • abstain

@marcelotrevisani (Marcelo Duarte Trevisani)

  • yes
  • no
  • abstain

@msarahan (Michael Sarahan)

  • yes
  • no
  • abstain

@mbargull (Marcel Bargull)

  • yes
  • no
  • abstain

@jakirkham (John Kirkham)

  • yes
  • no
  • abstain

@jezdez (Jannis Leidel)

  • yes
  • no
  • abstain

@wolfv (Wolf Vollprecht)

  • yes
  • no
  • abstain

@jaimergp (Jaime Rodríguez-Guerra)

  • yes
  • no
  • abstain

@baszalmstra (Bas Zalmstra)

  • yes
  • no
  • abstain

@beckermr (Matthew R. Becker)

  • yes
  • no
  • abstain

@Hind-M (Hind Montassif)

  • yes
  • no
  • abstain

@trallard (Tania Allard)

  • yes
  • no
  • abstain

@jaimergp
Copy link
Contributor Author

@CJ-Wright, @mariusvniekerk, @ocefpaf, @marcelotrevisani, @msarahan, @mbargull, @jakirkham, @jezdez, @baszalmstra: your mid-period reminder to vote, thanks!

Copy link
Member

@mbargull mbargull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm very thankful that you continue to work on/write up how specification-like documents for all these previously only "implementation-defined" (and thus bound to be diverging) workings.

I vote to accept this proposal since it is a very good starting point to align implementations in package managers as well as distribution tools overall.

Unfortunately I wasn't able to take part in the discussion beforehand (but expect to be able to in the near future), so I apologize to not have given input before.
There are certain points (channel name/label definition, maximum length of package name/version/buildstring, etc.) that are either different from current definitions or possibly too restrictive.
E.g., maximum component lengths are worded with MUST NOT exceed even though we have existing cases that do exceed the given limits already -- hence it might make sense to have higher MUST NOT exceed limits and possibly have the current lower limits declared as SHOULD NOT exceed.
In my eyes in makes sense to declare this proposal as "provisional" since adjusting implementation to be "compliant to CEP XXXX" could be counter productive until those points have been worked on in later refinements to this proposal.

Comment on lines 49 to 52
Distributable package names MUST match the following case-insensitive regex:
`^(([a-z0-9])|([a-z0-9_](?!_)))[._-]?([a-z0-9]+(\.|-|_|$))*$`.

Virtual package names MUST follow this regex: `^__[a-z0-9][._-]?([a-z0-9]+(\.|-|_|$))*$`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize it's more of a "taste" thing, but the expressions might be easier to grasp without negative lookaheads, e.g.,

Suggested change
Distributable package names MUST match the following case-insensitive regex:
`^(([a-z0-9])|([a-z0-9_](?!_)))[._-]?([a-z0-9]+(\.|-|_|$))*$`.
Virtual package names MUST follow this regex: `^__[a-z0-9][._-]?([a-z0-9]+(\.|-|_|$))*$`.
Distributable package names MUST match the following case-insensitive regex:
`^[._-]?([a-z0-9][._-]?)+$`.
Virtual package names MUST follow this regex: `^__([a-z0-9][._-]?)+$`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to disallow consecutive separators in the string, like numpy--base or matplotlib.-extra.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe like this?

^([a-z0-9]+|(_[a-z0-9]+))[._-]?([a-z0-9]+(\.|-|_|$))*$

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've found these things are tricky and the negative lookahead was all that I could get to work when I was working on similar things.

Comment on lines 73 to 75
Artifact extensions MUST only consist of lowercase ASCII letters, numbers and periods. They must
start and end with a letter or a number. They MUST NOT include two consecutive periods. They MUST
match this regex `^[a-z0-9](\.?[a-z0-9])*$`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is also common include the separating period as part of the file extension.
In our case it'd be fine to exclude it since we always expect a non-empty suffix after the period.
Including it might avoid ambiguities, though, e.g., "conda supports .conda files since version 4.7".

start and end with a letter or a number. They MUST NOT include two consecutive periods. They MUST
match this regex `^[a-z0-9](\.?[a-z0-9])*$`.

The maximum length of a file extension MUST NOT exceed 16 characters.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The maximum length of a file extension MUST NOT exceed 16 characters.
The maximum length of an artifact extension MUST NOT exceed 16 characters.

for consistency.

Comment on lines 160 to 163
For convenience, the channel _name_ is defined as the concatenation of `scheme`, `authority` and
`path` components of a channel URL. At least one of `authority` or `path` SHOULD be present. In
their absence, the channel name MUST be considered empty, regardless the scheme. Empty channel
names SHOULD NOT be used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This deviates, e.g., from how conda's implementation uses (or at least used to use in the past) the term name.
E.g., for conda.models.channel.Channel a https://conda.anaconda.org/conda-forge/label/main would (using the default channel alias) yield conda-forge/label/main as the Channel.name.
One reason for this that conda itself has (had?) no concept of "label" at all but only distribution related tooling (e.g., conda.anaconda.org's server or tools like anaconda-client or conda-smithy) use that concept.

This is not to say it does not make sense to include the "label" concept at all -- it's certainly good to have this distribution-specific part specified since it's widely used, e.g., in conda-forge.
We should just be careful to align meanings of channel names, labels, etc. in specs and tooling (which this proposal is/can be used to get it going, of course).

Comment on lines 191 to 193
The label `nolabel` is reserved and MUST only be used for conda packages which have no other
labels. In other words, in the space of labels, the empty set is represented by the labels
`nolabel`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not aware of nolabel reservation -- is this an existing thing for conda.anaconda.org or is it something to do with the OCI work mentioned in the comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to OCI.

@jaimergp
Copy link
Contributor Author

jaimergp commented May 7, 2025

The vote is closed, and we have the following result:

  • Total possible voters: 16.
  • Valid votes: 12 / 16 = 75%.

Yes votes (12 / 100%):

  1. @xhochy
  2. @chenghlee
  3. @ocefpaf
  4. @marcelotrevisani
  5. @mbargull
  6. @jezdez
  7. @wolfv
  8. @jaimergp
  9. @baszalmstra
  10. @beckermr
  11. @Hind-M
  12. @trallard

No votes (0 / 0.00%).

Abstain votes (0 / 0.00%).

Not voted (4):

  1. @CJ-Wright
  2. @mariusvniekerk
  3. @msarahan
  4. @jakirkham

Invalid votes (0).

12/16 votes = 75% meets the minimum quorum.
12/12 YES votes meets the approval threshold (60%).

As per the governance, the @conda/steering-council has approved this CEP.

@jaimergp jaimergp changed the title [CEP XXXX] Identifying Packages and Channels in the conda Ecosystem [CEP 26] Identifying Packages and Channels in the conda Ecosystem May 7, 2025
@jaimergp jaimergp merged commit 030d7be into conda:main May 7, 2025
1 check passed
@jaimergp
Copy link
Contributor Author

jaimergp commented May 7, 2025

Thank you @mbargull (and welcome back!). I'll take a note of your feedback in a new issue so we can address this in a future revision.

@beckermr
Copy link
Contributor

beckermr commented May 7, 2025

I want to add in relation to @mbargull's comments that

  1. We cheeked conda-forge, bioconda, and defaults pretty extensively when writing these things down. There are a few things we purposefully decided to exclude because they were both rare and they made the spec more complicated.

  2. You seemed to indicate that you knew of things that violated the rules above. If they are not in the items we already know about (which are documented in the CEP) please post them here or in the new issue.

  3. Indeed some of the terms and usage do differ from conda's internals. Specifically for channel names, we've generalized to full URLs in anticipation of a less anaconda.org-centric ecosystem where packages are mirrored regularly. These changes are purposeful and should not be rolled back in a future CEP.

@beckermr
Copy link
Contributor

beckermr commented May 7, 2025

Also this CEP is not provisional in any sense. It has passed and documents conda standards until a future CEP changes them.

@jaimergp jaimergp mentioned this pull request Sep 26, 2025
11 tasks
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.

9 participants