-
Notifications
You must be signed in to change notification settings - Fork 138
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: add check_mode in localhost binary cache task #431
Conversation
Signed-off-by: Santiago Lo Coco <santilococo.01@gmail.com>
LGTM! Thanks @santilococo! |
Can we get this important bugfix reviewed, merged, and released ASAP? |
Same problem on our side. LGTM 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Test errors are due to github rate limits. Will retry them. |
@gardar do we really need to run all the role tests when updating |
Yeah since it's affecting all the roles I'm afraid it's the only way to catch potential errors. |
I think for |
Great, thanks! LGTM! |
Maybe in a follow-up PR, but could it make sense to mark all these download-related tasks as It also appears that Prometheus is always restarted (by running the restart handler). I think this is caused by this unnecessary "changed" tasks, but not 100% sure. I will monitor this bad behavior when a new release is out. |
No I don't think that's a good idea to fake the "changed" status like that, you should be able to see when the download is actually being executed.
No the download tasks don't notify the handlers, so there must be some other task that's returning the changed status. |
We have a proxy in-between, since GitHub is not directly available. Semi air-gapped environment. I think changes to the Ansible controller should be safe to ignore. But point taken, we can agree to disagree. 😉 A persistent disk is not a feasible alternative for us. Try getting that on GitLab Docker CI/CD runners!
Thanks! I will debug this when a new release is available. |
We are getting way off topic here, but both github/gitlab offer cache features which you could probably use for that. If you figure out how to do it then it might be useful to add it do the docs 😄 |
I'm jumping in because I wanted to suggest the exact same imo these downloads are anyway local prerequisites for the role to run correctly, they're not indicating any changed action on the remote host, that's the job of the |
Docs Build 📝Thank you for contribution!✨ This PR has been merged and the docs are now incorporated into |
Just a quick comment here to say that I opened #433 to move the |
This PR adds the
check_mode: false
in the localhost binary cache task.This is needed because the next task, which downloads the prometheus binary, expects the folder to already be created. Without
check_mode: false
, the task only runs in "simulation" mode and doesn't create the folder.This code was introduced in the most recent PR #425: https://github.com/prometheus-community/ansible/pull/425/files#diff-c9a8a7fbd7ee9c40d13e4be2e88801e621b943a2246b78ad46b93dc0f7c33971R38
You can see that this task did not exist before: https://github.com/prometheus-community/ansible/pull/425/files#diff-6f9278158452a81913bff59d794daa00e142796b04e75efd873c4a5dbb7f2899L38
Fixes #430