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

Receiving a "sync-success" dispatch even when no changes have been deployed #38

Closed
joshuadmatthews opened this issue Nov 11, 2022 · 1 comment

Comments

@joshuadmatthews
Copy link
Contributor

joshuadmatthews commented Nov 11, 2022

I am trying to use the sync-success dispatch event to trigger the next workflow and run integration tests.

The issue I am seeing is that on every reconciliation flux reports a commit_status event
DEBUG:root:GitOps phase: {'involvedObject': {'kind': 'Kustomization', 'namespace': 'flux-system', 'name': 'kustomization-mymanifests', 'uid': 'f3de8ac7-e027-411c-a2e1-ffdf73cb35a4', 'apiVersion': 'kustomize.toolkit.fluxcd.io/v1beta2', 'resourceVersion': '13397523'}, 'severity': 'info', 'timestamp': '2022-11-10T14:24:20Z', 'message': 'Reconciliation finished in 843.869422ms, next run in 1m0s', 'reason': 'ReconciliationSucceeded', 'metadata': {'commit_status': 'update', 'revision': 'lab-talent-aks/efbe4dd15f723a82e90a122a508f092e7320d6af'}, 'reportingController': 'kustomize-controller', 'reportingInstance': 'kustomize-controller-6fc6744c6b-6dj68'}

And because of the logic in _notify_orchestrator and is_finished I end up getting the sync-success dispatched repeatedly.

I thought maybe this was an issue with flux, but the maintainer over there told me this is expected behavior and to disable handling of events that contain metadata commit_status

fluxcd/flux2#3308

Flux does offer an ExclusionList on the Alert object, but I'm not sure how to configure it to exclude just these extra events

@joshuadmatthews
Copy link
Contributor Author

After getting more familiar with the code here, I am not sure what is going on in my situation. It looks like the event shouldn't be dispatched once the commit is marked as successful, but I was certainly seeing it in a loop of some sort. Will keep an eye on this. Currently there is another issue causing the dispatch to not go out because my commits are being set to failure when "DependencyNotReady"notification gets sent by flux. I have submitted a fix for this in a pr.

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

No branches or pull requests

1 participant