Skip to content

[Draft] Python 3.6 Upgrade / AMO Rebase#305

Draft
MelissaAutumn wants to merge 1705 commits intomasterfrom
master-2019
Draft

[Draft] Python 3.6 Upgrade / AMO Rebase#305
MelissaAutumn wants to merge 1705 commits intomasterfrom
master-2019

Conversation

@MelissaAutumn
Copy link
Member

Initial rebase of AMO (tag:2019.02.28) to ATN master:

  • Don't generate Firefox/Android addons for local dev
  • Set Thunderbird as the default app
  • Only enable Firefox/Android if in tests
  • Add auth bypass for development
  • Adjusted legacy extension upload message for ATN
  • Add contextmanager function to hack around test fixtures and addons-linter woes
  • Update ci workflow
  • Lots of test fixes

This is a rebase up to the 2019.02.28 tag on AMO, right before they removed the django front-end. It's probably a good base to then upgrade as we need it. Tests are currently failing due to some category shenanigans (overlapping ids, changed ids, etc...) and some other minor issues. But the only thing failing on the web-side is the addon upload (due to the category issue.)

I'm sure there were Thunderbird specific tweaks I'll have to go back and fix though.

diox and others added 30 commits August 22, 2024 15:28
* Extract version source asynchronously.

Fixes #10566

* Fix circular import that magically nullifies elasticsearch mocks

* Fix more mock paths, restore import
It's been passing reliably since we upgraded to pytest 4.2.0
* Fix missing languages in stats from product_details.

Some parts actually... need all the languages.

Fixes mozilla/addons#891

* Remove dbg locale, fix ordering for py3
It depends on the cache key being different for the cached compat info, and using seconds precision to generate it wasn't enough. We could probably use a completely random value instead, but switching
to milliseconds keeps it an ever-incrementing value as before and should be safer.

Fix #10599
pyup-bot and others added 21 commits August 22, 2024 15:35
We now have the expected values for some of the fields. In addition,
some of the fields that had equivalents in our other APIs are renamed
to match the rest of the API better.
* Update django-waffle from 0.14.0 to 0.15.1
* Flush waffle after changing their values in tests
Localization authors:
- Andreas Pettersson <[email protected]>
@MelissaAutumn MelissaAutumn added the backport fixable by backporting upstream patches label Aug 25, 2024
@MelissaAutumn MelissaAutumn self-assigned this Aug 25, 2024
@github-actions
Copy link

github-actions bot commented Aug 25, 2024

Python 3.6 Test Results

5 500 tests   5 322 ✅  21m 27s ⏱️
    1 suites     35 💤
    1 files      143 ❌

For more details on these failures, see this check.

Results for commit 9e85106.

♻️ This comment has been updated with latest results.

* Don't generate Firefox/Android addons for local dev
* Set Thunderbird as the default app
* Only enable Firefox/Android if in tests
* Add auth bypass for development
* Adjusted legacy extension upload message for ATN
* Add contextmanager function to hack around test fixtures and addons-linter woes
* Update ci workflow
* Lots of test fixes
@MelissaAutumn
Copy link
Member Author

Setup instructions:

Note: that I can only get this working on linux/amd64 machines. Even with emulation arm macbooks have failed.

  1. Setup /etc/hosts with:
    127.0.0.1 olympia.test

  2. Build containers (note that depending on docker install you may need sudo):
    docker-compose up --build -V

  3. Once everything is built and running you can initialize the db with (again note the potential sudo requirement):
    make initialize_docker

  4. Once that's setup go to http://olympia.test:8000.

For logging in you'll need either the fxa keys or to apply this patch: https://github.com/MelissaAutumn/atn-docker/blob/main/patches/login_override.patch (I'm unsure if it will cleanly apply on this branch, but it's a couple of lines so you can copy and paste it.) This patch will override the login button to log you into the super user you created during initialize_docker. It's for testing purposes only.

For testing you can pull down the extension example repo: https://github.com/thunderbird/webext-examples and zip up an extension of your choice (v3/mailtabs is a good one.) Make sure to zip up the contents of the folder not the mailtabs folder itself. Rename the zip file to extension.xpi and try uploading it on your local ATN.

I don't remember if the auto approval cron is active in docker, but if not you can "review" it with your super user access. (Under Tools > Review on the website.)

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

Labels

backport fixable by backporting upstream patches

Projects

None yet

Development

Successfully merging this pull request may close these issues.