You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Use new context (not a child)
* Remove calls to a function that exits the process.
* Add more "context"(info, like for humans) to errors
* Address another err with no context issue
* Respond the webhook only based on payload parsing.
Actual Event processing is move to background thread.
This require some refactoring, created ReciveWebhook and ReciveEventFile
functions to represent the different behavior in Web Server VS CLI
triggering while keeping to the GH stuff in the GH package
* Cancel whole drift work on context deadline
* Move error function return value to the standard position
Handle cases where GetContents returns nil HTTP response (like in Context
cancellation)
// This function create a slice of objects to be "diff'ed", each element contains the key, live(in-cluster API state) and target(rended manifest from git) object.
66
68
// Copied from https://github.com/argoproj/argo-cd/blob/4f6a8dce80f0accef7ed3b5510e178a6b398b331/cmd/argocd/commands/app.go#L1341-L1372
// ReciveEventFile this one is similar to ReciveWebhook but it's used for CLI triggering, i simulates a webhook event to use the same code path as the webhook handler.
// ReciveWebhook is the main entry point for the webhook handling it starts parases the webhook payload and start a thread to handle the event success/failure are dependant on the payload parsing only
0 commit comments