generate csv: move manifest collector to its own package#3064
Merged
estroz merged 1 commit intooperator-framework:masterfrom May 19, 2020
Merged
generate csv: move manifest collector to its own package#3064estroz merged 1 commit intooperator-framework:masterfrom
estroz merged 1 commit intooperator-framework:masterfrom
Conversation
Member
Author
|
There are ways the |
export as Manifests, but not apply* methods which will stay in CSV package internal/generate/olm-catalog: use collector.Manifests
c5761c9 to
0724a9b
Compare
estroz
commented
May 18, 2020
|
|
||
| // ApplyTo applies relevant manifests in c to csv, sorts the applied updates, | ||
| // and validates the result. | ||
| func ApplyTo(c *collector.Manifests, csv *operatorsv1alpha1.ClusterServiceVersion) error { |
Member
Author
There was a problem hiding this comment.
Everything in this file was copied from here.
estroz
commented
May 18, 2020
| ) | ||
|
|
||
| // Manifests holds a collector of all manifests relevant to CSV updates. | ||
| type Manifests struct { |
Member
Author
There was a problem hiding this comment.
Everything in this package was copied from here.
hasbro17
approved these changes
May 18, 2020
| // hashContents creates a sha256 md5 digest of b's bytes. | ||
| func hashContents(b []byte) string { | ||
| h := sha256.New() | ||
| _, _ = h.Write(b) |
Contributor
There was a problem hiding this comment.
Nit: I realize this is just copying over but maybe we should log the error at the very least.
So perhaps a TODO for this.
Member
Author
There was a problem hiding this comment.
This will never return an error (looking at the implementation) but if std changes it may. I will follow up with an error check.
2 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of the change:
manifestCollectionhere and export asManifests, but not apply* methods which will stay in CSV packagecollector.ManifestsMotivation for the change: separates input to the CSV/bundle generator from generation itself. Required by #2860
/cc @hasbro17 @camilamacedo86