Skip to content

Show warnings when sync failed after External Service creation/update was successful

Administrator requested to merge core/ext-svc-sync-warning into master

Created by: mrnugget

This fixes #4052 by

  • changing the actual error message to make it easier to understand
  • treating every error after the successful creation/update of an external service as a warning
  • displaying the warnings in the UI in an alert-warning with an added explanation

Notes to reviewers:

  1. I haven't done any TypeScript/React programming at Sourcegraph, so let me know if I'm missing something
  2. I'm still not sure if this is the best message for the user, since it's not actionable and just a note that says that something they have no clue about didn't work as expected.

Should we maybe add "try updating the service" note to the warning?

@sqs: Maybe you have some suggestions here


When creating an external service succeeds but syncing the config to repo-updater fails with a warning, it looks like this:

add_external_service_warning (This is a GIF)

(Note: clicking on the ExternalServiceCard above the warning redirects the user to the edit-page for the just-created external service)


When updating an external service succeeds but syncing fails for the same reason:

update_external_service_warning (This is a GIF)


(Important: if this needs to be cherry-picked into a 3.4 release, it depends on https://github.com/sourcegraph/sourcegraph/commit/a348d5c995529bbfc9082c58cc9c815196377471 and https://github.com/sourcegraph/sourcegraph/commit/25226c3c1b539f82aada22de8aacc5dc2758d999)

Test plan: manual testing in the browser, creating & updating services and producing the error in the background

Merge request reports

Loading