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

Add debugHelpersRegistry property #3945

Conversation

sbueringer
Copy link
Contributor

Fixes: #2679

Description
Add debugHelpersRegistry property, see: #2679

User facing changes (remove if N/A)
New property debugHelpersRegistry in buildConfig

@codecov
Copy link

codecov bot commented Apr 12, 2020

Codecov Report

Merging #3945 into master will decrease coverage by 0.00%.
The diff coverage is 62.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3945      +/-   ##
==========================================
- Coverage   71.72%   71.72%   -0.01%     
==========================================
  Files         324      324              
  Lines       12507    12526      +19     
==========================================
+ Hits         8971     8984      +13     
- Misses       2966     2970       +4     
- Partials      570      572       +2     
Impacted Files Coverage Δ
pkg/skaffold/deploy/transformations.go 100.00% <ø> (ø)
pkg/skaffold/deploy/kubectl.go 67.10% <25.00%> (-0.68%) ⬇️
pkg/skaffold/debug/debug.go 45.16% <40.00%> (ø)
pkg/skaffold/deploy/kustomize.go 77.05% <40.00%> (-0.66%) ⬇️
pkg/skaffold/config/util.go 70.71% <57.14%> (-0.55%) ⬇️
pkg/skaffold/debug/transform.go 88.77% <100.00%> (ø)
pkg/skaffold/deploy/resource/deployment.go 74.48% <0.00%> (-0.77%) ⬇️
pkg/skaffold/debug/transform_nodejs.go 80.86% <0.00%> (-0.33%) ⬇️
pkg/skaffold/debug/transform_jvm.go 94.62% <0.00%> (-0.06%) ⬇️
pkg/skaffold/event/event.go 90.59% <0.00%> (+0.07%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4fbc068...21e1890. Read the comment docs.

@sbueringer sbueringer force-pushed the pr-add-debug-helpers-registry branch from 5e3fea9 to ae31f0d Compare April 12, 2020 07:16
@sbueringer
Copy link
Contributor Author

@briandealwis If I understand it correctly, I have to create a new version via hack/new_version.sh first. What should be the name of this new version?

I would assume v2beta2?

INFO[0000] Previous Skaffold version: v2alpha4          
INFO[0000] Current Skaffold version: v2beta1            

Copy link
Member

@briandealwis briandealwis left a comment

Choose a reason for hiding this comment

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

Thanks @sbueringer for your contribution! I've provided some initial feedback below, but I need some more time to mull over some of the changes you're proposing.

Would you mind motivating why do you find adding the debug helper registry location to the skaffold.yaml more important than specifying it in the global configuration in ~/.skaffold/config? Do you have a need to specify different alternative locations for different projects?

Adding the debugHelperRegistry to the KubectlDeployer and KustomizeDeployer seems out of place, but Skaffold's set up makes it difficult to get this information the debug transforms since we can't pass in the debug transform don't have access to the Skaffold Config object. My thought had been to avoid this issue entirely and instead just pull the information from the global config.

BuildArgs []string
kubectl deploy.CLI
insecureRegistries map[string]bool
debugHelpersRegistry string
Copy link
Member

Choose a reason for hiding this comment

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

Ditto to the KubectlDeployer's debugHelpersRegistry: this seems out of place, and indicates that we have some difficulty communicating information to the debug transforms.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as in kubectl.go

@sbueringer
Copy link
Contributor Author

sbueringer commented Apr 13, 2020

Thanks @sbueringer for your contribution! I've provided some initial feedback below, but I need some more time to mull over some of the changes you're proposing.

Would you mind motivating why do you find adding the debug helper registry location to the skaffold.yaml more important than specifying it in the global configuration in ~/.skaffold/config? Do you have a need to specify different alternative locations for different projects?

Oh that was a misunderstanding. Global config sounds good to me. I'll take a look later and rewrite it if possible.To be honest I haven't used skaffold a lot so I wasn't aware of the global configuration and just thought it's the skaffold.yaml.

@sbueringer
Copy link
Contributor Author

@briandealwis I moved the property to global config. Most of the other comments (all except the Kubectl/Kustomize struct) should be addressed.

@dgageot dgageot added the kokoro:run runs the kokoro jobs on a PR label Apr 14, 2020
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Apr 14, 2020
Copy link
Member

@briandealwis briandealwis left a comment

Choose a reason for hiding this comment

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

This is looking good @sbueringer — thanks! I'm not so thrilled that we're having to exposing debug stuff within the deployers (but that's not you) so I'll talk some more with the rest of the Skaffold team. I have some ideas how we can improve this.

@sbueringer
Copy link
Contributor Author

This is looking good @sbueringer — thanks! I'm not so thrilled that we're having to exposing debug stuff within the deployers (but that's not you) so I'll talk some more with the rest of the Skaffold team. I have some ideas how we can improve this.

Okay, no problem.

@sbueringer
Copy link
Contributor Author

@briandealwis any updates? 😃

@DanielSel
Copy link
Contributor

Hi @sbueringer,

what's your opinion on refactoring the GlobalConfig as well? Along the lines of:

kube-context: <...>
default-repo: my.corp/app/repo
insecureRegistries:
- my.corp
imageOverrides:
  debugHelpers: my.corp/debug-helpers
  kanikoImage: my.corp/kaniko/executor
  kanikoInitImage: my.corp/
survey: <...>
<...>

That way, as a corporation you could distribute the skaffold config via config management to developers and have all config for airgapped clusters in one spot. If I missed any image overrides, feel free to add them.

If you're willing to refacor, I would be up for splitting the work

@sbueringer
Copy link
Contributor Author

@DanielSel I think it makes sense to do this in a separate PR so this PR doesn't get to big :)

But I'm also not sure if/when this PR will get merged in it's current form. So I would wait for feedback from @briandealwis for now.

@briandealwis
Copy link
Member

Sorry, I've gotten stuck trying to pass information around too within Skaffold. Will get back to this soon.

@nkubala
Copy link
Contributor

nkubala commented May 18, 2020

@briandealwis any update here? @sbueringer looks like you'll need a quick rebase.

@sbueringer sbueringer force-pushed the pr-add-debug-helpers-registry branch from 16628ff to c04909c Compare May 19, 2020 04:12
@sbueringer sbueringer requested a review from tstromberg as a code owner May 21, 2020 10:19
@tejal29
Copy link
Contributor

tejal29 commented Jun 18, 2020

LGTM, verified all the reviews comments were addressed.

@tejal29 tejal29 added this to the v1.12.0 milestone Jun 18, 2020
@tejal29
Copy link
Contributor

tejal29 commented Jun 18, 2020

@sbueringer can you please fix the tests?

@briandealwis
Copy link
Member

Oh jeepers, I'm sorry @sbueringer for letting this dangle. Let's get it in and I'll address these concerns separately.

@sbueringer sbueringer requested a review from a team as a code owner June 19, 2020 04:25
@sbueringer
Copy link
Contributor Author

@briandealwis No problem. I'll fix the tests :)

@tejal29 tejal29 added the kokoro:run runs the kokoro jobs on a PR label Jun 19, 2020
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Jun 19, 2020
@briandealwis briandealwis merged commit b9d7015 into GoogleContainerTools:master Jun 22, 2020
@sbueringer sbueringer deleted the pr-add-debug-helpers-registry branch June 29, 2020 15:02
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.

8 participants