Skip to content
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

Conversation

sunshowers
Copy link
Contributor

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.

Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Copy link
Contributor

@plotnick plotnick left a 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}$"
Copy link
Contributor

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.

Copy link
Contributor Author

@sunshowers sunshowers Mar 20, 2025

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.

Copy link
Contributor Author

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.

Created using spr 1.3.6-beta.1
@sunshowers sunshowers enabled auto-merge (squash) March 20, 2025 21:10
@sunshowers sunshowers merged commit 118a2da into main Mar 20, 2025
18 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/use-tufaceous-artifactversion-for-artifact-versions branch March 20, 2025 22:20
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.

2 participants