Skip to content

Commit d7bdd88

Browse files
committed
chore(glean): upgrade @mozilla/glean to 5.0.8 and glean_parser to v19
Because: * The content-server a256gcm mocha spec asserts on a Chromium WebCrypto error message that is no longer populated, making the functional-tests misc job fail on every rerun of this PR. * The full content-server mocha runner sometimes exceeds the 60s Playwright default on CI, timing out before the suite finishes. This commit: * Bumps @mozilla/glean from 5.0.4 to 5.0.8 and glean_parser from 14.5 to 19.0 across docker images and the CI venv. * Updates generated glean metrics/pings in fxa-auth-server and fxa-content-server for parser v19 output. * Replaces the UA-gated message assertion in the a256gcm decrypt spec with a name assertion (OperationError) that holds on both Blink and WebKit. * Marks the content-server mocha runner in misc.spec.ts as test.slow() so the 3000+ in-browser specs get the extended timeout on CI.
1 parent 9108677 commit d7bdd88

66 files changed

Lines changed: 406 additions & 255 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ commands:
253253
# from the packages used in main, which is generally the case, we shouldn't see large install
254254
# times, since the base image will have pre cached.
255255
steps:
256+
- run:
257+
name: Recreate venv with glean_parser 19
258+
command: |
259+
rm -rf .venv
260+
python3 -m venv .venv
261+
.venv/bin/pip install 'glean_parser~=19.0'
256262
- run:
257263
name: Base Install
258264
command: |
@@ -444,6 +450,7 @@ commands:
444450
- node_modules
445451
- packages/**/node_modules
446452
- packages/version.json
453+
- .venv
447454

448455
save-build-workspace:
449456
steps:

_dev/docker/ci/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ WORKDIR /home/circleci
1212
COPY --chown=circleci:circleci project project
1313
WORKDIR /home/circleci/project
1414
RUN python3 -m venv .venv \
15-
&& .venv/bin/pip install 'glean_parser~=14.5'
15+
&& .venv/bin/pip install 'glean_parser~=19.0'
1616
RUN git rev-parse HEAD > base_ref;
1717
RUN cp yarn.lock yarn.lock.base;
1818

@@ -49,5 +49,5 @@ COPY --chown=circleci:circleci --from=playwright-install /home/circleci/.cache/m
4949
COPY --chown=circleci:circleci project project
5050
WORKDIR /home/circleci/project
5151
RUN python3 -m venv .venv \
52-
&& .venv/bin/pip install 'glean_parser~=14.5'
52+
&& .venv/bin/pip install 'glean_parser~=19.0'
5353
COPY --chown=circleci:circleci install /usr/local/bin/

_dev/docker/mono/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ USER app
4242
WORKDIR /fxa
4343
RUN rm -rf .venv \
4444
&& python3 -m venv .venv \
45-
&& .venv/bin/pip install 'glean_parser~=14.5'
45+
&& .venv/bin/pip install 'glean_parser~=19.0'
4646
RUN _dev/docker/mono/build.sh $(cat packages/version.json | jq -r '.version.version')
4747

4848
# Final image

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"@googleapis/androidpublisher": "^27.0.0",
5656
"@googlemaps/google-maps-services-js": "^3.4.0",
5757
"@grpc/grpc-js": "^1.11.1",
58-
"@mozilla/glean": "^5.0.4",
58+
"@mozilla/glean": "^5.0.8",
5959
"@nestjs/apollo": "^12.2.1",
6060
"@nestjs/common": "^10.4.5",
6161
"@nestjs/config": "^3.3.0",

