Optimize-virtual-repo-layer-filtering#1393
Merged
Conversation
8d37bc1 to
b7e3e6d
Compare
b7e3e6d to
96fe58b
Compare
96fe58b to
dc4668b
Compare
dc4668b to
093be7f
Compare
093be7f to
512633b
Compare
bhanurp
requested changes
Jun 10, 2025
Contributor
bhanurp
left a comment
There was a problem hiding this comment.
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()) |
Contributor
There was a problem hiding this comment.
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) |
Contributor
There was a problem hiding this comment.
is it tags which are available in default deployment repo or is it layers of docker image?
Contributor
Author
There was a problem hiding this comment.
It's about layers of the Docker image, not tags.
512633b to
9f3b145
Compare
9f3b145 to
05fa697
Compare
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.
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