Closed Bug 1982318 Opened 3 months ago Closed 3 months ago

Make it possible to delete uploaded profiles from about:logging

Categories

(Core :: XPCOM, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox144 --- fixed

People

(Reporter: canova, Assigned: canova)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

Bug 1803607 added a way to upload profiles from about:logging. But currently there is no way to delete them if they are uploaded through about:logging.

We should:

  1. Save the jwt token that we get from here (we save it in indexeddb in the frontend) That uploadResult is the jwt token that we just discard. We can include some more information from the profile data like we do in the profiler frontend.
  2. Show a list of "uploaded profiles" in about:logging with a "delete" button on the side.
  3. Send a request with that jwt token to the profiler server with the delete request (similar to here) when that button is pressed

They were fine in CI, but running them locally was showing some expected
failures about persisting some preferences.

Assignee: nobody → canaltinova
Status: NEW → ASSIGNED

This patch doesn't use the code yet, it just adds the storage logic for
us to use in the following patch.

Attachment #9506613 - Attachment description: Bug 1982318 - Add profile storage logic for about:logging r?padenot → Bug 1982318 - Add profile storage logic and save the uploaded profiles in about:logging r?padenot

Previously, when we were saving the profile to disk, we getting the
profile path from the localized string. But it appears that due to some
rendering timing issues, the rendered text might not contain the path
yet. But we will always have it inside the data-l10n-args attribute.
That's why it's better to check that directly.

Pushed by canaltinova@gmail.com: https://github.com/mozilla-firefox/firefox/commit/07d5d1b43b76 https://hg.mozilla.org/integration/autoland/rev/e2088dc90187 Fix the prefs in about:logging tests r=padenot,julienw https://github.com/mozilla-firefox/firefox/commit/fc1ce289854a https://hg.mozilla.org/integration/autoland/rev/96c9343eb577 Add profile storage logic and save the uploaded profiles in about:logging r=padenot,julienw,fluent-reviewers,flod https://github.com/mozilla-firefox/firefox/commit/b33b4b75b458 https://hg.mozilla.org/integration/autoland/rev/672441e36a88 Add "uploaded profiles" section to about:logging with the ability to delete profiles r=padenot,fluent-reviewers,julienw,bolsson https://github.com/mozilla-firefox/firefox/commit/477b49b92119 https://hg.mozilla.org/integration/autoland/rev/b419f506dacb Add tests for "uploaded profiles" section and profile deletion in about:logging r=padenot,julienw https://github.com/mozilla-firefox/firefox/commit/b73536637974 https://hg.mozilla.org/integration/autoland/rev/c84989da6e3e Fix some flakiness in the about:logging tests r=julienw
Pushed by chorotan@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ad64c97666ab https://hg.mozilla.org/integration/autoland/rev/7304d6d26591 Revert "Bug 1982318 - Fix some flakiness in the about:logging tests r=julienw" for causing lint failure on aboutLogging.css

Backed out for causing lint failure on aboutLogging.css

Backout link

Push with failures

Failure log

Flags: needinfo?(canaltinova)

Huh, it's weird. I can't reproduce the lint failure locally, or in try. I pushed a try build here without code changes and I can't see it: https://treeherder.mozilla.org/jobs?repo=try&revision=7f3fa4d165454f3ec3051fd5019aff6c48e505ef&selectedTaskRun=dWRLnxgMTJ2OwvYNmNw_aQ.0

I don't know how to reproduce this, but looking at the failure in CI, this is the log:

[task 2025-09-03T21:08:34.723+00:00] TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/toolkit/content/aboutLogging/aboutLogging.css:37:3 | var(--aboutlogging-border-radius-small) should be using a border-radius design token. This may be fixable by running the same command again with --fix. (stylelint-plugin-mozilla/use-border-radius-tokens)
[task 2025-09-03T21:08:34.724+00:00] TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/toolkit/content/aboutLogging/aboutLogging.css:158:3 | var(--aboutlogging-border-radius-small) should be using a border-radius design token. This may be fixable by running the same command again with --fix. (stylelint-plugin-mozilla/use-border-radius-tokens)

This looks like a false positive, because --aboutlogging-border-radius-small is already using the border-radius design token with a fallback to normal values. This is done this way, specifically so it works on Android, because these tokens are not shipped in Android. See bug 1986645.

I will try to add stylelint-disable-next-line use-border-radius-tokens and land it again.

Flags: needinfo?(canaltinova)

Okay, I can reproduce it after rebasing my patches on top of main.

Pushed by canaltinova@gmail.com: https://github.com/mozilla-firefox/firefox/commit/a6b7b0fea1f3 https://hg.mozilla.org/integration/autoland/rev/c113fa93abe5 Fix the prefs in about:logging tests r=padenot,julienw https://github.com/mozilla-firefox/firefox/commit/f4dedc7cc7e3 https://hg.mozilla.org/integration/autoland/rev/19c8ec18087e Add profile storage logic and save the uploaded profiles in about:logging r=padenot,julienw,fluent-reviewers,flod https://github.com/mozilla-firefox/firefox/commit/ead7900d02f6 https://hg.mozilla.org/integration/autoland/rev/b657f23b326f Add "uploaded profiles" section to about:logging with the ability to delete profiles r=padenot,fluent-reviewers,julienw,bolsson https://github.com/mozilla-firefox/firefox/commit/f8090c5d40f1 https://hg.mozilla.org/integration/autoland/rev/3c2aaab450d1 Add tests for "uploaded profiles" section and profile deletion in about:logging r=padenot,julienw https://github.com/mozilla-firefox/firefox/commit/50ce93f93810 https://hg.mozilla.org/integration/autoland/rev/9a13e7146b08 Fix some flakiness in the about:logging tests r=julienw
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: