-
-
Notifications
You must be signed in to change notification settings - Fork 814
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
[DRAFT] web: Extension source upload #9752
Conversation
7096620
to
9463b59
Compare
Hi, I work on AMO so I can provide some context.
Instead we built a new, completely separate and fully featured submission API in v5, made it available in So you can't just replace the version number of the old endpoint, that will not get you anything.
A possible option if you don't want to fully port submission to the new API yet is to keep using Edit: oh, and as of last week, the new submission API returns a Keep in mind though, approval is never guaranteed to be immediate, add-ons can be subject to human review at any time, so in some cases it can take a few days to be approved. |
0d871f4
to
d07a533
Compare
@diox The "keep using You are correct that the best approach would be to wait for I do have one question, though: because we're mixing v4 and v5 API calls, I have to grab the version ID from the v5 API (with |
For authenticated requests the
|
Oh wow! That's exactly what I needed. I'll hold off on merging until version number is ready to go though - it should let me get rid of some of the extra requests I'm currently doing in this PR. |
…ing tool. We're abusing their v4 API implementation to make v5 API requests, which might not work; hopefully the authentication scheme is the same. Furthermore, I'm assuming that the v4 sign response gives you a version ID that is valid for v5 `/addons/addon` requests.
…earch the Mozilla API for the given version instead.
…mber directly Mozilla actually added this feature in the middle of me building out this PR. How handy!
da9a174
to
bffa4ca
Compare
FYI mozilla/web-ext#2503 is now done. But I think the current setup is fine as is. It works at least. |
This PR attempts to add support for source upload on addons.mozilla.org, which is a necessary prerequisite to automating our extension submissions again.
The reason why this wasn't done before is that:
sign-addon
tool to upload the extension, and that uses API v4sign-addon
does not implement that API endpointsign-addon
for API v5 (in lieu of a major refactor)We hack around that by manually issuing the v5 requests using the same
Client
class thatsign-addon
provides. I'm still not 100% sure that this is correct, however; because the v5 API endpoint requires a version ID and I'm not sure the v4 (or v5) signing endpoint returns a compatible ID. In fact, the logs from the most recent extension upload seem to imply that we DON'T get a version ID as part of the initial request at all. Hence why this is a draft - I need to do more analysis.