centraldogma icon indicating copy to clipboard operation
centraldogma copied to clipboard

Provide a way to trigger Git mirroring manually

Open ikhoon opened this issue 1 year ago • 1 comments

Motivation:

  • There is no easy way to test Git mirroring configurations.
  • Some users may want to run Git mirroring manually instead of using the periodic scheduler.

Modifications:

  • Add POST /projects/{projectName}/mirrors/{mirrorId}/run REST API to MirroringServiceV1 so as to trigger a mirroring task.
  • Add verboseResponses to CentralDogmaConfig so as to contain full stack traces in error responses.
    • The cause of mirroring failures will be displayed in the UI for administrators or verboseResponses is enabled.
  • Change AbstractMirror to return MirrorResult which is used to notify the result in the UI.
  • Make MirrorDto.schedule nullable.
    • Exclude a mirror configuration from scheduling schedule it is null.
  • Move MirrorException to common and expose it in the error responses.
  • Add cronstrue dependency to package.json to display a human readable description on the mirror form UI.
  • Increase maxWidth of NotificationWrapper to render stack traces well.

Result:

  • You can now trigger a mirroring task in the mirror UI.
  • Fixes #700
  • Fixes #236

ikhoon avatar Sep 30 '24 15:09 ikhoon

https://github.com/user-attachments/assets/dcd738ce-39ab-4252-a19f-b35556c73170

ikhoon avatar Oct 08 '24 02:10 ikhoon

Is this ready?

minwoox avatar Oct 31 '24 00:10 minwoox

Sorry, I missed the test failure. Fixed it. PTAL.

ikhoon avatar Oct 31 '24 01:10 ikhoon