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

artifactory.downloaded state is not respecting test=True #50155

Closed
mikemartino opened this issue Oct 22, 2018 · 3 comments

Comments

@mikemartino
Copy link

commented Oct 22, 2018

Description of Issue/Question

I'm using the artifactory.downloaded state to download an artifact from a Nexus repository to one of my managed hosts. It works well with the exception that the state seems to ignore the test=True flag during a state.apply:

salt 'my-host' state.apply relevant.state.here saltenv=feature/my_branch_for_nexus_dep test=True

And the file gets downloaded to the host. I'm not sure how the test flag fits into the SaltStack architecture, but I read on another ticket that it's left to the state to decide what to do with it? I don't think it's something that I'm doing wrong, but I'd be willing to adjust my configuration accordingly if it is.

Note: The test=True is respected for the other states in the SLS file (file.managed, archive.extracted, etc).

Steps to Reproduce Issue

Noted in the description. Run an artifactory.downloaded state with test=True and the file is downloaded to the host (i.e. not tested, but applied).

Versions Report

Salt version is the same on master and minion (2017.7.2).

@mikemartino

This comment has been minimized.

Copy link
Author

commented Oct 22, 2018

After a few hours fighting with my configuration, I realize that the test flag is used in more places than I previously knew. For instance, it's used by prereq which has been the cause of much confusion for me this

I'm trying to download a more recent version of a JAR using the artifactory.downloaded. To avoid deploying multiple versions of the same library to a folder, I've been running with a prereq that runs a command to delete all of the similarly named JAR files. I can't quite word the order in which things are happening, but I do know that the JAR file is being downloaded during the prereq test step which is making state application super confusing haha.

@garethgreenaway

This comment has been minimized.

Copy link
Member

commented Jan 9, 2019

Closing this out, if the problem persists please comment & we'll re-open the issue or feel free to open a new issue.

@mikemartino

This comment has been minimized.

Copy link
Author

commented Jan 9, 2019

Awesome, thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.