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

Fix downloading SNAPSHOT and LATEST artifacts #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yurinnick
Copy link

Fix artifact_file downloading file name for SNAPSHOT and LATEST Nexus artefacts.

@KAllan357
Copy link
Contributor

Could you give a bit more detail on what this is accomplishing?

@yurinnick
Copy link
Author

If you tried to download any SNAPSHOT or LATEST artefact from Nexus using artifact_file - you will get a checksum error, because downloaded filename won't match specified in resource. My fix - just rename it after download.

@@ -28,7 +28,7 @@ def remote
# @return [String] the version number that latest resolves to or the passed in value
def get_actual_version(coordinates)
artifact = NexusCli::Artifact.new(coordinates)
if Chef::Artifact.latest?(artifact.version) || Chef::Artifact.snapshot?(artifact.version)
if Chef::Artifact.latest?(artifact.version)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does the behavior of get_actual_version have to change here? This was put in so that SNAPSHOT versions resolve to their unique versions. I put this in so that I could report the actual artifact deployed for traceability purposes. Changing this behavior will definitely break my use case.

@dashirov
Copy link

I'm struggling with the same issue and was able to address "latest", but not "snapshot". There is definitely a design flaw that no one cares to address - it's been reported a year ago if not earlier.

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

Successfully merging this pull request may close these issues.

4 participants