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

Interpolation does not work with artifact checksums #4814

Closed
matthoey-okta opened this issue Oct 28, 2018 · 3 comments
Closed

Interpolation does not work with artifact checksums #4814

matthoey-okta opened this issue Oct 28, 2018 · 3 comments
Labels

Comments

@matthoey-okta
Copy link

If you have a question, prepend your issue with [question] or preferably use the nomad mailing list.

If filing a bug please include the following:

Nomad version

Output from nomad version
Nomad v0.8.4 (dbee1d7)

Operating system and Environment details

Amazon Linux 1 2018.03.1

Issue

I looked at the release notes and didn't see this so I don't think it's my version.

When trying to use a meta variable and interpolation for a checksum of an artifact it fails out with an error message:

* Artifact 1 validation failed: 1 error(s) occurred:

* invalid checksum: encoding/hex: invalid byte: U+0024 '$'
* Artifact 2 validation failed: 1 error(s) occurred:

* invalid checksum: encoding/hex: invalid byte: U+0024 '$')

I originally had md5:${NOMAD_META_ARTIFACT_MD5} but also tried putting the md5: in the variable to no success.

Reproduction steps

Attempt to use interpolation in the checksum of an artifact
Run nomad job plan on your job file.

Nomad Server logs (if appropriate)

Nomad Client logs (if appropriate)

Job file (if appropriate)

@dadgar
Copy link
Contributor

dadgar commented Oct 29, 2018

Good catch. Issue is that we are checking for the length pre-interpolation: https://github.com/hashicorp/nomad/blob/master/nomad/structs/structs.go#L6143-L6182

We will have to lower the level of validation we provide if there is an interpolation since on the server we may not have all possible values to interpolate with.

@matthoey-okta
Copy link
Author

Thanks!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants