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.
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
fix concurrency issue in multi-config #5646
fix concurrency issue in multi-config #5646
Changes from 1 commit
189edbe
cff5987
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
What if we instead pushed this to the local builder itself, so that it determined the default concurrency at build time?
(And isn't this duplicating what is being done in the call to
withLocalBuild()
in defaults.go?)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.
this is a function in the test file that sets up the expected config
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.
thought about pushing this to
local.Builder
but it doesn't maintain the[]*latest.Artifact
slice and it seemed more convoluted to first set the default to 1 but later ignore it in the method.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.
Couldn't we just change this method in the local builder to return 1?
skaffold/pkg/skaffold/build/local/local.go
Lines 60 to 65 in 89b8315
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.
If we don't set it in
default.Set
then we'll need a reference to the[]*latest.Artifact
per config inlocal.Builder
to decide if it should return 0 or 1 by default (0 if len(artifacts) == 0, otherwise 1). That plumbing seems more convoluted that this fix.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.
Oh I didn't clue in that this definition was in a test — I thought it was the implementation of
withLocalBuilder
in pkg/skaffold/schema/defaults/ 🤦