Skip to content

chore: add new config to control the pull behaviour for verify#9150

Merged
renzodavid9 merged 2 commits into
GoogleContainerTools:mainfrom
renzodavid9:verify-cache
Oct 27, 2023
Merged

chore: add new config to control the pull behaviour for verify#9150
renzodavid9 merged 2 commits into
GoogleContainerTools:mainfrom
renzodavid9:verify-cache

Conversation

@renzodavid9

@renzodavid9 renzodavid9 commented Oct 24, 2023

Copy link
Copy Markdown
Contributor

Fixes: #9148

Description
This PR adds a new config field for local verify test cases to force the use of a local image if one exists, if it doesn't exists it will trigger a pull.

How to test the change
With the following skaffold.yaml file:

apiVersion: skaffold/v4beta8
kind: Config
verify:
- name: with-local-img
  executionMode:
    local:
      useLocalImages: true
  container:
    name: gcloud
    image: gcr.io/cloud-builders/gcloud:latest
    command: ["/bin/bash"]
    args: ["-c", "gcloud version"]

Execute skaffold verify. You'll notice that the image is pull from the registry before running the container. Now if you run skaffold verify again, you'll see that Skaffold is not trying to pull the image again from the registry.

@codecov

codecov Bot commented Oct 24, 2023

Copy link
Copy Markdown

Codecov Report

Merging #9150 (016ff62) into main (290280e) will decrease coverage by 6.79%.
Report is 1050 commits behind head on main.
The diff coverage is 48.33%.

@@            Coverage Diff             @@
##             main    #9150      +/-   ##
==========================================
- Coverage   70.48%   63.69%   -6.79%     
==========================================
  Files         515      630     +115     
  Lines       23150    32429    +9279     
==========================================
+ Hits        16317    20656    +4339     
- Misses       5776    10186    +4410     
- Partials     1057     1587     +530     
Files Coverage Δ
cmd/skaffold/app/cmd/commands.go 97.61% <100.00%> (+0.35%) ⬆️
cmd/skaffold/app/cmd/config.go 100.00% <100.00%> (ø)
cmd/skaffold/app/cmd/config/list.go 65.21% <ø> (ø)
cmd/skaffold/app/cmd/config/set.go 88.72% <ø> (ø)
cmd/skaffold/app/cmd/config/util.go 54.28% <ø> (ø)
cmd/skaffold/app/cmd/credits.go 100.00% <ø> (ø)
cmd/skaffold/app/cmd/debug.go 100.00% <100.00%> (ø)
cmd/skaffold/app/cmd/flags.go 93.00% <100.00%> (+2.18%) ⬆️
cmd/skaffold/app/cmd/generate_pipeline.go 60.00% <ø> (ø)
cmd/skaffold/app/cmd/init.go 100.00% <100.00%> (ø)
... and 41 more

... and 434 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pull-request-size pull-request-size Bot added size/L and removed size/S labels Oct 25, 2023
@renzodavid9 renzodavid9 changed the title chore: add new config to control the pull behaviour for verify to che… Oct 25, 2023
@renzodavid9 renzodavid9 marked this pull request as ready for review October 25, 2023 14:19

@aaron-prindle aaron-prindle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@renzodavid9 renzodavid9 merged commit d47c33d into GoogleContainerTools:main Oct 27, 2023
@renzodavid9 renzodavid9 deleted the verify-cache branch October 27, 2023 15:08
@menahyouyeah menahyouyeah mentioned this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants