403: BLOCKED_EGRESS error when accessing 'Get Log File for a Step' API in Forge App

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      When using the Get log file for a step API call in the forge app, it fails with 403 - BLOCKED_EGRESS error. Here is the sample code

      const response = await api.asApp().requestBitbucket(
                      route`/2.0/repositories/${CONSTANTS.WORKSPACE_ID}/${repoSlug}/pipelines/${pipelineUuid}/steps/${stepUuid}/log`
                  );
      

      Steps to Reproduce

      1. Create a Bitbucket Forge app
      2. Attempt to access the log file for a specific pipeline step using the Get log file for a step API  endpoint and asApp() method
      3. Deploy and install the app
      4. observe the response.

      Expected Results

      The API should return the log file for the specified pipeline step, allowing access to the pipeline variable values present in the logs.

      Actual Results

      The API returns a 403 - BLOCKED_EGRESS error, preventing access to the log file for the pipeline step.

      Workaround

      • Add the egress to *.s3.amazonaws.com in manifest file. Ex:
      external:
          fetch:
            backend:
              - '*.s3.amazonaws.com'
      
      

            Assignee:
            Unassigned
            Reporter:
            Deepak Pandey
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: