Uploaded image for project: 'Magnolia Webhooks'
  1. Magnolia Webhooks
  2. MGNLHOOK-307

Random problem reading environments on module startup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • None
    • 2.0.0
    • None

      Symptom

      Webhook events are not triggered on environments different than main, even if the definitions appear on Definitions App.

      Cause

      Sometimes on SaaS webapp (staging), after instance is restarted, this code:

      environmentsClient
                          .getEnvironmentNames()
                          .forEach(environmentId -> EnvironmentContextPerThread.runInEnvironmentContext(environmentId, webhookDefinitionRegistry::onUpdate)); 

      on Webhooks module startup, is only executed for main environment, but all environments are shown on Environment Switcher and Definitions app shows properly all webhook definition files by environment.

      As other environments than main, are loaded asynchronously, when module starts up, definitions are not there and subscribers can not be created for webhooks. But later, those definitions are finally loaded, and appear properly on Definitions App (but subscribers still does not exist, because there were no events on webhooks telling that the definitions were loaded, so subscribers weren't created).

       

        Acceptance criteria

          1.
          Implement Sub-task Completed Milan Divilek  
          2.
          Review Sub-task Completed Javier Benito  
          3.
          piQA Sub-task Completed Javier Benito  
          4.
          QA Sub-task Completed Oanh Thai Hoang

          100%

          Original Estimate - Not Specified Original Estimate - Not Specified
          Time Spent - 3h

              mdivilek Milan Divilek
              jbenito Javier Benito
              DeveloperX
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 3h
                  3h