-
Notifications
You must be signed in to change notification settings - Fork 10
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
[WIP] Add Update #109
base: main
Are you sure you want to change the base?
[WIP] Add Update #109
Conversation
collectionManifestAnnotations := map[string]string{} | ||
var descs []ocispec.Descriptor | ||
|
||
if config.Collection.SchemaAddress != "" { |
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 this section any different from the schema validation in the Build method?
func (d DefaultManager) Update(ctx context.Context, space workspace.Workspace, src string, dest string, add bool, remove bool, client registryclient.Client) (string, error) { | ||
|
||
// Pull the dataset config from the target collection | ||
_, manBytes, err := client.GetManifest(ctx, src) |
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.
I wonder if this type of action could benefit from a dry run or if it could just construct the workspace and pass it to the top-level Build method. Just so the user can validate the workspace before any references are overwritten.
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.
A few design comments/questions.
} | ||
|
||
if remove { | ||
pruneDescs, err := d.pullCollection(ctx, src, memory.New(), client) |
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.
Depending on what files are being deleted, this action could run the system out of memory since this is storing all of the files as byte slices.
No description provided.