Граф коммитов

432 Коммитов

Автор SHA1 Сообщение Дата
Jan-Erik Rediger 1743cb1e4c Bumped version to 42.0.1 2021-10-11 11:09:14 +02:00
Jan-Erik Rediger 499309475f Store created label metrics to avoid rapidly reconstructing them all the time
This fixes a crashing bug, that probably started being an issue since
March 2020 / Glean v26, when we removed finalizers from the Kotlin
library[1]. Depending on how GC runs it was theoretically possible to
hit that even with finalizers in the SDK.

Contrary to the commit message in [1] we do have one more place where we
dynamically construct metrics: Labeled Metrics!
It used to be the case that whenever you access the submetric of a
labeled metric, that is `Metrics.Category.Name["label"]`, we created a
new Rust object, put that into the internal ConcurrentHandleMap and
returned a handle to it.

A ConcurrentHandleMap does a lot of work to ensure that you can't misuse
handles against the wrong map, when the item was already replaced, etc.
It also sets an upper limit of entries it can handle[2].
That limit is high enough for the static use of Rust (you would have to
use 32767+ metrics of a single type), but quickly[3] breaks down

The solution is to not re-create labeled submetrics on every access.
We cache those ourselves now, identified by the parent's metric handle
and the label.
Now accessing the same label 32768+ times is fine, you get the same
Rust object every time (as long as it exists).

There's one last piece: We do expose a way to destroy metrics, even if
that shouldn't happen for any statically defined ones.
This is not happening on Kotlin, where we removed finalizers some time
ago [1].
We're now removing those finalizers on Swift and Python as well.
We could try to get smart and do some double-checks that the handle is
not stale when the submetric is accessed.
But that breaks down quickly, because the metric could be destroyed
between the access and the recording, still leading to issues.
The only way to handle that would be some reference counting on the
object itself, but the current implementation doens't easily allow that.
So for now we just don't destroy boolean/counter/string metrics, ever.

The included tests fail without the corresponding library changes,
giving us a bit more confidence that the fix works.

Now there's still one way to trigger a crash, in theory:
Keep accessing previously-unused labels 32768+ times.
If you do that you're really on your own.

