Skip to content
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 previous name checking in 'executor.build.fetchExtraStages' #1167

Merged
merged 1 commit into from
May 1, 2020
Merged

fix previous name checking in 'executor.build.fetchExtraStages' #1167

merged 1 commit into from
May 1, 2020

Conversation

antechrestos
Copy link
Contributor

Description

Fixes minor bug in fetchExtraStages function. The continueinstruction only breaks the inner for loop instead of the outer one. (see example of two for loop and a continue in inner one)

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes [unit tests]
  • Adds integration tests if needed.

See the contribution guide for more details.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

@googlebot googlebot added the cla: yes CLA signed by all commit authors label Mar 29, 2020
for _, name := range names {
if name == c.From {
continue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely not a golang expert here, but pretty sure you could use a continue statement with label instead of a boolean flag.

Copy link
Contributor Author

@antechrestos antechrestos Mar 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gilbsgilbs I am not a golang expert either, however I've been instructed not to ever use a label .. Out of machine language, I guess. A better solution would be to isolate this piece of code in a dedicated function I guess

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I isolated this code in a dedicated function. Great profile picture by the way 😄

@antechrestos
Copy link
Contributor Author

@tejal29 Guess I was right to wait as retrying the build with the current code works. This change is a minor one...Do I need to add some unit test?

@tejal29 tejal29 merged commit 8a51bd8 into GoogleContainerTools:master May 1, 2020
@tejal29
Copy link
Member

tejal29 commented May 1, 2020

@antechrestos this is very minor and small refactor. You don't need to add tests!

@antechrestos antechrestos deleted the fix/minor_bug branch May 1, 2020 17:36
@antechrestos
Copy link
Contributor Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes CLA signed by all commit authors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants