Hello community, here is the log from the commit of package helm for openSUSE:Factory checked in at 2020-09-14 12:20:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/helm (Old) and /work/SRC/openSUSE:Factory/.helm.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "helm" Mon Sep 14 12:20:54 2020 rev:16 rq:833431 version:3.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/helm/helm.changes 2020-08-20 22:27:40.719949046 +0200 +++ /work/SRC/openSUSE:Factory/.helm.new.4249/helm.changes 2020-09-14 12:27:24.233063280 +0200 @@ -1,0 +2,17 @@ +Wed Sep 09 06:03:52 UTC 2020 - dmuel...@suse.com + +- Update to version 3.3.1: + * Fix spelling in completion.go + * Fixing linting of templates on Windows + * Bump Kubernetes to v0.18.8 + Bump jsonpatch + * Fix Quick Start Guide Link in README.md + * fix test that modifies the wrong cache data + * bufix: fix validateNumColons docs + * Fix typo + * Enhance readability by extracting bitwise operation + * Make helm ls return only current releases if providing state filter + * fix: Allow building in a path containing spaces + * Alter whitespace in "Update Complete" output + * Fixing version and spelling errors + +------------------------------------------------------------------- Old: ---- helm-3.3.0.tar.gz New: ---- helm-3.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ helm.spec ++++++ --- /var/tmp/diff_new_pack.5ug6xT/_old 2020-09-14 12:27:26.253064568 +0200 +++ /var/tmp/diff_new_pack.5ug6xT/_new 2020-09-14 12:27:26.261064573 +0200 @@ -18,7 +18,7 @@ %define git_commit ac925eb7279f4a6955df663a0128044a8a6b7593 Name: helm -Version: 3.3.0 +Version: 3.3.1 Release: 0 Summary: The Kubernetes Package Manager License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.5ug6xT/_old 2020-09-14 12:27:26.293064594 +0200 +++ /var/tmp/diff_new_pack.5ug6xT/_new 2020-09-14 12:27:26.297064596 +0200 @@ -5,7 +5,7 @@ <param name="exclude">.git</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> - <param name="revision">v3.3.0</param> + <param name="revision">v3.3.1</param> <param name="changesgenerate">enable</param> </service> <service name="recompress" mode="disabled"> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.5ug6xT/_old 2020-09-14 12:27:26.313064606 +0200 +++ /var/tmp/diff_new_pack.5ug6xT/_new 2020-09-14 12:27:26.313064606 +0200 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/kubernetes/helm.git</param> - <param name="changesrevision">8a4aeec08d67a7b84472007529e8097ec3742105</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">249e5215cde0c3fa72e27eb7a30e8d55c9696144</param></service></servicedata> \ No newline at end of file ++++++ helm-3.3.0.tar.gz -> helm-3.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-3.3.0/Makefile new/helm-3.3.1/Makefile --- old/helm-3.3.0/Makefile 2020-07-29 16:27:27.000000000 +0200 +++ new/helm-3.3.1/Makefile 2020-08-31 20:21:23.000000000 +0200 @@ -60,7 +60,7 @@ build: $(BINDIR)/$(BINNAME) $(BINDIR)/$(BINNAME): $(SRC) - GO111MODULE=on go build $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $(BINDIR)/$(BINNAME) ./cmd/helm + GO111MODULE=on go build $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o '$(BINDIR)'/$(BINNAME) ./cmd/helm # ------------------------------------------------------------------------------ # test @@ -97,7 +97,7 @@ test-acceptance: build build-cross @if [ -d "${ACCEPTANCE_DIR}" ]; then \ cd ${ACCEPTANCE_DIR} && \ - ROBOT_RUN_TESTS=$(ACCEPTANCE_RUN_TESTS) ROBOT_HELM_PATH=$(BINDIR) make acceptance; \ + ROBOT_RUN_TESTS=$(ACCEPTANCE_RUN_TESTS) ROBOT_HELM_PATH='$(BINDIR)' make acceptance; \ else \ echo "You must clone the acceptance_testing repo under $(ACCEPTANCE_DIR)"; \ echo "You can find the acceptance_testing repo at https://github.com/helm/acceptance-testing"; \ @@ -178,7 +178,7 @@ .PHONY: clean clean: - @rm -rf $(BINDIR) ./_dist + @rm -rf '$(BINDIR)' ./_dist .PHONY: release-notes release-notes: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-3.3.0/README.md new/helm-3.3.1/README.md --- old/helm-3.3.0/README.md 2020-07-29 16:27:27.000000000 +0200 +++ new/helm-3.3.1/README.md 2020-08-31 20:21:23.000000000 +0200 @@ -43,7 +43,7 @@ - [GoFish](https://gofi.sh/) users can use `gofish install helm`. - [Snapcraft](https://snapcraft.io/) users can use `snap install helm --classic` -To rapidly get Helm up and running, start with the [Quick Start Guide](https://docs.helm.sh/using_helm/#quickstart-guide). +To rapidly get Helm up and running, start with the [Quick Start Guide](https://helm.sh/docs/intro/quickstart/). See the [installation guide](https://helm.sh/docs/intro/install/) for more options, including installing pre-releases. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-3.3.0/cmd/helm/completion.go new/helm-3.3.1/cmd/helm/completion.go --- old/helm-3.3.0/cmd/helm/completion.go 2020-07-29 16:27:27.000000000 +0200 +++ new/helm-3.3.1/cmd/helm/completion.go 2020-08-31 20:21:23.000000000 +0200 @@ -148,7 +148,7 @@ fi for w in "${completions[@]}"; do if [[ "${w}" = "$1"* ]]; then - # Use printf instead of echo beause it is possible that + # Use printf instead of echo because it is possible that # the value to print is -n, which would be interpreted # as a flag to echo printf "%s\n" "${w}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-3.3.0/cmd/helm/repo_add_test.go new/helm-3.3.1/cmd/helm/repo_add_test.go --- old/helm-3.3.0/cmd/helm/repo_add_test.go 2020-07-29 16:27:27.000000000 +0200 +++ new/helm-3.3.1/cmd/helm/repo_add_test.go 2020-08-31 20:21:23.000000000 +0200 @@ -40,11 +40,12 @@ } defer srv.Stop() - repoFile := filepath.Join(ensure.TempDir(t), "repositories.yaml") + tmpdir := ensure.TempDir(t) + repoFile := filepath.Join(tmpdir, "repositories.yaml") tests := []cmdTestCase{{ name: "add a repository", - cmd: fmt.Sprintf("repo add test-name %s --repository-config %s", srv.URL(), repoFile), + cmd: fmt.Sprintf("repo add test-name %s --repository-config %s --repository-cache %s", srv.URL(), repoFile, tmpdir), golden: "output/repo-add.txt", }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-3.3.0/cmd/helm/repo_update.go new/helm-3.3.1/cmd/helm/repo_update.go --- old/helm-3.3.0/cmd/helm/repo_update.go 2020-07-29 16:27:27.000000000 +0200 +++ new/helm-3.3.1/cmd/helm/repo_update.go 2020-08-31 20:21:23.000000000 +0200 @@ -96,5 +96,5 @@ }(re) } wg.Wait() - fmt.Fprintln(out, "Update Complete. ⎈ Happy Helming!⎈ ") + fmt.Fprintln(out, "Update Complete. ⎈Happy Helming!⎈") } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-3.3.0/go.mod new/helm-3.3.1/go.mod --- old/helm-3.3.0/go.mod 2020-07-29 16:27:27.000000000 +0200 +++ new/helm-3.3.1/go.mod 2020-08-31 20:21:23.000000000 +0200 @@ -16,7 +16,7 @@ github.com/docker/distribution v2.7.1+incompatible github.com/docker/docker v1.4.2-0.20200203170920-46ec8731fbce github.com/docker/go-units v0.4.0 - github.com/evanphx/json-patch v4.5.0+incompatible + github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b github.com/gobwas/glob v0.2.3 github.com/gofrs/flock v0.7.1 github.com/gosuri/uitable v0.0.4 @@ -34,13 +34,13 @@ github.com/stretchr/testify v1.6.1 github.com/xeipuuv/gojsonschema v1.2.0 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 - k8s.io/api v0.18.4 - k8s.io/apiextensions-apiserver v0.18.4 - k8s.io/apimachinery v0.18.4 - k8s.io/cli-runtime v0.18.4 - k8s.io/client-go v0.18.4 + k8s.io/api v0.18.8 + k8s.io/apiextensions-apiserver v0.18.8 + k8s.io/apimachinery v0.18.8 + k8s.io/cli-runtime v0.18.8 + k8s.io/client-go v0.18.8 k8s.io/klog v1.0.0 - k8s.io/kubectl v0.18.4 + k8s.io/kubectl v0.18.8 sigs.k8s.io/yaml v1.2.0 ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-3.3.0/go.sum new/helm-3.3.1/go.sum --- old/helm-3.3.0/go.sum 2020-07-29 16:27:27.000000000 +0200 +++ new/helm-3.3.1/go.sum 2020-08-31 20:21:23.000000000 +0200 @@ -195,6 +195,8 @@ github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b h1:vCplRbYcTTeBVLjIU0KvipEeVBSxl6sakUBRmeLBTkw= +github.com/evanphx/json-patch v0.0.0-20200808040245-162e5629780b/go.mod h1:NAJj0yf/KaRKURN6nyi7A9IZydMivZEm9oQLWNjfKDc= github.com/evanphx/json-patch v4.2.0+incompatible h1:fUDGZCv/7iAN7u0puUVhvKCcsR6vRfwrJatElLBEf0I= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible h1:ouOWdg56aJriqS0huScTkVXPC5IcNrDCXZ6OoTAWu7M= @@ -395,6 +397,7 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -915,18 +918,32 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= k8s.io/api v0.18.4 h1:8x49nBRxuXGUlDlwlWd3RMY1SayZrzFfxea3UZSkFw4= k8s.io/api v0.18.4/go.mod h1:lOIQAKYgai1+vz9J7YcDZwC26Z0zQewYOGWdyIPUUQ4= +k8s.io/api v0.18.8 h1:aIKUzJPb96f3fKec2lxtY7acZC9gQNDLVhfSGpxBAC4= +k8s.io/api v0.18.8/go.mod h1:d/CXqwWv+Z2XEG1LgceeDmHQwpUJhROPx16SlxJgERY= k8s.io/apiextensions-apiserver v0.18.4 h1:Y3HGERmS8t9u12YNUFoOISqefaoGRuTc43AYCLzWmWE= k8s.io/apiextensions-apiserver v0.18.4/go.mod h1:NYeyeYq4SIpFlPxSAB6jHPIdvu3hL0pc36wuRChybio= +k8s.io/apiextensions-apiserver v0.18.8 h1:pkqYPKTHa0/3lYwH7201RpF9eFm0lmZDFBNzhN+k/sA= +k8s.io/apiextensions-apiserver v0.18.8/go.mod h1:7f4ySEkkvifIr4+BRrRWriKKIJjPyg9mb/p63dJKnlM= k8s.io/apimachinery v0.18.4 h1:ST2beySjhqwJoIFk6p7Hp5v5O0hYY6Gngq/gUYXTPIA= k8s.io/apimachinery v0.18.4/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= +k8s.io/apimachinery v0.18.8 h1:jimPrycCqgx2QPearX3to1JePz7wSbVLq+7PdBTTwQ0= +k8s.io/apimachinery v0.18.8/go.mod h1:6sQd+iHEqmOtALqOFjSWp2KZ9F0wlU/nWm0ZgsYWMig= k8s.io/apiserver v0.18.4/go.mod h1:q+zoFct5ABNnYkGIaGQ3bcbUNdmPyOCoEBcg51LChY8= +k8s.io/apiserver v0.18.8/go.mod h1:12u5FuGql8Cc497ORNj79rhPdiXQC4bf53X/skR/1YM= k8s.io/cli-runtime v0.18.4 h1:IUx7quIOb4gbQ4M+B1ksF/PTBovQuL5tXWzplX3t+FM= k8s.io/cli-runtime v0.18.4/go.mod h1:9/hS/Cuf7NVzWR5F/5tyS6xsnclxoPLVtwhnkJG1Y4g= +k8s.io/cli-runtime v0.18.8 h1:ycmbN3hs7CfkJIYxJAOB10iW7BVPmXGXkfEyiV9NJ+k= +k8s.io/cli-runtime v0.18.8/go.mod h1:7EzWiDbS9PFd0hamHHVoCY4GrokSTPSL32MA4rzIu0M= k8s.io/client-go v0.18.4 h1:un55V1Q/B3JO3A76eS0kUSywgGK/WR3BQ8fHQjNa6Zc= k8s.io/client-go v0.18.4/go.mod h1:f5sXwL4yAZRkAtzOxRWUhA/N8XzGCb+nPZI8PfobZ9g= +k8s.io/client-go v0.18.8 h1:SdbLpIxk5j5YbFr1b7fq8S7mDgDjYmUxSbszyoesoDM= +k8s.io/client-go v0.18.8/go.mod h1:HqFqMllQ5NnQJNwjro9k5zMyfhZlOwpuTLVrxjkYSxU= k8s.io/code-generator v0.18.4/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= +k8s.io/code-generator v0.18.8/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= k8s.io/component-base v0.18.4 h1:Kr53Fp1iCGNsl9Uv4VcRvLy7YyIqi9oaJOQ7SXtKI98= k8s.io/component-base v0.18.4/go.mod h1:7jr/Ef5PGmKwQhyAz/pjByxJbC58mhKAhiaDu0vXfPk= +k8s.io/component-base v0.18.8 h1:BW5CORobxb6q5mb+YvdwQlyXXS6NVH5fDXWbU7tf2L8= +k8s.io/component-base v0.18.8/go.mod h1:00frPRDas29rx58pPCxNkhUfPbwajlyyvu8ruNgSErU= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -937,8 +954,11 @@ k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kubectl v0.18.4 h1:l9DUYPTEMs1+qNtoqPpTyaJOosvj7l7tQqphCO1K52s= k8s.io/kubectl v0.18.4/go.mod h1:EzB+nfeUWk6fm6giXQ8P4Fayw3dsN+M7Wjy23mTRtB0= +k8s.io/kubectl v0.18.8 h1:qTkHCz21YmK0+S0oE6TtjtxmjeDP42gJcZJyRKsIenA= +k8s.io/kubectl v0.18.8/go.mod h1:PlEgIAjOMua4hDFTEkVf+W5M0asHUKfE4y7VDZkpLHM= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/metrics v0.18.4/go.mod h1:luze4fyI9JG4eLDZy0kFdYEebqNfi0QrG4xNEbPkHOs= +k8s.io/metrics v0.18.8/go.mod h1:j7JzZdiyhLP2BsJm/Fzjs+j5Lb1Y7TySjhPWqBPwRXA= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.7/go.mod h1:PHgbrJT7lCHcxMU+mDHEm+nx46H4zuuHZkDP6icnhu0= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-3.3.0/internal/experimental/registry/reference.go new/helm-3.3.1/internal/experimental/registry/reference.go --- old/helm-3.3.0/internal/experimental/registry/reference.go 2020-07-29 16:27:27.000000000 +0200 +++ new/helm-3.3.1/internal/experimental/registry/reference.go 2020-08-31 20:21:23.000000000 +0200 @@ -105,7 +105,7 @@ return err } -// validateNumColon ensures the ref only contains a single colon character (:) +// validateNumColons ensures the ref only contains a single colon character (:) // (or potentially two, there might be a port number specified i.e. :5000) func (ref *Reference) validateNumColons() error { if strings.Contains(ref.Tag, ":") { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-3.3.0/pkg/action/action.go new/helm-3.3.1/pkg/action/action.go --- old/helm-3.3.0/pkg/action/action.go 2020-07-29 16:27:27.000000000 +0200 +++ new/helm-3.3.1/pkg/action/action.go 2020-08-31 20:21:23.000000000 +0200 @@ -98,7 +98,7 @@ // // TODO: This function is badly in need of a refactor. // TODO: As part of the refactor the duplicate code in cmd/helm/template.go should be removed -// This code has to do with writing files to dick. +// This code has to do with writing files to disk. func (c *Configuration) renderResources(ch *chart.Chart, values chartutil.Values, releaseName, outputDir string, subNotes, useReleaseName, includeCrds bool, pr postrender.PostRenderer, dryRun bool) ([]*release.Hook, *bytes.Buffer, string, error) { hs := []*release.Hook{} b := bytes.NewBuffer(nil) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-3.3.0/pkg/action/list.go new/helm-3.3.1/pkg/action/list.go --- old/helm-3.3.0/pkg/action/list.go 2020-07-29 16:27:27.000000000 +0200 +++ new/helm-3.3.1/pkg/action/list.go 2020-08-31 20:21:23.000000000 +0200 @@ -152,12 +152,6 @@ } results, err := l.cfg.Releases.List(func(rel *release.Release) bool { - // Skip anything that the mask doesn't cover - currentStatus := l.StateMask.FromName(rel.Info.Status.String()) - if l.StateMask¤tStatus == 0 { - return false - } - // Skip anything that doesn't match the filter. if filter != nil && !filter.MatchString(rel.Name) { return false @@ -173,7 +167,16 @@ return results, nil } - results = filterList(results) + // by definition, superseded releases are never shown if + // only the latest releases are returned. so if requested statemask + // is _only_ ListSuperseded, skip the latest release filter + if l.StateMask != ListSuperseded { + results = filterLatestReleases(results) + } + + // State mask application must occur after filtering to + // latest releases, otherwise outdated entries can be returned + results = l.filterStateMask(results) // Unfortunately, we have to sort before truncating, which can incur substantial overhead l.sort(results) @@ -222,8 +225,8 @@ } } -// filterList returns a list scrubbed of old releases. -func filterList(releases []*release.Release) []*release.Release { +// filterLatestReleases returns a list scrubbed of old releases. +func filterLatestReleases(releases []*release.Release) []*release.Release { latestReleases := make(map[string]*release.Release) for _, rls := range releases { @@ -242,6 +245,21 @@ return list } +func (l *List) filterStateMask(releases []*release.Release) []*release.Release { + desiredStateReleases := make([]*release.Release, 0) + + for _, rls := range releases { + currentStatus := l.StateMask.FromName(rls.Info.Status.String()) + mask := l.StateMask & currentStatus + if mask == 0 { + continue + } + desiredStateReleases = append(desiredStateReleases, rls) + } + + return desiredStateReleases +} + // SetStateMask calculates the state mask based on parameters. func (l *List) SetStateMask() { if l.All { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-3.3.0/pkg/action/list_test.go new/helm-3.3.1/pkg/action/list_test.go --- old/helm-3.3.0/pkg/action/list_test.go 2020-07-29 16:27:27.000000000 +0200 +++ new/helm-3.3.1/pkg/action/list_test.go 2020-08-31 20:21:23.000000000 +0200 @@ -188,6 +188,56 @@ is.Len(res, 3) } +func TestList_StateMaskWithStaleRevisions(t *testing.T) { + is := assert.New(t) + lister := newListFixture(t) + lister.StateMask = ListFailed + + makeMeSomeReleasesWithStaleFailure(lister.cfg.Releases, t) + + res, err := lister.Run() + + is.NoError(err) + is.Len(res, 1) + + // "dirty" release should _not_ be present as most recent + // release is deployed despite failed release in past + is.Equal("failed", res[0].Name) +} + +func makeMeSomeReleasesWithStaleFailure(store *storage.Storage, t *testing.T) { + t.Helper() + one := namedReleaseStub("clean", release.StatusDeployed) + one.Namespace = "default" + one.Version = 1 + + two := namedReleaseStub("dirty", release.StatusDeployed) + two.Namespace = "default" + two.Version = 1 + + three := namedReleaseStub("dirty", release.StatusFailed) + three.Namespace = "default" + three.Version = 2 + + four := namedReleaseStub("dirty", release.StatusDeployed) + four.Namespace = "default" + four.Version = 3 + + five := namedReleaseStub("failed", release.StatusFailed) + five.Namespace = "default" + five.Version = 1 + + for _, rel := range []*release.Release{one, two, three, four, five} { + if err := store.Create(rel); err != nil { + t.Fatal(err) + } + } + + all, err := store.ListReleases() + assert.NoError(t, err) + assert.Len(t, all, 5, "sanity test: five items added") +} + func TestList_Filter(t *testing.T) { is := assert.New(t) lister := newListFixture(t) @@ -236,7 +286,7 @@ assert.Len(t, all, 3, "sanity test: three items added") } -func TestFilterList(t *testing.T) { +func TestFilterLatestReleases(t *testing.T) { t.Run("should filter old versions of the same release", func(t *testing.T) { r1 := releaseStub() r1.Name = "r" @@ -248,7 +298,7 @@ another.Name = "another" another.Version = 1 - filteredList := filterList([]*release.Release{r1, r2, another}) + filteredList := filterLatestReleases([]*release.Release{r1, r2, another}) expectedFilteredList := []*release.Release{r2, another} assert.ElementsMatch(t, expectedFilteredList, filteredList) @@ -264,7 +314,7 @@ r2.Namespace = "testing" r2.Version = 2 - filteredList := filterList([]*release.Release{r1, r2}) + filteredList := filterLatestReleases([]*release.Release{r1, r2}) expectedFilteredList := []*release.Release{r1, r2} assert.ElementsMatch(t, expectedFilteredList, filteredList) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-3.3.0/pkg/chartutil/capabilities_test.go new/helm-3.3.1/pkg/chartutil/capabilities_test.go --- old/helm-3.3.0/pkg/chartutil/capabilities_test.go 2020-07-29 16:27:27.000000000 +0200 +++ new/helm-3.3.1/pkg/chartutil/capabilities_test.go 2020-08-31 20:21:23.000000000 +0200 @@ -55,7 +55,7 @@ t.Errorf("Expected default KubeVersion.Major to be 1, got %q", kv.Major) } if kv.Minor != "18" { - t.Errorf("Expected default KubeVersion.Minor to be 16, got %q", kv.Minor) + t.Errorf("Expected default KubeVersion.Minor to be 18, got %q", kv.Minor) } } @@ -63,6 +63,6 @@ hv := DefaultCapabilities.HelmVersion if hv.Version != "v3.3" { - t.Errorf("Expected default HelmVerison to be v3.3, got %q", hv.Version) + t.Errorf("Expected default HelmVersion to be v3.3, got %q", hv.Version) } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/helm-3.3.0/pkg/lint/rules/template.go new/helm-3.3.1/pkg/lint/rules/template.go --- old/helm-3.3.0/pkg/lint/rules/template.go 2020-07-29 16:27:27.000000000 +0200 +++ new/helm-3.3.1/pkg/lint/rules/template.go 2020-08-31 20:21:23.000000000 +0200 @@ -19,6 +19,7 @@ import ( "fmt" "os" + "path" "path/filepath" "regexp" "strings" @@ -47,10 +48,10 @@ // Templates lints the templates in the Linter. func Templates(linter *support.Linter, values map[string]interface{}, namespace string, strict bool) { - path := "templates/" - templatesPath := filepath.Join(linter.ChartDir, path) + fpath := "templates/" + templatesPath := filepath.Join(linter.ChartDir, fpath) - templatesDirExist := linter.RunLinterRule(support.WarningSev, path, validateTemplatesDir(templatesPath)) + templatesDirExist := linter.RunLinterRule(support.WarningSev, fpath, validateTemplatesDir(templatesPath)) // Templates directory is optional for now if !templatesDirExist { @@ -60,7 +61,7 @@ // Load chart and parse templates chart, err := loader.Load(linter.ChartDir) - chartLoaded := linter.RunLinterRule(support.ErrorSev, path, err) + chartLoaded := linter.RunLinterRule(support.ErrorSev, fpath, err) if !chartLoaded { return @@ -77,14 +78,14 @@ } valuesToRender, err := chartutil.ToRenderValues(chart, cvals, options, nil) if err != nil { - linter.RunLinterRule(support.ErrorSev, path, err) + linter.RunLinterRule(support.ErrorSev, fpath, err) return } var e engine.Engine e.LintMode = true renderedContentMap, err := e.Render(chart, valuesToRender) - renderOk := linter.RunLinterRule(support.ErrorSev, path, err) + renderOk := linter.RunLinterRule(support.ErrorSev, fpath, err) if !renderOk { return @@ -99,13 +100,13 @@ */ for _, template := range chart.Templates { fileName, data := template.Name, template.Data - path = fileName + fpath = fileName - linter.RunLinterRule(support.ErrorSev, path, validateAllowedExtension(fileName)) + linter.RunLinterRule(support.ErrorSev, fpath, validateAllowedExtension(fileName)) // These are v3 specific checks to make sure and warn people if their // chart is not compatible with v3 - linter.RunLinterRule(support.WarningSev, path, validateNoCRDHooks(data)) - linter.RunLinterRule(support.ErrorSev, path, validateNoReleaseTime(data)) + linter.RunLinterRule(support.WarningSev, fpath, validateNoCRDHooks(data)) + linter.RunLinterRule(support.ErrorSev, fpath, validateNoReleaseTime(data)) // We only apply the following lint rules to yaml files if filepath.Ext(fileName) != ".yaml" || filepath.Ext(fileName) == ".yml" { @@ -114,12 +115,12 @@ // NOTE: disabled for now, Refs https://github.com/helm/helm/issues/1463 // Check that all the templates have a matching value - //linter.RunLinterRule(support.WarningSev, path, validateNoMissingValues(templatesPath, valuesToRender, preExecutedTemplate)) + //linter.RunLinterRule(support.WarningSev, fpath, validateNoMissingValues(templatesPath, valuesToRender, preExecutedTemplate)) // NOTE: disabled for now, Refs https://github.com/helm/helm/issues/1037 - // linter.RunLinterRule(support.WarningSev, path, validateQuotes(string(preExecutedTemplate))) + // linter.RunLinterRule(support.WarningSev, fpath, validateQuotes(string(preExecutedTemplate))) - renderedContent := renderedContentMap[filepath.Join(chart.Name(), fileName)] + renderedContent := renderedContentMap[path.Join(chart.Name(), fileName)] if strings.TrimSpace(renderedContent) != "" { var yamlStruct K8sYamlStruct // Even though K8sYamlStruct only defines a few fields, an error in any other @@ -128,10 +129,10 @@ // If YAML linting fails, we sill progress. So we don't capture the returned state // on this linter run. - linter.RunLinterRule(support.ErrorSev, path, validateYamlContent(err)) - linter.RunLinterRule(support.ErrorSev, path, validateMetadataName(&yamlStruct)) - linter.RunLinterRule(support.ErrorSev, path, validateNoDeprecations(&yamlStruct)) - linter.RunLinterRule(support.ErrorSev, path, validateMatchSelector(&yamlStruct, renderedContent)) + linter.RunLinterRule(support.ErrorSev, fpath, validateYamlContent(err)) + linter.RunLinterRule(support.ErrorSev, fpath, validateMetadataName(&yamlStruct)) + linter.RunLinterRule(support.ErrorSev, fpath, validateNoDeprecations(&yamlStruct)) + linter.RunLinterRule(support.ErrorSev, fpath, validateMatchSelector(&yamlStruct, renderedContent)) } } } ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/helm/vendor.tar.gz /work/SRC/openSUSE:Factory/.helm.new.4249/vendor.tar.gz differ: char 5, line 1