-
Notifications
You must be signed in to change notification settings - Fork 89
Optimize-virtual-repo-layer-filtering #1393
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
Optimize-virtual-repo-layer-filtering #1393
Conversation
8d37bc1 to
b7e3e6d
Compare
b7e3e6d to
96fe58b
Compare
96fe58b to
dc4668b
Compare
dc4668b to
093be7f
Compare
093be7f to
512633b
Compare
bhanurp
left a comment
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.
Remove all redundant comments and empty new lines in between code, for example the comment // Make the HTTP GET request is not required since it is obvious from code it is http get request
| log.Info("Making API call for virtual repository", originalRepo, "to get DefaultDeploymentRepo") | ||
| repoConfig, err := getRepositoryConfiguration(originalRepo, serviceManager) | ||
| if err != nil { | ||
| log.Debug("Failed to get repository configuration for virtual repository", originalRepo, ":", err.Error()) |
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.
the error returned should be enough why do we need debug you can add errorutils.CheckErrorf(err)
| var filteredLayers []utils.ResultItem | ||
| for _, layer := range imageLayers { | ||
| if layer.Repo == repoConfig.DefaultDeploymentRepo { | ||
| filteredLayers = append(filteredLayers, layer) |
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 it tags which are available in default deployment repo or is it layers of docker image?
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.
It's about layers of the Docker image, not tags.
512633b to
9f3b145
Compare
9f3b145 to
05fa697
Compare
Virtual Repository Layer Filtering Optimization
Description
This PR introduces an optimization for handling Docker image layers in virtual repositories. The enhancement focuses on filtering layers to only include those from the default deployment repository when setting build properties, improving performance and reducing unnecessary operations.
Changes
filterLayersForVirtualRepositoryto efficiently filter image layersTechnical Details
Impact