[1]: 25bf9ea0b2
[2]: 0fdc22a8df/src/handle_map.rs (L160-L166)
[3]: Well, "quickly". Reproducing that on get.webgl.org takes 8+ minutes.
2021-10-11 10:49:17 +02:00
Michael Droettboom 812388ebc5
Support Python 3.10 (#1818)
* Support Python 3.10

This also uses the "next gen" Python Docker images from CircleCI.

Also removes some `persist_to_workspace` that is no longer needed.

* Fix YAML syntax

* Don't use sudo

* Use legacy Docker images for Windows tests

* Use next gen images for Windows

* Use wine-stable

* Remove comment
2021-10-07 17:23:08 -04:00
Chris H-C a0244574fe Bumped version to 42.0.0 2021-10-06 14:48:40 -04:00
Chris H-C c7e457a048 bug 1732988 - Make glean::persist_ping_lifetime_data async
By its nature, persist_ping_lifetime_data performs I/O.
To be consistent across our public API surface, we should dispatch the call.
2021-10-05 09:55:29 -04:00
Jan-Erik Rediger 966a9d22e5 Upgrade to Xcode 13.0.0
CircleCI announcement: https://discuss.circleci.com/t/xcode-13-rc-released/41256
Full software list: https://circle-macos-docs.s3.amazonaws.com/image-manifest/v6052/index.html
2021-10-01 10:01:33 +02:00
Jan-Erik Rediger 120ce86e58 Fix up changelog after cherry-picking release 2021-09-29 17:38:28 +02:00
Jan-Erik Rediger 953726d326 Bumped version to 41.1.1 2021-09-29 17:38:12 +02:00
Travis Long a0dd8e57b0 Final (hopefully) round of change requests addressed 2021-09-29 08:08:23 -05:00
Travis Long 441ecbb819 Address change requests and fix rebase cruft 2021-09-29 08:08:23 -05:00
Travis Long 37522215cb Remove reliance on `Operation` for uploading tasks in the background
This relies on the background operation capabilities that are built into URLSession, which we were already using wrapped in an `Operation`. This removes the wrapping, using just the URLOperation capabilities.

Update changelog
2021-09-29 08:08:23 -05:00
Jan-Erik Rediger 013d574364 Document bugfix 2021-09-21 17:44:06 +02:00
Jan-Erik Rediger 0bd97f70d9 Upgrade to Gradle 7, rust-android-gradle 0.9 and other updates 2021-09-21 15:31:40 +02:00
Jan-Erik Rediger 9d7bd77d5e Add changelog entry for URL metric type on iOS
[doc only]
2021-09-16 17:14:51 +02:00
Jan-Erik Rediger ed05eb3ea4 Bumped version to 41.1.0 2021-09-16 12:55:55 +02:00
Jan-Erik Rediger 9cdd88b1b5 Document ping lifetime-data fixes 2021-09-16 12:34:18 +02:00
Chris H-C 7ebc8dd846 Bumped version to 41.0.0 2021-09-13 11:56:56 -04:00
Jan-Erik Rediger 7d495c41b1 Android: Remove support for reading app version info from package manager
This removes the previously deprecated functionatilty.
Passing in the build-time generated `BuildInfo` struct is required.
2021-09-13 16:46:54 +02:00
Chris H-C 646ec6543e Require rust >= 1.53.0 2021-09-13 10:08:40 -04:00
Chris H-C a8bcced3ea bug 1729723 - Clear only the specified storage of delayed ping data 2021-09-13 10:08:40 -04:00
Alessio Placitelli 791442b36e Bumped version to 40.2.0 2021-09-08 03:53:11 +02:00
Alessio Placitelli 19ccb1221b
Fix a merge mistake in the changelog file 2021-09-08 09:39:17 +02:00
Alessio Placitelli b006973414 Add the related changelog entries 2021-09-03 18:01:49 +02:00
Jan-Erik Rediger 48fbc33482 Upgrade to glean_parser v4.0.0
Notable changes:

* Reserve the default ping name. It can't be used as a ping name, but it can be used in send_in_pings
* New lint: Check for redundant words in ping names
2021-09-02 11:42:30 +02:00
Jan-Erik Rediger a491d9a4be Bumped version to 40.1.1 2021-09-02 10:39:07 +02:00
Jan-Erik Rediger ddfb9d48c8 Document bugfixes 2021-09-02 10:39:07 +02:00
Jan-Erik Rediger c5c718201d Bumped version to 40.1.0 2021-08-25 11:07:59 +02:00
Jan-Erik Rediger a421f6f9f0 Mention capability change 2021-08-25 11:07:25 +02:00
Jan-Erik Rediger b70856af8a Force a compile failure when multiple Glean versions are detected in the build
Because of the native code shipped it's essential that all downstream
users rely on the same Glean version.
Gradle can be overeager in chosing a single version when multiple are in
the dependency tree, always picking the latest, even across potentially
breaking-change (that is: major) releases.

Gradle has a way to influence dependency resolution and can even
disallow differing versions using `failOnVersionConflict`.
But that applies to all dependencies and there's no native way to
enforce that for a single dependency.
So the recommended solution[1] is to "manually" check if a dependency was
resolved from multiple versions and raise an issue.

For the ease of consumption by users, such as Fenix, we can apply this
in the Gradle plugin, because that's guaranteed to execute as part of
the build (because if not how are they even using Glean?)

[1]: https://github.com/gradle/gradle/issues/8813
2021-08-23 11:50:19 +02:00
Jan-Erik Rediger 44e38fa107 Document Kotlin update 2021-08-16 12:59:19 +02:00
Jan-Erik Rediger 75fa81ef52 Bumped version to 40.0.0 2021-07-28 13:55:38 +02:00
Jan-Erik Rediger 88e21587dc Bumped version to 39.1.0 2021-07-26 14:59:10 +02:00
Jan-Erik Rediger 88cff40288 Merge back changelog for v39.0.4
[doc only]
2021-07-26 14:28:48 +02:00
Jan-Erik Rediger 42dad3e950 Update to glean_parser 3.6.0 and losen restriction on custom distribution 2021-06-11 12:44:50 +02:00
Jan-Erik Rediger 900f40f6b0 Bumped version to 39.0.3 2021-06-09 14:47:08 +02:00
Jan-Erik Rediger 342daaae3b Kotlin: Unbreak Event#record API by accepting `null` on the deprecated API 2021-06-09 13:54:28 +02:00
Jan-Erik Rediger 8c02331cb9 Bumped version to 39.0.2 2021-06-07 11:18:29 +02:00
Jan-Erik Rediger 0c811a732e Document next release 2021-06-07 11:18:14 +02:00
Jan-Erik Rediger 51061d7f4c Bumped version to 39.0.1 2021-06-04 14:57:17 +02:00
Jan-Erik Rediger 9b97e9124d Document xcframework release 2021-06-04 14:57:17 +02:00
Jan-Erik Rediger ac903d9d59 Bumped version to 39.0.0 2021-05-31 14:14:43 +02:00
Jan-Erik Rediger 0f33a4ed9e Call out glean_parser update 2021-05-31 14:14:43 +02:00
Jan-Erik Rediger 9935f3e523 Glean Plugin: Skip buildinfo generation for libraries 2021-05-28 17:17:50 +02:00
Jan-Erik Rediger 2697414265 Add extensive changelog entry for new event API 2021-05-28 16:38:06 +02:00
Chris H-C 4d7410b58b Bumped version to 38.0.1 2021-05-17 12:01:43 -04:00
Chris H-C 8194f866d6 Update CHANGELOG for lock order inversion #1637 2021-05-17 12:01:43 -04:00
Jan-Erik Rediger 5c956895b3 Bumped version to 38.0.0 2021-05-12 13:52:44 +02:00
Jan-Erik Rediger f610f34852 Add additional changelog items 2021-05-12 13:50:51 +02:00
Jan-Erik Rediger 82f9a0a1f5 Kotlin: Set required client_info fields first
There's a chance that the app is killed at any point.
If that happens while setting core metrics, on next start a ping might
be sent, which is then missing data.

Some of this data is required; and if missing the pipeline rejects the
ping during validation. By moving these metrics first we increase the
chance for them to be set.

This is a very desperate attempt on mitigating missing data.
2021-05-11 17:10:29 +02:00
Chris H-C 1a8ad8003c
Bug 1672951 - Implement a Metrics Ping Scheduler in glean-core (#1599)
* bug 1672951 - Add a Metrics Ping Scheduler to glean-core

Mostly a translation from other LBs' MPSes, but with a few changes.

Most notably a split of scheduling from ping submission that makes for
easier-to-proxy operations that are easier to test.

Also notable is the use of a condvar for cancellable tasks.

* add new Configuration parameter, fix RLB ping tests

* add unit to comment

Co-authored-by: Jan-Erik Rediger <badboy@archlinux.us>

Co-authored-by: Jan-Erik Rediger <badboy@archlinux.us>
2021-05-05 11:19:08 -04:00