Skip to content
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

Restrict manifest v3 to 128.0 (Fixes #280) #282

Merged
merged 4 commits into from
Jun 5, 2024

Conversation

MelissaAutumn
Copy link
Member

@MelissaAutumn MelissaAutumn commented May 23, 2024

Fixes #280

This adds two additional checks to our manifest.json parser.

  1. If a manifest.json has manifest_version: 3, require that strict_min_version exists and is greater than or equal to 128.0b1.
  2. If a manifest.json has manifest_version: 3 don't allow the applications key.

cc @jobisoft

@MelissaAutumn MelissaAutumn requested a review from Sancus May 23, 2024 19:24
@MelissaAutumn MelissaAutumn self-assigned this May 23, 2024
Copy link

github-actions bot commented May 23, 2024

Test Results

5 489 tests  +8   5 402 ✅ +10   27m 21s ⏱️ - 1m 49s
    1 suites ±0      25 💤  -  1 
    1 files   ±0      62 ❌  -  1 

For more details on these failures, see this check.

Results for commit 2dfd1e1. ± Comparison against base commit c8e9457.

This pull request removes 1 and adds 9 tests. Note that renamed tests count towards both.
src.olympia.addons.tests.test_commands.TestDeleteAddonsNotCompatibleWithFirefoxes ‑ test_basic
src.olympia.addons.tests.test_commands.TestDeleteAddonsNotCompatibleWithThunderbird ‑ test_basic
src.olympia.files.tests.test_utils_.TestManifestJSONExtractor ‑ test_manifest_version_3_doesnt_allow_applications_key
src.olympia.files.tests.test_utils_.TestManifestJSONExtractor ‑ test_manifest_version_3_requires_128_fail_due_to_lower_version
src.olympia.files.tests.test_utils_.TestManifestJSONExtractor ‑ test_manifest_version_3_requires_128_fails
src.olympia.files.tests.test_utils_.TestManifestJSONExtractor ‑ test_manifest_version_3_requires_128_passes
src.olympia.files.tests.test_utils_.TestManifestJSONExtractorStaticTheme ‑ test_manifest_version_3_doesnt_allow_applications_key
src.olympia.files.tests.test_utils_.TestManifestJSONExtractorStaticTheme ‑ test_manifest_version_3_requires_128_fail_due_to_lower_version
src.olympia.files.tests.test_utils_.TestManifestJSONExtractorStaticTheme ‑ test_manifest_version_3_requires_128_fails
src.olympia.files.tests.test_utils_.TestManifestJSONExtractorStaticTheme ‑ test_manifest_version_3_requires_128_passes

♻️ This comment has been updated with latest results.

@jobisoft
Copy link

I added 128.0b1 as an actual usable app version:

image

@Sancus
Copy link
Member

Sancus commented May 24, 2024

Not sure there is such a thing as "b1" at all? I thought betas had internal version the same as release, intentionally so. A letter is only present on Daily versions.

@jobisoft
Copy link

Not sure there is such a thing as "b1" at all? I thought betas had internal version the same as release, intentionally so. A letter is only present on Daily versions.

How do we solve this?

In our past communication, we said (as an example) 128.0 is greater than 128.0a1. And indeed, I cannot install an add-on in 128 Daily with "strict_min_version": "128.0".

I can however install an add-on in 127 Beta with "strict_min_version": "127.0". So it appears the order is

*.0a1 < *.0 <= *.0b1 (probably because it is just like *.0)

Is that correct? Based on my test with "strict_min_version": "127.0", we then should be fine with enforcing a min version of 128.0 for Manifest V3, as that will exclude Daily, but include Beta, which is what I want.

Does that sound sensible?

@MelissaAutumn
Copy link
Member Author

Its a two second change so let me know if it should be 128!

@jobisoft
Copy link

Its a two second change so let me know if it should be 128!

Yes, it must be 128.0 as minimum requirement. Thanks!

@MelissaAutumn
Copy link
Member Author

Okay changes are up. Any final reviews before this is good to merge?

@MelissaAutumn MelissaAutumn changed the title Restrict manifest v3 to 128.0b1 (Fixes #280) Restrict manifest v3 to 128.0 (Fixes #280) May 27, 2024
@jobisoft
Copy link

Okay changes are up. Any final reviews before this is good to merge?

Andrei is set as reviewer, so I did not look. Shall I take a look?

@MelissaAutumn
Copy link
Member Author

Ah it was meant to either of you really 😄, and if you'd like!

cc @Sancus

Copy link
Member

@Sancus Sancus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems OK to me,

@MelissaAutumn
Copy link
Member Author

Will test it on stage, and merge it up after. Thanks!

@MelissaAutumn MelissaAutumn merged commit 4f3a0a1 into master Jun 5, 2024
0 of 2 checks passed
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.

Restrict Manifest V3 uploads to Thunderbird 128.0b1 or later
3 participants