packages/functional-tests/tests/misc.spec.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,20 @@ test.describe('severity-1', () => {
88
// runs all mocha tests - see output here: http://127.0.0.1:3030/tests/index.html
99
test('content-server mocha tests', async ({ target, page }, { project }) => {
1010
test.skip(project.name !== 'local', 'mocha tests are local only');
11+
test.slow();
1112
await page.goto(`${target.contentServerUrl}/tests/index.html`, {
1213
waitUntil: 'load',
1314
});
14-
await page.waitForTimeout(2000); // wait for mocha to load
15-
await page.evaluate(() =>
16-
(globalThis as any).runner.on(
17-
'end',
18-
() => ((globalThis as any).done = true)
19-
)
20-
);
15+
await page.waitForFunction(() => !!(globalThis as any).runner);
16+
await page.evaluate(() => {
17+
const runner = (globalThis as any).runner;
18+
// runner may have already ended by the time we subscribe, so handle that too
19+
if (runner.stats && runner.stats.end) {
20+
(globalThis as any).done = true;
21+
} else {
22+
runner.on('end', () => ((globalThis as any).done = true));
23+
}
24+
});
2125
await page.waitForFunction(
2226
() => (globalThis as any).done,
2327
{},

packages/fxa-auth-server/lib/metrics/glean/server_events.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
// AUTOGENERATED BY glean_parser v14.5.2. DO NOT EDIT. DO NOT COMMIT.
5+
// AUTOGENERATED BY glean_parser v19.0.0. DO NOT EDIT. DO NOT COMMIT.
66

77
// This requires `uuid` and `mozlog` libraries to be in the environment
88
// @types/uuid and mozlog types definitions are required in devDependencies
@@ -146,7 +146,7 @@ class AccountsEventsServerEvent {
146146
},
147147
// `Unknown` fields below are required in the Glean schema, however they are not useful in server context
148148
client_info: {
149-
telemetry_sdk_build: 'glean_parser v14.5.2',
149+
telemetry_sdk_build: 'glean_parser v19.0.0',
150150
first_run_date: 'Unknown',
151151
os: 'Unknown',
152152
os_version: 'Unknown',
@@ -244,7 +244,7 @@ class EventsServerEventLogger {
244244
}) {
245245
const now = new Date();
246246
const timestamp = now.toISOString();
247-
event.timestamp = now.getTime();
247+
event.timestamp = 0;
248248
const eventPayload = {
249249
metrics: {
250250
string: {
@@ -272,7 +272,7 @@ class EventsServerEventLogger {
272272
},
273273
// `Unknown` fields below are required in the Glean schema, however they are not useful in server context
274274
client_info: {
275-
telemetry_sdk_build: 'glean_parser v14.5.2',
275+
telemetry_sdk_build: 'glean_parser v19.0.0',
276276
first_run_date: 'Unknown',
277277
os: 'Unknown',
278278
os_version: 'Unknown',

packages/fxa-content-server/app/scripts/lib/glean/account.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
// AUTOGENERATED BY glean_parser v14.5.2. DO NOT EDIT. DO NOT COMMIT.
5+
// AUTOGENERATED BY glean_parser v19.0.0. DO NOT EDIT. DO NOT COMMIT.
66

77
import StringMetricType from '@mozilla/glean/private/metrics/string';
88

packages/fxa-content-server/app/scripts/lib/glean/accountBanner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
// AUTOGENERATED BY glean_parser v14.5.2. DO NOT EDIT. DO NOT COMMIT.
5+
// AUTOGENERATED BY glean_parser v19.0.0. DO NOT EDIT. DO NOT COMMIT.
66

77
import EventMetricType from '@mozilla/glean/private/metrics/event';
88

packages/fxa-content-server/app/scripts/lib/glean/accountPref.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
// AUTOGENERATED BY glean_parser v14.5.2. DO NOT EDIT. DO NOT COMMIT.
5+
// AUTOGENERATED BY glean_parser v19.0.0. DO NOT EDIT. DO NOT COMMIT.
66

77
import EventMetricType from '@mozilla/glean/private/metrics/event';
88

packages/fxa-content-server/app/scripts/lib/glean/cachedLogin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
// AUTOGENERATED BY glean_parser v14.5.2. DO NOT EDIT. DO NOT COMMIT.
5+
// AUTOGENERATED BY glean_parser v19.0.0. DO NOT EDIT. DO NOT COMMIT.
66

77
import EventMetricType from '@mozilla/glean/private/metrics/event';
88

0 commit comments

Comments
 (0)