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: Scope Issue with the 'entry' variable when looking up remote images #9206

Closed
wants to merge 5 commits into from

Conversation

3droj7
Copy link
Contributor

@3droj7 3droj7 commented Dec 5, 2023

Related: #9177
Description
The variable "entry" was not overridden before triggering the lookupRemote method.
The reason is because the entry variable was redeclared within an if block, resulting in a new, locally scoped variable. This redeclaration prevented the updates made to entry within this block from being reflected outside of it.

The bug was introduced in my last PR (9181)... I had no idea that in go, the "if" statement can define a whole new scope

If the skaffold is configured to use the cluster and not the local images, it will not pull the images locally.
If everything is cached it will move to deployment stage instead of unnecessarily downloading the images.
@3droj7 3droj7 closed this Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants