-
Notifications
You must be signed in to change notification settings - Fork 42
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
use tufaceous ArtifactVersion for artifact versions #7832
use tufaceous ArtifactVersion for artifact versions #7832
Conversation
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.
Thanks for updating this, it had a bigger footprint than I would have guessed.
This work affects both #7807 and my WIP planner changes, so I'd prefer that it land sooner rather than later.
"ArtifactVersion": { | ||
"description": "An artifact version.\n\nThis is a freeform identifier with some basic validation. It may be the serialized form of a semver version, or a custom identifier that uses the same character set as a semver, plus `_`.\n\nThe exact pattern accepted is `^[a-zA-Z0-9._+-]{1,63}$`.\n\n# Ord implementation\n\n`ArtifactVersion`s are not intended to be sorted, just compared for equality. `ArtifactVersion` implements `Ord` only for storage within sorted collections.", | ||
"type": "string", | ||
"pattern": "^[a-zA-Z0-9._+-]{1,63}$" |
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 the upper bound of 63 characters intended to prevent a hex-encoded 256-bit hash from being used, and if not, could we please increase it to 64? It seems to me that if we're going to allow freeform versions, we should accept arbitrary hashes of commonly used lengths, too.
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 the upper bound of 63 characters intended to prevent a hex-encoded 256-bit hash from being used, and if not, could we please increase it to 64? It seems to me that if we're going to allow freeform versions, we should accept arbitrary hashes of commonly used lengths, too.
Ah so the upper bound comes from database storage -- we decided in today's update watercooler to bump the limit to 64. I'll land this for now, and then bump the limit in a future PR.
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.
Database schema updated in #7849.
Per RFD 557, we're making artifact versions a freeform identifier (unlike system versions, which are still semver). Make this change.
New TUF repo creation via
tufaceous assemble
still requires semver for artifact versions, to ensure compatibility with wicketd in v13. But there's an override for that available in tufaceous.