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

Use runCtx instead of of config.Opts for suggesting suggestions. #5490

Merged
merged 3 commits into from
Mar 8, 2021

Conversation

tejal29
Copy link
Contributor

@tejal29 tejal29 commented Mar 4, 2021

Relates to #5485

This is a refactor, to break change in smaller PR for #5485.
When adding deploy error codes #4933, i missed the part where kubectx gets called directly. We have that information in runCtx. It easier to use the evaluated context there instead of re-writing logic to look up kubeContext

Pros

  1. Remove dependency on pkg/skaffold/config and pkg/skaffold/kubernetes/context from errors.
  2. In upcoming PR, we need the logic to determine minikube vs remote cluster for "Internal System Error". Using runCtx is much easier than again evaluating kubecontext in deploy/errors package.

@tejal29 tejal29 requested a review from a team as a code owner March 4, 2021 18:50
@google-cla google-cla bot added the cla: yes label Mar 4, 2021
@codecov
Copy link

codecov bot commented Mar 4, 2021

Codecov Report

Merging #5490 (9f5c643) into master (31cf2f1) will increase coverage by 0.00%.
The diff coverage is 95.65%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5490   +/-   ##
=======================================
  Coverage   71.46%   71.46%           
=======================================
  Files         397      398    +1     
  Lines       14577    14641   +64     
=======================================
+ Hits        10417    10463   +46     
- Misses       3389     3402   +13     
- Partials      771      776    +5     
Impacted Files Coverage Δ
pkg/skaffold/errors/err_map.go 95.91% <85.71%> (+5.35%) ⬆️
cmd/skaffold/app/cmd/runner.go 60.00% <100.00%> (ø)
pkg/skaffold/errors/build_problems.go 100.00% <100.00%> (ø)
pkg/skaffold/errors/deploy_problems.go 100.00% <100.00%> (+28.57%) ⬆️
pkg/skaffold/errors/errors.go 87.23% <100.00%> (ø)
pkg/skaffold/errors/init_problems.go 100.00% <100.00%> (ø)
pkg/skaffold/test/test_factory.go 72.09% <0.00%> (-6.86%) ⬇️
pkg/skaffold/docker/parse.go 82.16% <0.00%> (-1.09%) ⬇️
pkg/skaffold/runner/runner.go 0.00% <0.00%> (ø)
pkg/skaffold/schema/latest/config.go 58.82% <0.00%> (ø)
... and 4 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 31cf2f1...9f5c643. Read the comment docs.

Copy link
Contributor

@MarlonGamez MarlonGamez left a comment

Choose a reason for hiding this comment

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

refactor looks good, have a small question

Copy link
Contributor

@MarlonGamez MarlonGamez left a comment

Choose a reason for hiding this comment

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

Looks good to me :)

@MarlonGamez MarlonGamez merged commit 193c06c into GoogleContainerTools:master Mar 8, 2021
@tejal29 tejal29 deleted the fix_helm_1 branch July 21, 2021 17:38
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.

2 participants