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

2799 Коммитов

Автор SHA1 Сообщение Дата
dependabot[bot] c2c3ebb558 Bump mypy from 0.961 to 0.971 in /glean-core/python
Bumps [mypy](https://github.com/python/mypy) from 0.961 to 0.971.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.961...v0.971)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-20 12:23:28 +02:00
Chris H-C 10e356757e bug 1767037 - RLB: Add a new ctor to Event that takes a list of allowed event extra keys.
This enables runtime-defined extra keys for runtime-defined event metrics.

Alternatively to this we could give RLB a RuntimeExtraKeys like NoExtraKeys and
specialize the impl of EventMetric to not use ALLOWED_EXTRA or into_ffi_extra,
but given that runtime-defined metrics are a dev-only feature (at present)
maybe this is enough?
2022-07-19 10:19:23 +02:00
Jan-Erik Rediger 16cae15c2a Remove ffi-support crate
Everything is handled by UniFFI now
2022-07-18 13:17:42 +02:00
Jan-Erik Rediger 2c37bd7cf6 Kotlin: Add a hook to run tasks after init
We saw some intermittents on Android Components failing in the `assert(isInitialized())` line.
This leads me to believe that it runs before Glean.initialize is
finished off-thread.
To fix this we introduce a new task queue: run things right after
Glean.initialize calls back into the wrapper.
We need to be careful though: This is triggered from the Rust side so we
can't call back and forth between Kotlin and Rust inside that task or we
risk deadlocks.
But in this instance we're safe:
1. We only allow tasks in test mode
2. We only call it in a single place

In theory there's a race condition still there, because we use
unsynchronized access to the `afterInitQueue`, but really ... it's test
mode and might just be fine enough for all we care? Let's hope so.

I am not able to reproduce the same error as in the intermittent locally
at all (neither in the simulator nor on an actual device), so really I
don't know if this "fixes" it.
The only way to test this out is to go through a release, get it into
A-C and then re-enable the tests and hope for the best.
2022-07-18 13:06:18 +02:00
Jan-Erik Rediger 4001b78094 Remove ping name from test_get_num_recorded_errors
Errors are always in the `metrics` ping.
We don't expose sending the metrics ping really,
so always checking there should be safe for all consumers
and it simplifies the API.
2022-07-18 12:59:43 +02:00
Jan-Erik Rediger 2d63fba70d Update jsonschema-valid
It's a simple dependency-update release, reducing our own duplication
here.
2022-07-14 12:12:16 +02:00
Jan-Erik Rediger 3543395760 Implement a glean-build crate for use in Rust consumers
This crate should be used as a build dependency in Rust consumers.
In their `build.rs` they can call the builder to auto-generate code from
`metrics.yaml` and `pings.yaml` definitions:

    glean_build::Builder::default()
        .metrics("metrics.yaml")
        .pings("pings.yaml")
        .generate()
        .expect("Error generating Glean Rust bindings");

This requires a working Python3 & pip installation.
Windows untested.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1713573 and https://bugzilla.mozilla.org/show_bug.cgi?id=1772566
2022-07-13 16:13:41 +02:00
Jan-Erik Rediger 82f68b22a2 Kotlin: Remove unused file 2022-07-12 11:56:36 +02:00
Jan-Erik Rediger df80c1ba8e Remove wording about exceptions thrown when values are missing
We switched to returning optional values now.
2022-07-12 11:56:36 +02:00
Jan-Erik Rediger d5bf6dfe32 Remove testHasValue once and for all 2022-07-12 11:56:36 +02:00
Jan-Erik Rediger 9b0bb1c674 Python: drop dependency on cffi
UniFFI uses ctypes which comes with Python.
No need for anything else anymore.
2022-07-11 19:26:06 +02:00
tlong 5ac329c21b Bumped version to 50.1.2 2022-07-08 14:04:12 -05:00
Travis Long 679fbf1ef5 Update to UniFFI v0.19.3
This update to UniFFI contains a fix for the Swift code generation, unbreaking the Glean iOS build.
2022-07-08 12:42:25 -05:00
Travis Long 72bbaf4db2 Fixes clippy lints and warnings for Rust 1.63.0-beta.2 2022-07-08 08:28:20 -05:00
dependabot[bot] c7f7bb5df0 Bump black from 22.3.0 to 22.6.0 in /glean-core/python
Bumps [black](https://github.com/psf/black) from 22.3.0 to 22.6.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/22.3.0...22.6.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 14:09:48 +02:00
dependabot[bot] fb72de31a8 Bump flake8-bugbear from 22.4.25 to 22.7.1 in /glean-core/python
Bumps [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) from 22.4.25 to 22.7.1.
- [Release notes](https://github.com/PyCQA/flake8-bugbear/releases)
- [Commits](https://github.com/PyCQA/flake8-bugbear/compare/22.4.25...22.7.1)

---
updated-dependencies:
- dependency-name: flake8-bugbear
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 14:00:17 +02:00
Jan-Erik Rediger a3a71afb59
Upgrade to uniffi 0.19 (#2102)
* Upgrade to uniffi 0.19.2

Brings in some dependency updates as well as a fix to unbreak
sccache-powered builds.

Co-authored-by: Travis Long <tlong@mozilla.com>
2022-07-08 11:54:57 +02:00
Jan-Erik Rediger c9235d3c4c
Merge back release of v50.1.1 (#2100) 2022-06-17 12:00:39 +02:00
Alessio Placitelli 721cfa5f39
Bug 1774559 - Fix building on Windows by not referencing Linux paths (#2098) 2022-06-16 11:47:41 +02:00
Mike Hommey 5ab50ec121 Update env_logger to 0.9 and android_logger to 0.11 2022-06-16 06:33:32 +09:00
Jan-Erik Rediger 14dbc6ff1d Bumped version to 50.1.0 2022-06-15 12:00:50 +02:00
Chris H-C 86be9f67cc bug 1772156 - Derive (De)Serialize for CMD and Lifetime 2022-06-14 11:38:14 -04:00
Jan-Erik Rediger e334bb03c4 Upgrade to glean_parser v6.1.1 2022-06-13 16:28:08 +02:00
Jan-Erik Rediger 2d35dd0f99 Correct link to RLB's API docs in README.
[doc only]
2022-06-13 15:53:11 +02:00
Jan-Erik Rediger 307325254b Use Swift packages for direct dependencies and drop Carthage
Only 2 dependencies left:
* Testing only: OHHTTPStubs for network mocking
* GzipSwift: for TestUtils to decode gzip'ed payloads

Both are available as Swift packages, so we can consume them that way.
2022-06-13 11:12:26 +02:00
Travis Long 13533c3a44 Imports necessary for Glean to work in the iOS megazord again 2022-06-13 10:30:14 +02:00
Jan-Erik Rediger cf68c13a9b Re-export once_cell
This can then be used in generated code without the end user required to
depend on the (right) version of once_cell.
2022-06-09 15:43:19 +02:00
Jan-Erik Rediger 5c6c418825 Use specified glean_parser version in iOS helper script again 2022-06-07 16:34:15 +02:00
dependabot[bot] c5b6656127 Bump mypy from 0.960 to 0.961 in /glean-core/python
Bumps [mypy](https://github.com/python/mypy) from 0.960 to 0.961.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.960...v0.961)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-07 10:42:42 +02:00
Jan-Erik Rediger 7510050fd0 Python: Disable one more test on Windows 2022-06-03 15:49:56 +02:00
Jan-Erik Rediger c903542d9e Remove `rlb_flush_dispatcher` symbol
This was used to unblock the Rust dispatcher from foreign language bindings.
Now that we have _only_ the Rust dispatcher it's of course the one
that's going to be unblocked by `initialize`.
The functionality to automatically call this from `glean-ffi` was
removed when `glean-ffi` itself was removed.

This is thus just a cleanup of already unused functionality.
2022-06-03 15:49:56 +02:00
Jan-Erik Rediger 4f736e6986 Ensure Python linting is ignoring the venv dir, not files
Also reformats the one file that was left out previously.

[doc only]
2022-06-02 16:10:01 +02:00
Jan-Erik Rediger 6913fc9ca3 Implement the text metric for Kotlin and Swift 2022-05-30 12:15:40 +02:00
dependabot[bot] 3a9a2898df Bump mypy from 0.950 to 0.960 in /glean-core/python
Bumps [mypy](https://github.com/python/mypy) from 0.950 to 0.960.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.950...v0.960)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-27 16:08:58 +02:00
Jan-Erik Rediger 6a11f9ff6d Python: Skip tests that constantly fail on Windows 2022-05-25 17:38:23 +02:00
Jan-Erik Rediger 0165248edc Python: Call out to Python instead of echo
This is more likely to work on all platforms than echo
2022-05-25 17:38:23 +02:00
Jan-Erik Rediger e04316c668 Bumped version to 50.0.1 2022-05-25 11:48:13 +02:00
Jan-Erik Rediger 20936a7031 Python: Ignore errors when trying to remove the directory 2022-05-24 11:47:39 +02:00
Tooru Fujisawa edfa0a4f7a Bug 1770791 - Part 2: Do not call setup_logging twice. 2022-05-24 11:37:28 +02:00
Tooru Fujisawa 27387560d4 Bug 1770791 - Part 1: Do not create FdLogger instance if already created. 2022-05-24 11:37:28 +02:00
Jan-Erik Rediger b4b54f61c0 Upgrade to glean_parser v6.0.1
This relaxed a version requirement, making it compatible with m-c again
2022-05-23 12:39:52 +02:00
Jan-Erik Rediger 40658a2dab Bumped version to 50.0.0 2022-05-20 12:57:38 +02:00
Jan-Erik Rediger 4e953f6ddc Python: Ensure all `test_get_value` methods return optional value 2022-05-19 15:30:50 +02:00
Jan-Erik Rediger 11e5e3b626 glean_initialize can't visible fail (it's all async) 2022-05-19 13:51:55 +02:00
Jan-Erik Rediger 5e5f03257c Upgrade glean_parser to v6 2022-05-19 12:05:10 +02:00
Jan-Erik Rediger 2f01ac23b6 Rust: Apply clippy suggestion to use `split_once` 2022-05-19 11:01:45 +02:00
Jan-Erik Rediger bbb8cc18c2 Kotlin: Export RecordedExperiment 2022-05-18 15:03:25 +02:00
Jan-Erik Rediger edd4cd46af RLB: block_on_dispatcher is handled internally 2022-05-18 12:06:14 +02:00
Jan-Erik Rediger 24abb4a51b Merge branch 'main' into uniffi-merge-main 2022-05-18 11:43:38 +02:00
Jan-Erik Rediger 3010217a7a Bumped version to 44.2.0 2022-05-16 18:05:03 +02:00
Jan-Erik Rediger 978f9b59f9 Kotlin: Use the library name `xul` for the core parts
This is a hack:
Glean is build into libxul from mozilla-central and users consume it as part of GeckoView.
Because UniFFI does not have the option to switch the library to consume,
except at build time, we use this hack for now.
2022-05-13 14:12:26 +02:00
Jan-Erik Rediger 434aca48a7 Implement test_get_num_recorded_errors for booleans
Boolean metric don't actually record any error themselves,
but they can have an error if done through a labeled boolean.

Reapplies #2049 / bug 1766515
2022-05-12 17:29:03 +02:00
Jan-Erik Rediger 24df2b28a8 Kotlin: Hide logs from UniFFI-generated code (for real)
This was tried in c192d85595, but actually put the wrong level down.
2022-05-12 17:29:03 +02:00
Jan-Erik Rediger c495e0f4bb Swift: Filter UniFFI's own debug logging
This is mostly useless in normal operation.
2022-05-12 17:29:03 +02:00
Jan-Erik Rediger e4ee21aeaa Swift: Reenable test using setDirtyFlag 2022-05-12 17:29:03 +02:00
Jan-Erik Rediger ccd67d590b Rust: Derive equality traits for datetime 2022-05-12 17:29:03 +02:00
Jan-Erik Rediger a84c4cd2ba Swift: Ignore return value of sync ping submission in MPS 2022-05-12 17:29:03 +02:00
Jan-Erik Rediger 13f3b36a77 Use expanded command to build uniffi code 2022-05-11 17:02:36 +02:00
Jan-Erik Rediger 48feb743b9 Implement rate metric (and numerator and denominator) for Kotlin and Swift 2022-05-11 17:02:36 +02:00
Jan-Erik Rediger e2a153cf8b Reformat 2022-05-11 17:02:36 +02:00
Jan-Erik Rediger f096b67c58 Document a bit better what a denominator metric does 2022-05-11 17:02:36 +02:00
Jan-Erik Rediger d349692bbd Implement Rate, Denominator and Numerator using UniFFI 2022-05-11 17:02:36 +02:00
Perry McManis 2873d746a1 fmt update 2022-05-10 16:39:26 -05:00
Perry McManis f7162757f3 Merge branch 'main' of github.com:perrymcmanis144/glean 2022-05-10 15:45:38 -05:00
Perry McManis 98c7e3b288 implemented test get num recorded errors for boolean in traits & rlb 2022-05-10 15:40:53 -05:00
Jan-Erik Rediger 878f0e05ed Try with https repo link for glean_parser override 2022-05-06 14:11:27 +02:00
Jan-Erik Rediger 8fd75fb867 Downgrade oslog
This is causing problems with other dependencies in mozilla-central
2022-05-06 14:11:27 +02:00
Jan-Erik Rediger 880544a71e Use a tooling crate to run uniffi-bindgen and builtin bindgen in build.rs 2022-05-06 14:11:27 +02:00
Jan-Erik Rediger f6002d68bb Use proper type wrapper for Glean's timer id 2022-05-06 14:11:27 +02:00
Jan-Erik Rediger 058a973ca2 Upgrade to UniFFI v0.18.0 2022-05-06 13:34:51 +02:00
Jan-Erik Rediger 100f1d6eba Downgrade whatsys
This was causing issues for Python Windows i686 tests
2022-05-04 17:07:06 +02:00
Jan-Erik Rediger c4f750c31c Update some top-level dependencies 2022-05-04 15:18:30 +02:00
Jan-Erik Rediger 0897c6a6ca Override Glean parser to use 2022-05-04 15:18:09 +02:00
Jan-Erik Rediger 0ab16b6e79 Swift: Use integer keys in distribution data
This was missed in b94957a4f9
2022-05-04 13:49:59 +02:00
Jan-Erik Rediger d7aa224400 Kotlin: Fix test assertion after dispatcher limit changed
The dispatcher is Rust internal now and the limit was recently raised.
2022-05-04 12:40:01 +02:00
Jan-Erik Rediger 5a0f453b27 Merge branch 'main' into uniffi 2022-05-04 12:24:49 +02:00
Jan-Erik Rediger fb82722a2f Check for string key in JSON
Keys in JSON are always strings, so we need to use one when indexing.
This was accidentally changed in b94957a4f9
2022-05-04 11:25:25 +02:00
Jan-Erik Rediger 8dba2219ea Add a workflow & substitute script to build and autopublish Glean locally
[doc only]
2022-05-04 10:40:32 +02:00
Jan-Erik Rediger bed831fee3 Make source tag API public 2022-05-04 10:39:19 +02:00
Jan-Erik Rediger fe02d7fb87 Swift: fix task overflow calculation 2022-05-02 18:26:50 +02:00
Jan-Erik Rediger d0f7836043 Only report the number of overflowing tasks in preinit_tasks_overflow metric 2022-05-02 12:01:11 +02:00
Jan-Erik Rediger b94957a4f9 Use integer keys in distribution data 2022-05-02 11:21:44 +02:00
Jan-Erik Rediger 3062efe10b Kotlin: Implement setting dirty flag for testing 2022-04-29 17:13:15 +02:00
Jan-Erik Rediger 8aacfb0d42 Kotlin: Re-enable test to ensure pings are sent after recording 2022-04-29 17:13:15 +02:00
Jan-Erik Rediger 93ee04f95c Kotlin: Restore proper test name 2022-04-29 17:12:51 +02:00
Jan-Erik Rediger 4b3c1e9095 Kotlin: Ignore test that makes other tests fail 2022-04-29 17:12:51 +02:00
Jan-Erik Rediger d5302ad9dd [RLB] No need to reset state, it's recreated later 2022-04-29 17:12:37 +02:00
Jan-Erik Rediger 80b2e17120 [Swift] make tests more robust by ignoring unavailability of database. 2022-04-29 17:12:37 +02:00
dependabot[bot] 862b6df2c4 Bump mypy from 0.942 to 0.950 in /glean-core/python
Bumps [mypy](https://github.com/python/mypy) from 0.942 to 0.950.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.942...v0.950)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-28 10:44:04 +02:00
dependabot[bot] dade4d2dc2 Bump flake8-bugbear from 22.3.23 to 22.4.25 in /glean-core/python
Bumps [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) from 22.3.23 to 22.4.25.
- [Release notes](https://github.com/PyCQA/flake8-bugbear/releases)
- [Commits](https://github.com/PyCQA/flake8-bugbear/compare/22.3.23...22.4.25)

---
updated-dependencies:
- dependency-name: flake8-bugbear
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-27 15:55:00 +02:00
Chris H-C 60f6b57678 Bumped version to 44.1.1 2022-04-14 13:32:23 -04:00
Jan-Erik Rediger d025158a91 Support expiration by major version on iOS
It's up to the embedding application to provide the correct version
number.
2022-04-14 18:04:43 +02:00
Jan-Erik Rediger 5dfdb7496b Kotlin formatting 2022-04-14 15:36:00 +02:00
Jan-Erik Rediger dd3f81c396 Python formatting 2022-04-14 15:36:00 +02:00
Jan-Erik Rediger 65468eb424 Rust: Formatting 2022-04-14 15:36:00 +02:00
Jan-Erik Rediger f26e673f57 Python: Pass unix-epoch as build date for now 2022-04-14 14:53:52 +02:00
Jan-Erik Rediger 2f6c0ed99e Kotlin: Pretend its never DST!
Unless someone _really closely_ expects the Date, they shouldn't notice:
The zone offset will account for any DST.
2022-04-14 14:27:34 +02:00
Chris H-C 78b6ed9ff7 bug 1764549 - Bump the RLB preinit queue from 10^2 to 10^3
FOG's on Desktop and is init whenever BrowserGlue gets around to it.
We have the memory to play with.

This is a temporary measure until we make this configurable or limitless.
2022-04-14 11:30:57 +02:00
Jan-Erik Rediger 1dc79b377a Correctly pass along build date everywhere 2022-04-13 13:35:36 +02:00
Jan-Erik Rediger c0abc26f35 Swift: Fix tests for now-expected API 2022-04-13 11:48:10 +02:00