-
Notifications
You must be signed in to change notification settings - Fork 204
Allow configuring trigger frequency when application is out_of_sync #2793
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
Conversation
|
Code coverage for golang is
|
| if time.Since(time.Unix(deployment.CompletedAt, 0)) < appCfg.Trigger.OnOutOfSync.MinWindow.Duration() { | ||
| return false, nil | ||
| } | ||
|
|
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.
tbh, it looks like this determiner will trigger a new deployment whenever
- no previous triggered deployment (newly added application).
- time since that latest triggered deployment overs a
minWindowof time.
Those two are good to me, but since this determiner is for the OUT_OF_SYNC state, I think we may need logic to trigger a new deployment on app.SyncState.Status is OUT_OF_SYNC. Please correct me if I'm wrong.
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.
it looks like this determiner will trigger a new deployment whenever
- no previous triggered deployment (newly added application).
- time since that latest triggered deployment overs a minWindow of time.
This is correct.
I think we may need logic to trigger a new deployment on app.SyncState.Status is OUT_OF_SYNC.
We don't need that logic because this determiner is accepting only OUT_OF_SYNC candidates.
https://github.com/pipe-cd/pipe/blob/c00e51ac61a93399ccc5e572468c1e23d28d9e8f/pkg/app/piped/trigger/trigger.go#L312
https://github.com/pipe-cd/pipe/blob/master/pkg/app/piped/trigger/trigger.go#L237
|
Code coverage for golang is
|
|
Looks neat |
|
@khanhtc1202 Can you take a look at this? |
|
Sorry for my miss, way to go 🚀 |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #2788
Does this PR introduce a user-facing change?: