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
So we're attempting to replicate projects across Harbor instances as part of an automated process. We can do so via the REST API, and we can get back some sort of progress via webhooks.
The problem we're having is that we'd like to be informed when the replication execution completes, either successfully or unsuccessfully. Unfortunately, the replication status changed webhook seems to call back on a per artifact basis, rather than when the replication execution status changes.
This makes our code for attempting to understand when a replication is complete, and hence when a project can be used, a little messy as we either have to:
Store state before the webhook is created around the number of artifacts expecting to be replicated and tick them off as the webhooks callback, or
Grab the execution ID after the replication has been started and pass it as part of the webhook URL, but of course, we have to be careful here in case the execution completes before the webhook is setup.
Are there any other ideas around that may be better to suit our needs?
Alternatively, I can think of a couple of code change options which may help others in this situation, but I'm not yet aware of impact and effort required.
Add a new webhook specifically for replication execution lifecycle events (started, stopped, failed, succeeded).
Add the execution ID to the replication status changed payload.
Add the overall replication progress to the status changed payload.
Thoughts?
Thanks!
The text was updated successfully, but these errors were encountered:
Hey,
So we're attempting to replicate projects across Harbor instances as part of an automated process. We can do so via the REST API, and we can get back some sort of progress via webhooks.
The problem we're having is that we'd like to be informed when the replication execution completes, either successfully or unsuccessfully. Unfortunately, the
replication status changed
webhook seems to call back on a per artifact basis, rather than when the replication execution status changes.This makes our code for attempting to understand when a replication is complete, and hence when a project can be used, a little messy as we either have to:
Are there any other ideas around that may be better to suit our needs?
Alternatively, I can think of a couple of code change options which may help others in this situation, but I'm not yet aware of impact and effort required.
Thoughts?
Thanks!
The text was updated successfully, but these errors were encountered: