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

A way to tell when ansiblerun updates get synced #334

Open
d-honeybadger opened this issue Apr 18, 2024 · 0 comments
Open

A way to tell when ansiblerun updates get synced #334

d-honeybadger opened this issue Apr 18, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@d-honeybadger
Copy link
Collaborator

What problem are you facing?

Currently, if I update an ansiblerun, the only way to tell whether the change was synced is by watching logs.
There's a synced condition, but if, say, the old run was successfully synced, and the new one was successfully synced too, the condition doesn't change.
One could enforce a change, for example, by deleting all ansiblerun conditions right after their update. But even then, when the Synced condition gets set, there's no way of knowing whether it's the result of the updated run or if there was simply an old long-running playbook, from before, the update, that only now finished running.

How could Crossplane help solve your problem?

It would be nice if update syncs were detectable. The minimal implementation would be to for provider-ansible to set a timestamp annotation on ansibleruns before it starts running the playbook/role (e.g. lastTriggeredAt). Then the end user can do the following:

  1. apply the update
  2. set ansiblerun status to null
  3. keep checking the ansiblerun for Synced status
  4. if it's Synced, then check the lastTriggeredAt: if it's after the update then we're done, if before then go to step 2

A nicer approach could involve setting Synced condition to false when a change is detected and before the run resulting from that change completes, so that the the end user doesn't need to clear ansiblerun status to track the update.

@d-honeybadger d-honeybadger added the enhancement New feature or request label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant