[Data Subscription] Weird behavior when save/update subscriptions with errors

Description

PRDE - Bug default text according to the team DoR (Definition of Ready)

01 - PERSON OF CONTACT (PERSON THAT CAN ANSWER QUESTIONS ABOUT THE PROBLEM):

@Cindy de Araujo Soares Moore
02 - PROBLEM (WHAT'S THE ISSUE?):

When save/update subscriptions we can have errors creating/getting the topic from GCP, but when it happens I noticed 2 weird behaviors:

  1. The UI shows the error message in a separate popup, but the save/update screen loads forever.
  2. The backend set the subscription status to RUNNING, even if it was not possible to create the topic.

More details:https://totvslabs.slack.com/archives/GC2E28W6S/p1684335144188329

On 2023-10-04 we can still see cases: https://cloudlogging.app.goo.gl/XQSmoVb3QcUMJtx96

03 - STEPS TO REPRODUCE (STEP (1...N), VIDEO, SCREENSHOTS, LOGS FOLDER, HEARTBEAT, ETC. – IF IS NOT POSSIBLE TO REPRODUCE EXPLAIN THE REASON):

After

and , the subscriptions will be created in the tenant projects ({{carol-

{tenantId:-20}

}}). In the sandbox, if we try to create a subscription in a tenant without provision, we can simulate the error to create topics.

04 - LINKS (ADD A LINK TO THE BUG OR TO THE TENANT):
05 - EXPECTED BEHAVIOR (LIST THE EXPECTED BEHAVIORS TO CONSIDER THIS BUG AS DONE):

BE

  • If not able to create the subscription on GCP, the DM subscription will be not able to running.
  • Check why the trigger display this error.

FE

  • The subscription creation must not block the user when an error happens.