Skip to content

Commit 2278eab

Browse files
committed
chore(glean): upgrade @mozilla/glean to 5.0.8 and glean_parser to v19
Because: - glean_parser <v19 / glean.js <v5.0.8 caused server-side Glean events to have wildly incorrect timestamps (DENG-10432) This commit: - Bumps @mozilla/glean from 5.0.4 to 5.0.8 - Updates glean_parser from ~=14.5 to ~=19.0 in CI and mono Dockerfiles - Bumps CI Docker image tags from v8 to v9 to force image rebuild - Regenerates all Glean code with glean_parser v19.0.0 - Removes orphaned generated files (standard.js, sync.js, webauthn.js) whose metrics were previously removed from YAML definitions - Fixes timestamp bug for accounts_backend and subscription_platform_backend server events Fixes FXA-13435
1 parent 9108677 commit 2278eab

62 files changed

Lines changed: 368 additions & 220 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: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ executors:
8080
# step, and the saving the initial a workspace state.
8181
build-executor:
8282
docker:
83-
- image: mozilla/fxa-circleci:ci-builder-v8
83+
- image: mozilla/fxa-circleci:ci-builder-v9
8484
environment:
8585
NODE_ENV: development
8686
FIRESTORE_EMULATOR_HOST: localhost:9090
@@ -96,7 +96,7 @@ executors:
9696
default: medium
9797
resource_class: << parameters.resource_class >>
9898
docker:
99-
- image: mozilla/fxa-circleci:ci-test-runner-v8
99+
- image: mozilla/fxa-circleci:ci-test-runner-v9
100100
environment:
101101
NODE_ENV: development
102102
FIRESTORE_EMULATOR_HOST: localhost:9090
@@ -112,7 +112,7 @@ executors:
112112
default: large
113113
resource_class: << parameters.resource_class >>
114114
docker:
115-
- image: mozilla/fxa-circleci:ci-test-runner-v8
115+
- image: mozilla/fxa-circleci:ci-test-runner-v9
116116
- image: cimg/mysql:8.0
117117
command: --default-authentication-plugin=mysql_native_password
118118
- image: jdlk7/firestore-emulator
@@ -135,7 +135,7 @@ executors:
135135
default: xlarge
136136
resource_class: << parameters.resource_class >>
137137
docker:
138-
- image: mozilla/fxa-circleci:ci-functional-test-runner-v8
138+
- image: mozilla/fxa-circleci:ci-functional-test-runner-v9
139139
- image: redis
140140
- image: pafortin/goaws
141141
- image: cimg/mysql:8.0
@@ -190,7 +190,7 @@ executors:
190190
default: xlarge
191191
resource_class: << parameters.resource_class >>
192192
docker:
193-
- image: mozilla/fxa-circleci:ci-functional-test-runner-v8
193+
- image: mozilla/fxa-circleci:ci-functional-test-runner-v9
194194
environment:
195195
NODE_ENV: development
196196
CUSTOMS_SERVER_URL: none
@@ -518,7 +518,7 @@ commands:
518518
docker build . \
519519
-f ./project/_dev/docker/ci/Dockerfile \
520520
--target << parameters.target >> \
521-
-t mozilla/fxa-circleci:ci-<< parameters.target >>-v8
521+
-t mozilla/fxa-circleci:ci-<< parameters.target >>-v9
522522
523523
create-fxa-ci-images:
524524
# Build CI images. Images are built on top of each other. Each is optimized for a specific task.
@@ -547,10 +547,10 @@ commands:
547547
name: Push CI Images and Extract Yarn Cache
548548
command: |
549549
docker login -u $DOCKER_USER_fxa_circleci -p $DOCKER_PASS_fxa_circleci
550-
.circleci/docker-copy-cache.sh mozilla/fxa-circleci:ci-builder-v8
551-
docker push mozilla/fxa-circleci:ci-test-runner-v8
552-
docker push mozilla/fxa-circleci:ci-functional-test-runner-v8
553-
docker push mozilla/fxa-circleci:ci-builder-v8
550+
.circleci/docker-copy-cache.sh mozilla/fxa-circleci:ci-builder-v9
551+
docker push mozilla/fxa-circleci:ci-test-runner-v9
552+
docker push mozilla/fxa-circleci:ci-functional-test-runner-v9
553+
docker push mozilla/fxa-circleci:ci-builder-v9
554554
wait
555555
556556
upload_to_gcs:

_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/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

packages/fxa-content-server/app/scripts/lib/glean/cad.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)