Skip to content

fix: update skaffold verify to respect deploy default namespace field #8660

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

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

aaron-prindle
Copy link
Contributor

fixes #8629

@codecov
Copy link

codecov bot commented Apr 10, 2023

Codecov Report

Merging #8660 (6715103) into main (290280e) will decrease coverage by 6.39%.
The diff coverage is 54.47%.

@@            Coverage Diff             @@
##             main    #8660      +/-   ##
==========================================
- Coverage   70.48%   64.10%   -6.39%     
==========================================
  Files         515      619     +104     
  Lines       23150    30945    +7795     
==========================================
+ Hits        16317    19836    +3519     
- Misses       5776     9618    +3842     
- Partials     1057     1491     +434     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/completion.go 13.04% <0.00%> (-1.25%) ⬇️
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/credits/export.go 0.00% <0.00%> (ø)
cmd/skaffold/app/cmd/deploy.go 40.90% <0.00%> (-12.94%) ⬇️
cmd/skaffold/app/cmd/generate_pipeline.go 60.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_modules.go 65.00% <ø> (ø)
cmd/skaffold/app/cmd/inspect_profiles.go 66.66% <ø> (ø)
... and 39 more

... and 399 files with indirect coverage changes

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

Comment on lines 55 to 61
var defaultDeployNS *string
if runCtx.DefaultPipeline().Deploy.KptDeploy != nil {
defaultDeployNS = runCtx.DefaultPipeline().Deploy.KptDeploy.DefaultNamespace
}
if runCtx.DefaultPipeline().Deploy.KubectlDeploy != nil {
defaultDeployNS = runCtx.DefaultPipeline().Deploy.KubectlDeploy.DefaultNamespace
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking, does it make sense to use the runCtx.GetNamespace method here? I know we are not using the DefaultPipeline there, instead we are going through all the pipelines to calculate the namespace, but maybe is ok to have the same behaviour, what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, your suggestion is the better choice - changed now. I had forgotten we had refactored this to all be in one place 🎉!

@aaron-prindle aaron-prindle merged commit 46e51fe into GoogleContainerTools:main Apr 11, 2023
aaron-prindle added a commit that referenced this pull request May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

skaffold verify should use the defaultNamespace specified in deploy as it's own default namespace
2 participants