-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make changes to handle the addon id existing from the previous submission #2490
Comments
@rpl and @willdurand for opinions. |
fwiw, I see this as the "correct" fix. |
Yeah, that is true for MV3 and the linter already supports it. As for updating the manifest... When we submit an add-on for the first time, without the ID in the manifest, IIRC AMO will inject it automagically. Can we detect that in Still assuming that's something we can detect, could we show the same message if the user attempts to re-run |
We know that an xpi was submitted without an ID being provided so we could throw up a message once we get the API response with an ID back. (We could read it directly from the manifest, once signed, but that'd be more work overall).
If there's an ID in |
Some connection with #2491 here - because we can't really assume that the |
MV3 manifests must have an extension ID. |
Yes, my assumption was that |
Ha, I see. Currently, it is only documented in the migration checklist: https://extensionworkshop.com/documentation/develop/manifest-v3-migration-guide/, I don't know about plans to automate this part. |
From the discussion above and offline, it seems like there is no immediate plan to add the id to the manifest automatically, and #2511 adds messaging that instructs the developer to add the ID to the manifest, so it doesn't seem there's anything else to do here right now. Closing. |
Background:
AMO's submission API has three endpoints for creating a version from an xpi
Upload
:/addons/addon/
to create a new add-on listing with the new version/addons/addon/<amo-id|addon-id|slug>/versions/
to create a new version under an existing add-on listing. There isn't support for this endpoint insubmit-addon.js
code currently./addons/addon/<addon-id>
/ to either create a new add-on listing with the new version if theaddon-id
doesn't exist already; or to update an existing add-on listing and create a new version under that listing if theaddon-id
does already exist. This endpoint also enforces that the addon-id is defined in the manifest (so there is only one possible place to define theaddon-id
).Current web-ext behaviour is to use endpoint 3. when an
addon-id
is defined in the manifest, provided via command-line arg, or exists in.web-extension-id
; and to use endpoint 1. otherwise. After a successful add-on submission (including approval and download of the xpi) theaddon-id
from the API response is used to write the.web-extension-id
file.However, this behaviour is now flawed with the submission api if the developer didn't define the
addon-id
in the manifest - after a new add-on is created and theaddon-id
written to.web-extension-id
, the next attempt to useweb-ext sign
will raise an error because there is anaddon-id
provided but it's not in the manifest file.There are two options to fix this, as I see them:
addon-id
to the manifest if not already there (in thebuild
function? ingetValidatedManifest
?) if it's either provided via command line arg or in.web-extension-id
. Requiring theaddon-id
in the manifest is a planned change anyway soweb-ext
will likely need to add support at some point regardless..web-extension-id
file instead. Anaddon-id
in the manifest would continue to use endpoint 3. Note this still won't cover the scenario when a developer only provides theaddon-id
via the command line.The text was updated successfully, but these errors were encountered: