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 integration testing and example for skipBuildDependencies option #1368

Merged
merged 27 commits into from
Mar 26, 2019
Merged

Add integration testing and example for skipBuildDependencies option #1368

merged 27 commits into from
Mar 26, 2019

Conversation

pscarey
Copy link
Contributor

@pscarey pscarey commented Dec 6, 2018

Fixes #1346

Currently, it is not possible to deploy a helm chart with the following structure:

Chart.yaml
values.yaml
requirements.yaml # Declares local dependency charts, no repository field
templates/ # Chart templates
charts/
    subchart/
        Chart.yaml
        values.yaml
        templates/

The helm dep build call breaks on charts following this structure, despite the chart being valid for deployment with helm install and helm upgrade.

A key production example of this is the istio helm chart, found here.

This pull request fixes this issue with a skipDependencyBuild option for helm releases (which skips the helm dep build phase) and includes documentation, an example (based off the existing helm example) and adds a new test for the validity of the skipDependencyBuild option.

@codecov-io
Copy link

codecov-io commented Dec 6, 2018

Codecov Report

Merging #1368 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1368   +/-   ##
=======================================
  Coverage   47.91%   47.91%           
=======================================
  Files         144      144           
  Lines        6499     6499           
=======================================
  Hits         3114     3114           
  Misses       3101     3101           
  Partials      284      284
Impacted Files Coverage Δ
pkg/skaffold/deploy/helm.go 61.92% <ø> (ø) ⬆️

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 2e4c4a9...b2089a2. Read the comment docs.

@pscarey pscarey changed the title Add option to skip helm dependency build phase Add option to skip helm dependency build phase fixes #1346 Dec 7, 2018
@pscarey pscarey changed the title Add option to skip helm dependency build phase fixes #1346 Add option to skip helm dependency build phase Dec 7, 2018
@balopat balopat added the kokoro:run runs the kokoro jobs on a PR label Dec 7, 2018
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Dec 7, 2018
Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution, can you change the examples only under the integration folder? The examples in the root folder are for the latest released version for compatibility reasons.

…dependencies/skaffold.yaml

Co-Authored-By: pscarey <pscarey@users.noreply.github.com>
@balopat balopat added the kokoro:run runs the kokoro jobs on a PR label Dec 10, 2018
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Dec 10, 2018
@nkubala
Copy link
Contributor

nkubala commented Jan 7, 2019

once you rebase the docs LGTM

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

@balopat balopat added the kokoro:run runs the kokoro jobs on a PR label Jan 30, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Jan 30, 2019
@nkubala
Copy link
Contributor

nkubala commented Feb 1, 2019

sorry, looks like you need one more rebase 😨 send a ping once you do and we'll get this merged so you don't have to keep fighting with it. also, once you get #1371 ping us there as well so we can get that reviewed/merged ASAP

@pscarey pscarey requested a review from priyawadhwa as a code owner February 22, 2019 00:12
@@ -161,7 +161,7 @@ func (h *HelmDeployer) deployRelease(ctx context.Context, out io.Writer, r lates
// Dependency builds should be skipped when trying to install a chart
// with local dependencies in the chart folder, e.g. the istio helm chart.
// This decision is left to the user.
if !r.SkipBuildDependencies {
Copy link
Contributor

Choose a reason for hiding this comment

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

we should do renames only if it's really necessary - I feel like the benefit here is marginal - even though I understand where you're coming from. Do you mind reverting this?

@balopat
Copy link
Contributor

balopat commented Mar 8, 2019

In order to merge this in before next release (next week) we need:

  • rebase to latest
  • remove the v1beta4 changes
  • revert the rename

I'm happy to add this @pscarey if you are okay with that.

@pscarey
Copy link
Contributor Author

pscarey commented Mar 9, 2019

Thanks @balopat

I've updated the branch to the latest master and removed the v1beta4 change, and updated the schemas for tests to pass.

The rename was actually fixing a mistake when I reverted the name to my first draft. The original comment in this PR refers to the option as 'skipDependencyBuild'. In commit 2acb227 I accidentally rolled this back to my first draft of 'skipBuildDependencies', so I corrected it back to 'skipDependencyBuild' in 4e23a49.

Please let me know if there's anything else you require. Keen to start using this shortly at work, pending the other PR. Hopefully that can be simpler.

@eraac
Copy link
Contributor

eraac commented Mar 9, 2019

Please let me know if there's anything else you require. Keen to start using this shortly at work, pending the other PR. Hopefully that can be simpler.

You can already use an option for skip dependencies since #1254 was merged and release with 0.22 (https://github.com/GoogleContainerTools/skaffold/releases/tag/v0.22.0)

@pscarey
Copy link
Contributor Author

pscarey commented Mar 9, 2019

Ah, that's where the naming confusion has come from. This PR then only includes an integration example over that (+ currently, the re-name). Please let me know if you want the PR re-named + integration example to be merged, or alternatively just close the PR.

R.E. usage, we need #1371, which I can now update off the current master & can be looked at again.

@balopat
Copy link
Contributor

balopat commented Mar 14, 2019

There is value in the integration example - but please revert the rename - I think that the value there is outweighed by the noise it creates during upgrades.

@pscarey pscarey changed the title Add option to skip helm dependency build phase Add integration testing and example for skipBuildDependencies option Mar 20, 2019
@pscarey
Copy link
Contributor Author

pscarey commented Mar 20, 2019

Rename has been reverted. Related PR has been separated out from this to work against the current master.

Only other change made was that to pass tests, the integrations example had to also be added to the root examples folder, contrary to the previous request by @balopat

Thank you for the contribution, can you change the examples only under the integration folder? The examples in the root folder are for the latest released version for compatibility reasons.

@tejal29 tejal29 added the kokoro:run runs the kokoro jobs on a PR label Mar 20, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Mar 20, 2019
@nkubala nkubala merged commit 7b054a1 into GoogleContainerTools:master Mar 26, 2019
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.

Make helm dep build configurable
9 participants