Skip to content

Commit 3a86878

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 - 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 3a86878

61 files changed

Lines changed: 358 additions & 210 deletions

Some content is hidden

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

_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

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