-
Notifications
You must be signed in to change notification settings - Fork 196
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
RFC-0005: introduction of Digest and change of Revision format #1001
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
583a3ff
to
bdd0717
Compare
21 tasks
9a6d422
to
460ed45
Compare
souleb
reviewed
Feb 8, 2023
4e43e5e
to
8252ce1
Compare
e40c7f6
to
c90ca49
Compare
darkowlzz
reviewed
Feb 10, 2023
darkowlzz
reviewed
Feb 10, 2023
darkowlzz
reviewed
Feb 10, 2023
As discussed in RFC-0005, this introduces a `Digest` field to the `Artifact` in favor of the now deprecated `Checksum`. Signed-off-by: Hidde Beydals <hello@hidde.co>
30bb2f7
to
0d50ac3
Compare
stefanprodan
approved these changes
Feb 13, 2023
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.
LGTM
Thanks @hiddeco 🏅
darkowlzz
reviewed
Feb 13, 2023
darkowlzz
reviewed
Feb 13, 2023
Signed-off-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Hidde Beydals <hello@hidde.co>
This algorithm is used by Git commit SHAs, and opens up the digest API to work with these references. Signed-off-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Hidde Beydals <hello@hidde.co>
This ensures the revision is correctly parsed for `Bucket` and `GitRepository` sources from which a chart is built, either in the legacy or new RFC-0005 format. Signed-off-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Hidde Beydals <hello@hidde.co>
This allows consumers to better handle the transition to the new RFC-0005 format ("/" -> "@" separation). Signed-off-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Hidde Beydals <hello@hidde.co>
This includes changes to the `ChartRepository`, to allow calculating the revision and digest and tidy things. In addition, the responsibility of caching the `IndexFile` has been moved to the reconcilers. As this allowed to remove a lot of complexities within the `ChartRepository`, and prevented passing on the cache in general. Change `HelmRepository`'s Revision to digest Signed-off-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Hidde Beydals <hello@hidde.co>
Resolving it to a local path does not make it more unique, while resulting in longer keys and a lot of safejoin calls. Signed-off-by: Hidde Beydals <hello@hidde.co>
Signed-off-by: Hidde Beydals <hello@hidde.co>
0d50ac3
to
9283894
Compare
3 tasks
darkowlzz
approved these changes
Feb 14, 2023
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.
LGTM!
This was referenced Feb 14, 2023
hiddeco
added a commit
that referenced
this pull request
Feb 22, 2023
In #1001 bits around the Helm repository reconciliation logic were rewritten, mostly based on the documented behavior instead of the actual code. This resulted in the reintroduction of a YAML marshal of the (sorted) index YAML instead of reliance of just the checksum of the file. This to take situations into account in which a repository would e.g. provide a new random order on every generation. However, this approach is (extremely) expensive as the marshal goes through a JSON -> YAML loop, eating lots of RAM in the process. As the further (silently) introduced behavior has not resulted in any reported issues, I deem this approach safe and better than e.g. encoding to just JSON which would still require a substantial amount of memory. Signed-off-by: Hidde Beydals <hello@hidde.co>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces the changes described in RFC-0005, effectively deprecating the
Checksum
field of theArtifact
in favor of the newly introducedDigest
. While also changing the format of theRevision
field for values containing a named-pointer and/or checksum.Digest
field inArtifact
TransformLegacyRevision
to help (consumers) transitioning to the new revision formatDigest
forArtifact
when stored inStorage
Digest
fromArtifact
in event metadataRevision
format forGitRepository
Revision
format forBucket
Revision
format forOCIRepository
Revision
format forHelmRepository