Skip to content

Commit b9e01ea

Browse files
committed
Merge branch 'release-v2.0.2' into release
2 parents 424b067 + 58e1347 commit b9e01ea

File tree

16 files changed

+380
-250
lines changed

16 files changed

+380
-250
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Unreleased changes
22

3-
[Full changelog](https://github.com/mozilla/glean.js/compare/v2.0.1...main)
3+
[Full changelog](https://github.com/mozilla/glean.js/compare/v2.0.2...main)
4+
5+
# v2.0.2 (2023-09-14)
6+
7+
[Full changelog](https://github.com/mozilla/glean.js/compare/v2.0.1...v2.0.2)
8+
9+
* [#1768](https://github.com/mozilla/glean.js/pull/1768): Add support for `GLEAN_PYTHON` and `GLEAN_PIP` environment variables.
10+
* [#1755](https://github.com/mozilla/glean.js/pull/1755): Add sync check to `set` function for the URL metric.
11+
* [#1766](https://github.com/mozilla/glean.js/pull/1766): Update default `maxEvents` count to 1. This means an events ping will be sent after each recorded event unless the `maxEvents` count is explicitly set to a larger number.
412

513
# v2.0.1 (2023-08-11)
614

automation/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

automation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"devDependencies": {
2222
"@octokit/request": "^8.1.1",
2323
"browserstack-local": "^1.5.4",
24-
"geckodriver": "^4.1.3",
24+
"geckodriver": "^4.2.0",
2525
"selenium-webdriver": "^4.4.0",
2626
"webpack": "^5.88.2",
2727
"webpack-cli": "^5.1.4",

bin/python-env-vars-test.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/env bash
2+
#
3+
# This Source Code Form is subject to the terms of the Mozilla Public
4+
# License, v. 2.0. If a copy of the MPL was not distributed with this
5+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
7+
set -eo pipefail
8+
9+
run() {
10+
[ "${VERB:-0}" != 0 ] && echo "+ $*"
11+
"$@"
12+
}
13+
14+
# All sed commands below work with either
15+
# GNU sed (standard on Linux distrubtions) or BSD sed (standard on macOS)
16+
SED="sed"
17+
18+
WORKSPACE_ROOT="$( cd "$(dirname "$0")/.." ; pwd -P )"
19+
20+
# Set custom values for Python environment variables.
21+
if [ -x "$(command -v python)" ]; then
22+
export GLEAN_PYTHON=python
23+
fi
24+
25+
if [ -x "$(command -v pip)" ]; then
26+
export GLEAN_PIP=pip
27+
fi
28+
29+
# Delete the .venv so a new one gets created for testing.
30+
rm -rf .venv
31+
32+
# Generate files using the Glean.js CLI tool (which just runs glean_parser)
33+
npm run cli -- \
34+
translate tests/integration/schema/metrics.yaml tests/integration/schema/pings.yaml \
35+
-f typescript \
36+
-o tests/integration/schema/generated
37+
38+
# Update metrics import path
39+
FILE=glean/tests/integration/schema/generated/forTesting.ts
40+
run $SED -i.bak -E \
41+
-e 's#@mozilla/glean/private/metrics#../../../../src/core/metrics/types#g' \
42+
"${WORKSPACE_ROOT}/${FILE}"
43+
run rm "${WORKSPACE_ROOT}/${FILE}.bak"
44+
45+
# Update ping import path
46+
FILE=glean/tests/integration/schema/generated/pings.ts
47+
run $SED -i.bak -E \
48+
-e 's#@mozilla/glean/private/ping#../../../../src/core/pings/ping_type.js#g' \
49+
"${WORKSPACE_ROOT}/${FILE}"
50+
run rm "${WORKSPACE_ROOT}/${FILE}.bak"
51+
52+
unset GLEAN_PYTHON
53+
unset GLEAN_PIP
54+
55+
# Delete the custom .venv so next run uses the default Python binaries.
56+
rm -rf .venv

docs/guides/update_glean_parser.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
To update the version of glean_parser used by the Glean.js, run the `bin/update-glean-parser-version.sh` script, providing the version as a command line parameter:
44

55
```bash
6-
bin/update-glean-parser-version.sh 1.28.3
6+
bin/update-glean-parser-version.sh 1.28
77
```
88

9+
It's enough to specify `MINOR.MAJOR`.
10+
911
This will update the version in all the required places and create a commit with the changes. After that, you just need to create a pull request with the changes.
1012

1113
No further action is required.

docs/reference/sizes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ to external consumers.
4646
|timing_distribution|8.7 KB |8.7 KB |8.7 KB |
4747
|rate|2.5 KB |2.5 KB |2.5 KB |
4848
|uuid|1.0 KB |1.0 KB |1.0 KB |
49-
|url|2.2 KB |2.2 KB |2.2 KB |
49+
|url|2.3 KB |2.3 KB |2.3 KB |
5050
<!-- ! -->
5151

5252
## Plugins

0 commit comments

Comments
 (0)