Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Raising error if arguments are provided to version and install commands #2809

Merged
merged 1 commit into from
Jan 31, 2020

Conversation

prometherion
Copy link
Contributor

Aims to conform to the same behavior with other commands: install and version ones are not expecting to receive arguments, so raising the error errorWantedNoArgs.
In addition, provided some little test coverage and added the required flags for the install command since --git-email was missing but marked as mandatory.

Pretty sure the change is breaking for users using the installation method via the CLI instead of the Helm Chart: they could have automation scripts that are pushing arguments and these could break.

Closes #2808

Aims to conform to the same behavior with other commands: `install` and
`version` ones are not expecting to receive arguments, so raising the
error `errorWantedNoArgs`.
In addition, provided some little test coverage and added the required
flags for the `install` command since `--git-email` was missing but
marked as mandatory.

Pretty sure the change is breaking for users using the installation
method via the CLI instead of the Helm Chart: they could have automation
scripts that are pushing arguments and these could break.

Closes fluxcd#2808
@2opremio
Copy link
Contributor

Thanks a lot!

@2opremio 2opremio merged commit ce7fc6b into fluxcd:master Jan 31, 2020
@2opremio
Copy link
Contributor

Ah, crap, I should had waited for CI. I would have sworn to have seen a green tick.

@prometherion
Copy link
Contributor Author

Nevermind, JFI sharing my test suite result:

ok      github.com/fluxcd/flux/cmd/fluxctl      0.274s
?       github.com/fluxcd/flux/cmd/fluxd        [no test files]
?       github.com/fluxcd/flux/integrations/apis/flux.weave.works       [no test files]
ok      github.com/fluxcd/flux/integrations/apis/flux.weave.works/v1beta1       0.011s
?       github.com/fluxcd/flux/integrations/apis/helm.integrations.flux.weave.works     [no test files]
ok      github.com/fluxcd/flux/integrations/apis/helm.integrations.flux.weave.works/v1alpha2    0.023s
?       github.com/fluxcd/flux/integrations/client/clientset/versioned  [no test files]
?       github.com/fluxcd/flux/integrations/client/clientset/versioned/fake     [no test files]
?       github.com/fluxcd/flux/integrations/client/clientset/versioned/scheme   [no test files]
?       github.com/fluxcd/flux/integrations/client/clientset/versioned/typed/flux.weave.works/v1beta1   [no test files]
?       github.com/fluxcd/flux/integrations/client/clientset/versioned/typed/flux.weave.works/v1beta1/fake      [no test files]
?       github.com/fluxcd/flux/integrations/client/clientset/versioned/typed/helm.integrations.flux.weave.works/v1alpha2        [no test files]
?       github.com/fluxcd/flux/integrations/client/clientset/versioned/typed/helm.integrations.flux.weave.works/v1alpha2/fake   [no test files]
?       github.com/fluxcd/flux/integrations/client/informers/externalversions   [no test files]
?       github.com/fluxcd/flux/integrations/client/informers/externalversions/flux.weave.works  [no test files]
?       github.com/fluxcd/flux/integrations/client/informers/externalversions/flux.weave.works/v1beta1  [no test files]
?       github.com/fluxcd/flux/integrations/client/informers/externalversions/helm.integrations.flux.weave.works        [no test files]
?       github.com/fluxcd/flux/integrations/client/informers/externalversions/helm.integrations.flux.weave.works/v1alpha2       [no test files]
?       github.com/fluxcd/flux/integrations/client/informers/externalversions/internalinterfaces        [no test files]
?       github.com/fluxcd/flux/integrations/client/listers/flux.weave.works/v1beta1     [no test files]
?       github.com/fluxcd/flux/integrations/client/listers/helm.integrations.flux.weave.works/v1alpha2  [no test files]
?       github.com/fluxcd/flux/internal/cmd/changelog   [no test files]
?       github.com/fluxcd/flux/pkg/api  [no test files]
?       github.com/fluxcd/flux/pkg/api/v10      [no test files]
?       github.com/fluxcd/flux/pkg/api/v11      [no test files]
ok      github.com/fluxcd/flux/pkg/api/v6       0.040s
ok      github.com/fluxcd/flux/pkg/api/v9       0.015s
?       github.com/fluxcd/flux/pkg/checkpoint   [no test files]
?       github.com/fluxcd/flux/pkg/cluster      [no test files]
ok      github.com/fluxcd/flux/pkg/cluster/kubernetes   33.059s
ok      github.com/fluxcd/flux/pkg/cluster/kubernetes/resource  0.417s
ok      github.com/fluxcd/flux/pkg/cluster/kubernetes/testfiles 0.018s
?       github.com/fluxcd/flux/pkg/cluster/mock [no test files]
ok      github.com/fluxcd/flux/pkg/daemon       73.451s
ok      github.com/fluxcd/flux/pkg/errors       0.038s
ok      github.com/fluxcd/flux/pkg/event        0.018s
ok      github.com/fluxcd/flux/pkg/git  1.148s
ok      github.com/fluxcd/flux/pkg/git/gittest  2.389s
?       github.com/fluxcd/flux/pkg/gpg  [no test files]
?       github.com/fluxcd/flux/pkg/gpg/gpgtest  [no test files]
?       github.com/fluxcd/flux/pkg/guid [no test files]
ok      github.com/fluxcd/flux/pkg/http 0.010s
?       github.com/fluxcd/flux/pkg/http/client  [no test files]
ok      github.com/fluxcd/flux/pkg/http/daemon  0.107s
?       github.com/fluxcd/flux/pkg/http/httperror       [no test files]
ok      github.com/fluxcd/flux/pkg/http/websocket       0.073s
ok      github.com/fluxcd/flux/pkg/image        0.027s
ok      github.com/fluxcd/flux/pkg/job  0.063s
ok      github.com/fluxcd/flux/pkg/manifests    12.363s
?       github.com/fluxcd/flux/pkg/metrics      [no test files]
ok      github.com/fluxcd/flux/pkg/policy       0.011s
ok      github.com/fluxcd/flux/pkg/registry     0.067s
ok      github.com/fluxcd/flux/pkg/registry/cache       0.288s
?       github.com/fluxcd/flux/pkg/registry/cache/memcached     [no test files]
?       github.com/fluxcd/flux/pkg/registry/middleware  [no test files]
?       github.com/fluxcd/flux/pkg/registry/mock        [no test files]
ok      github.com/fluxcd/flux/pkg/release      35.445s
ok      github.com/fluxcd/flux/pkg/remote       0.216s
ok      github.com/fluxcd/flux/pkg/remote/rpc   0.049s
ok      github.com/fluxcd/flux/pkg/resource     0.037s
?       github.com/fluxcd/flux/pkg/ssh  [no test files]
ok      github.com/fluxcd/flux/pkg/sync 1.152s
ok      github.com/fluxcd/flux/pkg/update       0.025s

@2opremio
Copy link
Contributor

Yeah, tests passed, I have too easy a trigger

@2opremio 2opremio added this to the 1.18.0 milestone Feb 1, 2020
@prometherion prometherion deleted the issues/2808 branch February 2, 2020 13:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No error is raised for install and version commands followed by arguments
2 participants