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

sops tasks fail when an update is available for the binary #72

Closed
disaac opened this issue Sep 27, 2018 · 2 comments
Closed

sops tasks fail when an update is available for the binary #72

disaac opened this issue Sep 27, 2018 · 2 comments
Assignees

Comments

@disaac
Copy link
Member

disaac commented Sep 27, 2018

Currently when executing the sops task the version is checked to ensure it adheres to the proper semantics. When an update is available for sops the binary will return the following output as an example:

/workspace # sops --version
sops 3.0.5
[info] sops 3.1.1 is available, update with `go get -u go.mozilla.org/sops/cmd/sops`

The above output results in an error when this occurs like this:

rake aborted!
ArgumentError: 3.0.53.1.1.. is not a valid SemVer Version (http://semver.org)
/opt/gems/ruby/2.4.0/gems/semantic-1.6.1/lib/semantic/version.rb:15:in `initialize'
/opt/gems/ruby/2.4.0/gems/covalence-0.8.1/lib/covalence/core/cli_wrappers/sops_cli.rb:61:in `new'
/opt/gems/ruby/2.4.0/gems/covalence-0.8.1/lib/covalence/core/cli_wrappers/sops_cli.rb:61:in `modify_files'
/opt/gems/ruby/2.4.0/gems/covalence-0.8.1/lib/covalence/core/cli_wrappers/sops_cli.rb:30:in `decrypt_path'
/opt/gems/ruby/2.4.0/gems/covalence-0.8.1/lib/covalence/sops_tasks.rb:14:in `block in run'
/opt/gems/ruby/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/usr/bin/bundle:23:in `load'
/usr/bin/bundle:23:in `<main>'
Tasks: TOP => sops:decrypt_path
(See full trace by running task with --trace)

To address this the handling of the SOPS_VERSION parsing needs to be adjusted.

@disaac disaac self-assigned this Sep 27, 2018
disaac added a commit that referenced this issue Sep 27, 2018
* resolves issue #72
* Added a split on newline to grab just the first line of output avoiding issues when a new release is available.
disaac added a commit that referenced this issue Sep 27, 2018
* resolves issue #72
* Added a split on newline to grab just the first line of output avoiding issues when a new release is available.
disaac added a commit that referenced this issue Sep 27, 2018
* Updating covalence version number to 0.8.3 for issue #72 fix.
disaac added a commit that referenced this issue Sep 27, 2018
disaac added a commit to unifio/dockerfile-ci that referenced this issue Sep 27, 2018
* Updating to covalence version 0.8.3 to address issues with [sops version output handling](unifio/covalence#72)
disaac added a commit to unifio/dockerfile-ci that referenced this issue Sep 27, 2018
* Updating to covalence version 0.8.3 to address issues with [sops version output handling](unifio/covalence#72)
* Updating terraform to latest 0.11.8
* Updating sops to latest version 3.1.1
* Updating UAT vpc module to properly handle instance_tenancy string.
disaac added a commit to unifio/dockerfile-ci that referenced this issue Sep 27, 2018
* Updating to covalence version 0.8.3 to address issues with [sops version output handling](unifio/covalence#72)
* Updating terraform to latest 0.11.8
* Updating sops to latest version 3.1.1
* Updating UAT vpc module to properly handle instance_tenancy string.
* Updating APK sgerrand public key URI previous one is no longer available.
disaac added a commit to unifio/dockerfile-covalence that referenced this issue Sep 27, 2018
* Updating to covalence version 0.8.3 to address issues with [sops version output handling](unifio/covalence#72)
@disaac
Copy link
Member Author

disaac commented Sep 27, 2018

Workaround

  • Provide the SOPS_VERSION number as an environment variable when using covalence.
  • Determine the version by running sops manually then set the environment variable

example

/workspace # sops --version
sops 3.0.5
[info] sops 3.1.1 is available, update with `go get -u go.mozilla.org/sops/cmd/sops`
SOPS_VERSION=3.0.5

This will prevent covalence from attempting to obtain this version from the command output avoiding the issue and preventing the error.

@disaac
Copy link
Member Author

disaac commented Sep 28, 2018

Issue addressed in v0.8.3

@disaac disaac closed this as completed Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant