Skip to content

Commit

Permalink
Merge branch 'release-v52.5.0' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
travis79 committed Apr 11, 2023
2 parents aa2e4db + 7cf5229 commit 3dd2587
Show file tree
Hide file tree
Showing 43 changed files with 876 additions and 510 deletions.
2 changes: 1 addition & 1 deletion .buildconfig.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
libraryVersion: 52.4.3
libraryVersion: 52.5.0
groupId: org.mozilla.telemetry
projects:
glean:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/glean-probe-scraper.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
name: Glean probe-scraper
on: [push, pull_request]
on:
pull_request:
push:
branches: main

jobs:
glean-probe-scraper:
uses: mozilla/probe-scraper/.github/workflows/glean.yaml@main
19 changes: 16 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
# Unreleased changes

[Full changelog](https://github.com/mozilla/glean/compare/v52.4.3...main)
[Full changelog](https://github.com/mozilla/glean/compare/v52.5.0...main)

# v52.5.0 (2023-04-11)

[Full changelog](https://github.com/mozilla/glean/compare/v52.4.3...v52.5.0)

* General
* On Rkv detecting a corrupted database delete the old RKV, create a new one and log the error ([#2425](https://github.com/mozilla/glean/pull/2425))
* Add the Date header as late as possible before the uploader acts ([#2436](https://github.com/mozilla/glean/pull/2436))
* The logic of the Server Knobs API has been flipped. Instead of applying a list of metrics and their _disabled_ state, the API now accepts a list of metrics and their _enabled_ state ([bug 1811253](https://bugzilla.mozilla.org/show_bug.cgi?id=1811253))
* Kotlin
* Adds the ability to record metrics on a non-main process. This is enabled by setting a `dataPath` in the Glean configuration ([bug 1815233](https://bugzilla.mozilla.org/show_bug.cgi?id=1815233))
* iOS
* Adds the ability to record metrics on a non-main process. This is enabled by setting a `dataPath` in the Glean configuration ([bug 1815233](https://bugzilla.mozilla.org/show_bug.cgi?id=1815233))

# v52.4.3 (2023-03-24)

[Full changelog](https://github.com/mozilla/glean/compare/v52.4.2...v52.4.3)

* General
* Expose Server Knobs functionality via UniFFI for use on mobile
* iOS
* BUGFIX: Prevent another test-only issue: The storage going away when the uploader reports back its status ([#2430](https://github.com/mozilla/glean/pull/2430))

[Full changelog](https://github.com/mozilla/glean/compare/v52.4.2...v52.4.3)

# v52.4.2 (2023-03-15)

[Full changelog](https://github.com/mozilla/glean/compare/v52.4.1...v52.4.2)
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

395 changes: 87 additions & 308 deletions DEPENDENCIES.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ shellcheck: ## Run shellcheck against important shell scripts

lint-python: setup-python ## Run flake8 and black to lint Python code
$(GLEAN_PYENV)/bin/python3 -m flake8 glean-core/python/glean glean-core/python/tests
$(GLEAN_PYENV)/bin/python3 -m black --check --exclude \(\.venv.\*\)\|\(.eggs\)\|_uniffi.py glean-core/python/glean glean-core/python/tests
$(GLEAN_PYENV)/bin/python3 -m black --check --diff --exclude \(\.venv.\*\)\|\(.eggs\)\|_uniffi.py glean-core/python/glean glean-core/python/tests
$(GLEAN_PYENV)/bin/python3 -m mypy glean-core/python/glean

.PHONY: lint-rust lint-kotlin lint-swift lint-yaml
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ buildscript {
mockito: '3.11.2',
mockwebserver: '4.9.1', // This is different than a-c, but we're fine, it's only tests.
kotlin: '1.8.10',
robolectric: '4.9',
robolectric: '4.9.2',
rust_android_plugin: '0.9.3',

// Android X dependencies
androidx_annotation: '1.5.0',
androidx_appcompat: '1.3.0',
androidx_browser: '1.3.0',
androidx_core: '1.8.0',
androidx_espresso: '3.5.0',
androidx_junit: '1.1.4',
androidx_core: '1.9.0',
androidx_espresso: '3.5.1',
androidx_junit: '1.1.5',
androidx_lifecycle: '2.5.1',
androidx_test: '1.5.0',
androidx_work: '2.7.1',
Expand Down Expand Up @@ -211,7 +211,7 @@ task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
classpath = configurations.ktlint
mainClass.set("com.pinterest.ktlint.Main")
args "-F", "${projectDir}/components/**/*.kt", "${projectDir}/gradle-plugin/**/*.kt", "buildSrc/**/*.kt", "!**/build/**"
args "-F", "${projectDir}/glean-core/**/*.kt", "${projectDir}/samples/android/**/*.kt", "buildSrc/**/*.kt", "!**/build/**"
}

// Extremely unsophisticated way to publish a local development version while hiding implementation details.
Expand Down
17 changes: 13 additions & 4 deletions docs/user/reference/general/initializing.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,13 @@ class SampleApplication : Application() {
}
```

The Glean Kotlin SDK does not support use across multiple processes, and must only be initialized on the application's main process. Initializing in other processes is a no-op.
The Glean Kotlin SDK supports use across multiple processes. This is enabled by setting a `dataPath` value in the `Glean.Configuration` object passed to `Glean.initialize`. You **do not** need to set a `dataPath` for your main process. This configuration should only be used by a non-main process.

Additionally, Glean must be initialized on the main (UI) thread of the applications main process. Failure to do so will throw an `IllegalThreadStateException`.
Requirements for a non-main process
- `Glean.initialize` must be called with the `dataPath` value set in the `Glean.Configuration`.
- The default `dataPath` for Glean is `{context.applicationInfo.dataDir}/glean_data`. If you try to use this path, `Glean.initialize` will fail and throw an error.

**Note**: When initializing from a non-main process with a specified `dataPath`, the lifecycle observers will not be set up. This means you will not receive otherwise scheduled [baseline](../../user/pings/baseline.md) or [metrics](../../user/pings/metrics.md) pings.

### Consuming Glean through Android Components

Expand Down Expand Up @@ -174,8 +178,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
```

The Glean Swift SDK does not support use across multiple processes,
and must only be initialized on the application's main process.
The Glean Swift SDK supports use across multiple processes. This is enabled by setting a `dataPath` value in the `Glean.Configuration` object passed to `Glean.initialize`. You **do not** need to set a `dataPath` for your main process. This configuration should only be used by a non-main process.

Requirements for a non-main process
- `Glean.initialize` must be called with the `dataPath` value set in the `Glean.Configuration`.
- On iOS devices, Glean stores data in the Application Support directory. The default `dataPath` Glean uses is `{FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask)[0]}/glean_data`. If you try to use this path, `Glean.initialize` will fail and throw an error.

**Note**: When initializing from a non-main process with a specified `dataPath`, the lifecycle observers will not be set up. This means you will not receive otherwise scheduled [baseline](../../user/pings/baseline.md) or [metrics](../../user/pings/metrics.md) pings.

</div>

Expand Down
2 changes: 1 addition & 1 deletion docs/user/reference/metrics/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ mozilla::glean::views::login_opened.Record(std::move(extra))
**JavaScript**
```js
const extra = { sourceOfLogin: "toolbar" };
const extra = { source_of_login: "toolbar" }; // Extra Keys are *NOT* conjugated to camelCase
Glean.views.loginOpened.record(extra);
```

Expand Down
2 changes: 2 additions & 0 deletions docs/user/user/pings/ping-schedules-and-timings.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ The `submission_timestamp` is the time the ping was received at the telemetry en
The "Baseline 4" ping illustrates an important corner case. When "Session 2" ended, the OS also shut down the entire process, and the Glean SDK did not have an opportunity to send a `baseline` ping immediately. In this case, it is sent at the next available opportunity when the application starts up again in "Run 2". This `baseline` ping is annotated with the reason code `dirty_startup`.

The "Metrics 2" ping likewise illustrates another important corner case. "Metrics 1" was able to be sent at the target time of 04:00 (local device time) because the application was currently running. However, the next time 04:00 came around, the application was not active, so the Glean SDK was unable to send a `metrics` ping. It is sent at the next available opportunity, when the application starts up again in "Run 2". This `metrics` ping is annotated with the reason code `overdue`.

**NOTE**: Ping scheduling and other application lifecycle dependent activities are not set up when Glean is used in a non-main process. See [initializing](../../reference/general/initializing.html#gleaninitializeconfiguration)
2 changes: 1 addition & 1 deletion glean-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "glean-core"
version = "52.4.3"
version = "52.5.0"
authors = ["Jan-Erik Rediger <[email protected]>", "The Glean Team <[email protected]>"]
description = "A modern Telemetry library"
repository = "https://github.com/mozilla/glean"
Expand Down
27 changes: 15 additions & 12 deletions glean-core/android-native/dependency-licenses.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ the details of which are reproduced below.
</license> <license>
<name>Apache License 2.0: env_logger</name>
<url>https://github.com/rust-cli/env_logger/</url>
</license> <license>
<name>Apache License 2.0: errno</name>
<url>https://github.com/lambda-fairy/rust-errno</url>
</license> <license>
<name>Apache License 2.0: fastrand</name>
<url>https://github.com/smol-rs/fastrand</url>
Expand Down Expand Up @@ -318,18 +321,6 @@ the details of which are reproduced below.
</license> <license>
<name>MIT License: winapi-util</name>
<url>https://github.com/BurntSushi/winapi-util</url>
</license> <license>
<name>Mozilla Public License 2.0: glean</name>
<url>https://github.com/mozilla/glean</url>
</license> <license>
<name>Mozilla Public License 2.0: glean-build</name>
<url>https://github.com/mozilla/glean</url>
</license> <license>
<name>Mozilla Public License 2.0: glean-core</name>
<url>https://github.com/mozilla/glean</url>
</license> <license>
<name>Mozilla Public License 2.0: zeitstempel</name>
<url>https://github.com/badboy/zeitstempel</url>
</license> <license>
<name>Mozilla Public License 2.0: embedded-uniffi-bindgen</name>
<url>https://crates.io/crates/embedded-uniffi-bindgen</url>
Expand Down Expand Up @@ -363,6 +354,18 @@ the details of which are reproduced below.
</license> <license>
<name>Mozilla Public License 2.0: uniffi_testing</name>
<url>https://github.com/mozilla/uniffi-rs</url>
</license> <license>
<name>Mozilla Public License 2.0: glean</name>
<url>https://github.com/mozilla/glean</url>
</license> <license>
<name>Mozilla Public License 2.0: glean-build</name>
<url>https://github.com/mozilla/glean</url>
</license> <license>
<name>Mozilla Public License 2.0: glean-core</name>
<url>https://github.com/mozilla/glean</url>
</license> <license>
<name>Mozilla Public License 2.0: zeitstempel</name>
<url>https://github.com/badboy/zeitstempel</url>
</license> <license>
<name>Unicode License Agreement - Data Files and Software (2016): unicode-ident</name>
<url>https://github.com/dtolnay/unicode-ident</url>
Expand Down
27 changes: 15 additions & 12 deletions glean-core/android/dependency-licenses.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ the details of which are reproduced below.
</license> <license>
<name>Apache License 2.0: env_logger</name>
<url>https://github.com/rust-cli/env_logger/</url>
</license> <license>
<name>Apache License 2.0: errno</name>
<url>https://github.com/lambda-fairy/rust-errno</url>
</license> <license>
<name>Apache License 2.0: fastrand</name>
<url>https://github.com/smol-rs/fastrand</url>
Expand Down Expand Up @@ -318,18 +321,6 @@ the details of which are reproduced below.
</license> <license>
<name>MIT License: winapi-util</name>
<url>https://github.com/BurntSushi/winapi-util</url>
</license> <license>
<name>Mozilla Public License 2.0: glean</name>
<url>https://github.com/mozilla/glean</url>
</license> <license>
<name>Mozilla Public License 2.0: glean-build</name>
<url>https://github.com/mozilla/glean</url>
</license> <license>
<name>Mozilla Public License 2.0: glean-core</name>
<url>https://github.com/mozilla/glean</url>
</license> <license>
<name>Mozilla Public License 2.0: zeitstempel</name>
<url>https://github.com/badboy/zeitstempel</url>
</license> <license>
<name>Mozilla Public License 2.0: embedded-uniffi-bindgen</name>
<url>https://crates.io/crates/embedded-uniffi-bindgen</url>
Expand Down Expand Up @@ -363,6 +354,18 @@ the details of which are reproduced below.
</license> <license>
<name>Mozilla Public License 2.0: uniffi_testing</name>
<url>https://github.com/mozilla/uniffi-rs</url>
</license> <license>
<name>Mozilla Public License 2.0: glean</name>
<url>https://github.com/mozilla/glean</url>
</license> <license>
<name>Mozilla Public License 2.0: glean-build</name>
<url>https://github.com/mozilla/glean</url>
</license> <license>
<name>Mozilla Public License 2.0: glean-core</name>
<url>https://github.com/mozilla/glean</url>
</license> <license>
<name>Mozilla Public License 2.0: zeitstempel</name>
<url>https://github.com/badboy/zeitstempel</url>
</license> <license>
<name>Unicode License Agreement - Data Files and Software (2016): unicode-ident</name>
<url>https://github.com/dtolnay/unicode-ident</url>
Expand Down
Loading

0 comments on commit 3dd2587

Please sign in to comment.