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

Storage Updates #24272

Merged
merged 12 commits into from
Oct 3, 2024
Merged

Storage Updates #24272

merged 12 commits into from
Oct 3, 2024

Conversation

rebloor
Copy link
Contributor

@rebloor rebloor commented Sep 2, 2024

Summary

This change:

  • Address is the compatibility updates needed for Bug 1908925
    "storage.session quota is not enforced" to cover the implementation of storage.session.getBytesInUse and storage.session.QUOTA_BYTES
  • for clarity, exemplified the Storage area method types etc. under each storage area.

Related issues

Related content changes for Bug 1908925 or in mdn/content#35629

@rebloor rebloor added the data:webext Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions label Sep 2, 2024
@rebloor rebloor requested review from zombie and Rob--W September 2, 2024 19:06
@rebloor rebloor self-assigned this Sep 2, 2024
@rebloor
Copy link
Contributor Author

rebloor commented Sep 10, 2024

@zombie or @Rob--W could I get your review on this BCD?

@rebloor rebloor marked this pull request as ready for review September 13, 2024 17:17
Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

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

I'm requesting changes, to apply all of the following suggested edits:

  • inaccurate storage.local.getBytes & storage.sync.getBytes data (you swapped the two).
  • Drop extra_key from managed API (2x) because it is not relevant.
  • Update chrome versions in extra_key to match the parent version.

After applying all of these suggested updates, please do a search and replace in this file, to replace ≤58 with ≤18, since that is the version where these APIs existed; at least where the getBytesInUse method was introduced. Source:

webextensions/api/storage.json Outdated Show resolved Hide resolved
webextensions/api/storage.json Outdated Show resolved Hide resolved
webextensions/api/storage.json Outdated Show resolved Hide resolved
webextensions/api/storage.json Outdated Show resolved Hide resolved
webextensions/api/storage.json Outdated Show resolved Hide resolved
"description": "Supports empty key",
"support": {
"chrome": {
"version_added": "≤105"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"version_added": "105"
"version_added": "58"

webextensions/api/storage.json Outdated Show resolved Hide resolved
webextensions/api/storage.json Outdated Show resolved Hide resolved
webextensions/api/storage.json Outdated Show resolved Hide resolved
webextensions/api/storage.json Outdated Show resolved Hide resolved
@rebloor rebloor requested a review from Rob--W September 27, 2024 16:11
Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

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

The sync compatibility information for Firefox for Android is incorrect. You have currently set it to 48 (true at the top level), but it should be "53". That mirrors desktop, but we cannot just use "mirror" here because there is a compatibility note that should be kept (i.e. that storage.sync does not sync on Android).

And please fix the Chrome compat information as requested at https://github.com/mdn/browser-compat-data/pull/24272#pullrequestreview-2332762107:>

After applying all of these suggested updates, please do a search and replace in this file, to replace ≤58 with ≤18, since that is the version where these APIs existed; at least where the getBytesInUse method was introduced. Source:

@danielhjacobs
Copy link
Contributor

danielhjacobs commented Sep 29, 2024

The sync compatibility information for Firefox for Android is incorrect. You have currently set it to 48 (true at the top level), but it should be "53". That mirrors desktop, but we cannot just use "mirror" here because there is a compatibility note that should be kept (i.e. that storage.sync does not sync on Android).

And please fix the Chrome compat information as requested at https://github.com/mdn/browser-compat-data/pull/24272#pullrequestreview-2332762107:>

After applying all of these suggested updates, please do a search and replace in this file, to replace ≤58 with ≤18, since that is the version where these APIs existed; at least where the getBytesInUse method was introduced. Source:

All the Firefox for Android 48 updates here seem to relate to this table: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/StorageArea#browser_compatibility

Your review comment relates to https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/sync#browser_compatibility

This PR doesn't actually touch that line (line 445 currently, line 992 in this PR)

@Rob--W
Copy link
Member

Rob--W commented Sep 30, 2024

All the Firefox for Android 48 updates here seem to relate to this table: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/StorageArea#browser_compatibility

Your review comment relates to https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/sync#browser_compatibility

This PR doesn't actually touch that line (line 445 currently, line 992 in this PR)

This PR adds BCD entries to every storage namespace, whose version information may differ from where the original version was introduced.

With such a large diff/file it is not obvious what would be going on, so I put a quick preview tool together that generates a table based on the input. You can see it at https://jsbin.com/subipeyibo/edit?output and input the latest commit, currently:
https://github.com/mdn/browser-compat-data/raw/8987eb0a03b7ae2ea630fb09a242397a3652a3b4/webextensions/api/storage.json

The rendered table shows incorrect version information for the storage.sync API.

@Rob--W
Copy link
Member

Rob--W commented Sep 30, 2024

To recap (plus more specific details):

chrome in sync and local namespaces:

chrome in managed namespace:

firefox_android in sync namespace:

  • sync from true to 53 with note that it doesn't sync AND that quota is not yet enforced.
  • sync methods all from 48/mirror to mirror (or 53 with same note)
  • sync.onChanged kept at mirror (or 111 with same note).
  • sync.getBytesInUse from false to 78 with same note. (Not mirror here because the note on quota enforcement is relevant)

@rebloor
Copy link
Contributor Author

rebloor commented Oct 2, 2024

@Rob--W, hopefully, those changes are made; however, I didn't fully follow your request regarding firefox_android in the sync namespace. We don't normally cascade notes down, but did you want the notes about the absence of sync and management of quota on all of the sub-items? Also, for sync.onChanged did you mean 101?

@rebloor rebloor requested a review from Rob--W October 2, 2024 01:57
Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

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

All looks good! And thanks for catching my typo, it should indeed have been 101 instead of 111.

@danielhjacobs
Copy link
Contributor

danielhjacobs commented Oct 2, 2024

Since this now includes the changes from #24525, it needs the "KR: Real BCD" label.

@Rob--W Rob--W added the KR: Real BCD Key Result: Eliminate true/null values and replace them with "real" values. label Oct 2, 2024
@rebloor rebloor merged commit 6083ee1 into mdn:main Oct 3, 2024
6 checks passed
@rebloor rebloor deleted the storage-updates branch October 3, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:webext Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions KR: Real BCD Key Result: Eliminate true/null values and replace them with "real" values.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants