Skip to content

Fix web-ext sign falsely failing on AMO 502/503/504 timeouts during source upload (Fixes #3807) - #3808

Open
itsnjstyle27 wants to merge 3 commits into
mozilla:masterfrom
itsnjstyle27:Neerav
Open

Fix web-ext sign falsely failing on AMO 502/503/504 timeouts during source upload (Fixes #3807)#3808
itsnjstyle27 wants to merge 3 commits into
mozilla:masterfrom
itsnjstyle27:Neerav

Conversation

@itsnjstyle27

Copy link
Copy Markdown

This PR addresses an issue where web-ext sign fails and crashes CI pipelines by throwing a WebExtError: Uploading source failed when the AMO server returns a 502, 503, or 504 status code during the source code upload phase.

Because AMO's backend often continues to successfully process and attach these larger source code bundles in the background despite timing out the client's HTTP request, hard-failing in the CLI is misleading and unnecessarily breaks the build.

Changes Made
src/util/submit-addon.js: Updated doFormDataPatch to intercept 502, 503, and 504 status codes. Instead of throwing an error, it now logs a warning indicating the Gateway Timeout / Service Unavailable response from AMO and safely proceeds with the assumption that the source upload succeeded in the background. This ensures that the remainder of the signing workflow can continue uninterrupted.
scripts/lib/mocha.js (Internal / Test): Wrapped the constructed binPath in quotes when executing on Windows to fix a local testing bug where spaces in the user's root directory path caused mocha test executions to fail to spawn.
Testing
Verified all unit tests (npm run test) continue to pass successfully.
Confirmed that eslint style formatting is maintained.

Hope this helps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant