Bug 1750544 - Upgrade to Glean v43.0.2. r=chutten

Differential Revision: https://phabricator.services.mozilla.com/D136138
This commit is contained in:
Jan-Erik Rediger 2022-01-17 16:26:33 +00:00
parent ac463041a0
commit 8d108a59d0
39 changed files with 325 additions and 227 deletions

12
Cargo.lock generated
View File

@ -2078,9 +2078,9 @@ dependencies = [
[[package]]
name = "glean"
version = "42.3.0"
version = "43.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34d40d192d10509d941937248fe4594d47617abf34496686c809cfdb31ae8506"
checksum = "5eee21709bc0417a5e2b8ea436717bba01c6851111d3ac096994efa73bb79dab"
dependencies = [
"chrono",
"crossbeam-channel",
@ -2098,9 +2098,9 @@ dependencies = [
[[package]]
name = "glean-core"
version = "42.3.0"
version = "43.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "349ebbb162d58911547b48e5fbf90d45854e3e1ba03332f41b80a6611867c013"
checksum = "6078d68e763d57610d362f34223f856fff64d8d3b1c8974833c9fa02a971f59c"
dependencies = [
"bincode",
"chrono",
@ -2118,9 +2118,9 @@ dependencies = [
[[package]]
name = "glean-ffi"
version = "42.3.0"
version = "43.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e29c3f0b9dbde127254f375499df382d5fa9c3c2b33bfcb393485876fe79fb2"
checksum = "a33681c61cb007b4d4c19b3cac1a8e74b211f7afe88f179328c04a3bc72ec466"
dependencies = [
"android_logger",
"env_logger",

View File

@ -36,7 +36,7 @@ allprojects {
topsrcdir = gradle.mozconfig.topsrcdir
topobjdir = gradle.mozconfig.topobjdir
gleanVersion = "42.3.0"
gleanVersion = "43.0.2"
if (gleanVersion != getRustVersionFor("glean")) {
throw new StopExecutionException("Mismatched Glean version, expected: ${gleanVersion}," +
" found ${getRustVersionFor("glean")}")

View File

@ -129,7 +129,7 @@ pth:xpcom/geckoprocesstypes_generator
pth:xpcom/idl-parser
# glean-sdk may not be installable if a wheel isn't available
# and it has to be built from source.
pypi-optional:glean-sdk==42.3.2:telemetry will not be collected
pypi-optional:glean-sdk==43.0.2:telemetry will not be collected
# Mach gracefully handles the case where `psutil` is unavailable.
# We aren't (yet) able to pin packages in automation, so we have to
# support down to the oldest locally-installed version (5.4.2).

View File

@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: glean-parser
Version: 4.3.1
Version: 4.4.0
Summary: Parser tools for Mozilla's Glean telemetry
Home-page: https://github.com/mozilla/glean_parser
Author: Michael Droettboom
@ -85,6 +85,21 @@ $ glean_parser check < ping.json
## Unreleased
## 4.4.0
- Support global file-level tags in metrics.yaml ([bug 1745283](https://bugzilla.mozilla.org/show_bug.cgi?id=1745283))
- Glinter: Reject metric files if they use `unit` by mistake. It should be `time_unit` ([#432](https://github.com/mozilla/glean_parser/pull/432)).
- Automatically generate a build date when generating build info ([#431](https://github.com/mozilla/glean_parser/pull/431)).
Enabled for Kotlin and Swift.
This can be changed with the `build_date` command line option.
`build_date=0` will use a static unix epoch time.
`build_date=2022-01-03T17:30:00` will parse the ISO8601 string to use (as a UTC timestamp).
Other values will throw an error.
Example:
glean_parser translate --format kotlin --option build_date=2021-11-01T01:00:00 path/to/metrics.yaml
## 4.3.1
- BUGFIX: Skip tags for code generation ([#409](https://github.com/mozilla/glean_parser/pull/409))

View File

@ -2,36 +2,36 @@ glean_parser/__init__.py,sha256=kaoYIRhwZiOE1d8TniW1SHSlEivLBXZQJJ3eiDcamvQ,538
glean_parser/__main__.py,sha256=1lA0kuQkEIMZSnG8xYha5dASadwEHI5-MeHmuNqyViA,6509
glean_parser/coverage.py,sha256=2IwC4XMDtDamMkBFoYilmqJzW4gyypq65YVCur8SNas,4405
glean_parser/csharp.py,sha256=tOrwOLjJCnfie0GvhWvg0Q3fnP4VFQM_4GRaaAqUh4I,5242
glean_parser/data_review.py,sha256=TA87mbyUQeDOB1T344gfsXePScBEZ9TdyWLy5TJCpHU,4765
glean_parser/data_review.py,sha256=SjbeSdmZTTg1a2cTxsrQPRRoQxwqhNMtfUjyK_yrhtw,4767
glean_parser/javascript.py,sha256=e2hslgxRB56aS2_JVOkatKexrblcz6-XqsDnGuw0MPQ,8150
glean_parser/kotlin.py,sha256=INVHy3yC2xwm9ZFL9atr99C4DDsOwvRKnCiaJcLql_o,11192
glean_parser/lint.py,sha256=CM9OMH-sIxuErvfQktbWkeKIIVzG28pPxqMGO1Espok,17018
glean_parser/kotlin.py,sha256=V_Toa2ims5GBHOap6nkxL7ShmaaBDb0EPXhxVdjEt9g,12294
glean_parser/lint.py,sha256=_N294HLf5-PgGa-oQxb64xcLP24W9874IGheGzjO6jk,17088
glean_parser/markdown.py,sha256=0auYAmzIrX0kqmQyq9DKkRRvTE66yAYdrU-YMgLhrpw,8996
glean_parser/metrics.py,sha256=Z0gkVMHH-u4eCu_bpsu5JKm9gumZhCz1Jq-xSmHjo8k,11621
glean_parser/parser.py,sha256=vIGJGOz0S4cAIdlzeEoiBbmoEgxLKvGdSStVHt8LvX8,15463
glean_parser/parser.py,sha256=OydnNQYHfNW_UKNzZuZCL-ZEAxTlVzsabXNMxmUuht4,15741
glean_parser/pings.py,sha256=6XakkO9jnQc2oojLQJvTCMwF7w-BEm6rR54tunCb38o,2805
glean_parser/swift.py,sha256=FWOp1Qr8U4xQvOfcu23FttCc4Nc8P7PkJTqm-V7bC4Y,6437
glean_parser/swift.py,sha256=fWI41IcVhMaOAta9V1xBm7_Y5AjT_-uGXytiXaxbfzI,7982
glean_parser/tags.py,sha256=bemKYvcbMO4JrghiNSe-A4BNNDtx_FlUPkgrPPJy84Y,1391
glean_parser/translate.py,sha256=ZyWEEp1bQO2-cneiC-YvbCuTUEra-xgp33X6dkvtgUY,7476
glean_parser/util.py,sha256=gsP8MqfgEs0sDKbz4sV2CfvmDT6MP73dOdNcmOx_K9k,14160
glean_parser/util.py,sha256=XWVBr2b5k-GJhx4-_i4JgE2hejCr1q0IbxvfmRFgdsE,15369
glean_parser/validate_ping.py,sha256=0TNvILH6dtzJDys3W8Kqorw6kk03me73OCUDtpoHcXU,2118
glean_parser/schemas/metrics.1-0-0.schema.yaml,sha256=cND3cvi6iBfPUVmtfIBQfGJV9AALpbvN7nu8E33_J-o,19566
glean_parser/schemas/metrics.2-0-0.schema.yaml,sha256=asAWdpMUkUWDT0sTN26ivoLey50ggGxLUN4aW6OcQpY,22138
glean_parser/schemas/metrics.2-0-0.schema.yaml,sha256=lXjTXyAVaBlx7DNjE8Y4PaOs7au2hGTMs8zSnZxV8Tk,23225
glean_parser/schemas/pings.1-0-0.schema.yaml,sha256=hwCnsKpEysmrmVp-QHGBArEkVY3vaU1rVsxlTwhAzws,4315
glean_parser/schemas/pings.2-0-0.schema.yaml,sha256=rD1s-rfz1xC9biHyLfBCnsoQxVYHwpe_S05awfe2xDA,4363
glean_parser/schemas/tags.1-0-0.schema.yaml,sha256=OGXIJlvvVW1vaqB_NVZnwKeZ-sLlfH57vjBSHbj6DNI,1231
glean_parser/templates/csharp.jinja2,sha256=tPj09JzgSK0YyNb53WkL8WFTA7fcVXyiJ7V-bARnfM0,4354
glean_parser/templates/javascript.jinja2,sha256=Qiv0lxsqVABzdME1MRsmezwtwn8_hHdH9S_v8fJAh-E,2647
glean_parser/templates/kotlin.buildinfo.jinja2,sha256=z9tPgvmNnf8E8gpx7FAWh35oXad8Dlv_UrpqN9CXetY,780
glean_parser/templates/kotlin.buildinfo.jinja2,sha256=m5OngVSjLv4CwpsyNc5Z2O5kixejOXsiIYgzhAkANVA,899
glean_parser/templates/kotlin.geckoview.jinja2,sha256=K0c1BeKSXDVbshC3gpWALCQFp2JtsoqWhGyN1ScPhC0,5077
glean_parser/templates/kotlin.jinja2,sha256=fsFXKI_fKwj5AEO4odJ5sRvoC5geW59_DhU6GATaA90,4475
glean_parser/templates/markdown.jinja2,sha256=tOMN62xEGA1p8QoMKnpCVXUiK_jI5GwLuvCnuOROy8c,3381
glean_parser/templates/qmldir.jinja2,sha256=m6IGsp-tgTiOfQ7VN8XW6GqX0gJqJkt3B6Pkaul6FVo,156
glean_parser/templates/swift.jinja2,sha256=McprjDExS3Ao62_eTvEwl-ZHNIbYDOJe05gv1nd4trM,4791
glean_parser-4.3.1.dist-info/AUTHORS.md,sha256=jBsSsn3EpmpLejgHMhzU1XTFwkCARqYeUs9iGLNgwkQ,432
glean_parser-4.3.1.dist-info/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
glean_parser-4.3.1.dist-info/METADATA,sha256=WO52mRW8bTLNVllJhXFPdPETSWm74sEm1o7QLJPJF4g,22416
glean_parser-4.3.1.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
glean_parser-4.3.1.dist-info/entry_points.txt,sha256=s-clJTIqp-PpJD-n3AnIQZFkTafIrzsTbAPX9vNY018,69
glean_parser-4.3.1.dist-info/top_level.txt,sha256=q7T3duD-9tYZFyDry6Wv2LcdMsK2jGnzdDFhxWcT2Z8,13
glean_parser-4.3.1.dist-info/RECORD,,
glean_parser/templates/swift.jinja2,sha256=qDsAANvlIdcZUo_WwE1G_Sbp4XepxBoBGLMbaOmJwjk,5077
glean_parser-4.4.0.dist-info/AUTHORS.md,sha256=jBsSsn3EpmpLejgHMhzU1XTFwkCARqYeUs9iGLNgwkQ,432
glean_parser-4.4.0.dist-info/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
glean_parser-4.4.0.dist-info/METADATA,sha256=dyViwyJtouX-bFuMzOeoUluaOZ0Ct9q2Yu1mdRbN8p4,23214
glean_parser-4.4.0.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
glean_parser-4.4.0.dist-info/entry_points.txt,sha256=s-clJTIqp-PpJD-n3AnIQZFkTafIrzsTbAPX9vNY018,69
glean_parser-4.4.0.dist-info/top_level.txt,sha256=q7T3duD-9tYZFyDry6Wv2LcdMsK2jGnzdDFhxWcT2Z8,13
glean_parser-4.4.0.dist-info/RECORD,,

View File

@ -1,5 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.37.0)
Generator: bdist_wheel (0.37.1)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@ -56,7 +56,7 @@ def generate(
one_line_desc = metric.description.replace("\n", " ")
sensitivity = ", ".join([s.name for s in metric.data_sensitivity])
last_bug = metric.bugs[-1]
metrics_table += f"{category_name}.{metric_name} | "
metrics_table += f"`{category_name}.{metric_name}` | "
metrics_table += f"{one_line_desc} | {sensitivity} | {last_bug}\n"
durations.add(metric.expires)

View File

@ -132,6 +132,29 @@ def class_name(obj_type: str) -> str:
return util.Camelize(obj_type) + "MetricType"
def generate_build_date(date: Optional[str]) -> str:
"""
Generate the build timestamp.
"""
ts = util.build_date(date)
data = [
str(ts.year),
# In Java the first month of the year in calendars is JANUARY which is 0.
# In Python it's 1-based
str(ts.month - 1),
str(ts.day),
str(ts.hour),
str(ts.minute),
str(ts.second),
]
components = ", ".join(data)
# DatetimeMetricType takes a `Calendar` instance.
return f'Calendar.getInstance(TimeZone.getTimeZone("GMT+0")).also {{ cal -> cal.set({components}) }}' # noqa
def output_gecko_lookup(
objs: metrics.ObjectTree, output_dir: Path, options: Optional[Dict[str, Any]] = None
) -> None:
@ -249,6 +272,11 @@ def output_kotlin(
- `with_buildinfo`: If "true" a `GleanBuildInfo.kt` file is generated.
Otherwise generation of that file is skipped.
Defaults to "true".
- `build_date`: If set to `0` a static unix epoch time will be used.
If set to a ISO8601 datetime string (e.g. `2022-01-03T17:30:00`)
it will use that date.
Other values will throw an error.
If not set it will use the current date & time.
"""
if options is None:
options = {}
@ -257,6 +285,7 @@ def output_kotlin(
glean_namespace = options.get("glean_namespace", "mozilla.components.service.glean")
namespace_package = namespace[: namespace.rfind(".")]
with_buildinfo = options.get("with_buildinfo", "true").lower() == "true"
build_date = options.get("build_date", None)
# Write out the special "build info" object
template = util.get_jinja2_template(
@ -264,6 +293,7 @@ def output_kotlin(
)
if with_buildinfo:
build_date = generate_build_date(build_date)
# This filename needs to start with "Glean" so it can never clash with a
# metric category
with (output_dir / "GleanBuildInfo.kt").open("w", encoding="utf-8") as fd:
@ -272,6 +302,7 @@ def output_kotlin(
namespace=namespace,
namespace_package=namespace_package,
glean_namespace=glean_namespace,
build_date=build_date,
)
)
fd.write("\n")

View File

@ -543,17 +543,21 @@ def glinter(
if parser_config is None:
parser_config = {}
if lint_yaml_files(input_filepaths, file=file, parser_config=parser_config):
return 1
errors = 0
nits = lint_yaml_files(input_filepaths, file=file, parser_config=parser_config)
errors += len(nits)
objs = parser.parse_objects(input_filepaths, parser_config)
if util.report_validation_errors(objs):
return 1
errors += util.report_validation_errors(objs)
nits = lint_metrics(objs.value, parser_config=parser_config, file=file)
if any(nit.check_type == CheckType.error for nit in nits):
return 1
if len(nits) == 0:
errors += len([nit for nit in nits if nit.check_type == CheckType.error])
if errors == 0:
print("✨ Your metrics are Glean! ✨", file=file)
return 0
return 0
print(f"❌ Found {errors} errors.")
return 1

View File

@ -195,6 +195,8 @@ def _instantiate_metrics(
objects, and merge them into a single tree.
"""
global_no_lint = content.get("no_lint", [])
global_tags = content.get("$tags", [])
assert isinstance(global_tags, list)
for category_key, category_val in content.items():
if category_key.startswith("$"):
@ -243,6 +245,10 @@ def _instantiate_metrics(
if metric_obj is not None:
metric_obj.no_lint = list(set(metric_obj.no_lint + global_no_lint))
if len(global_tags):
metric_obj.metadata["tags"] = list(
set(metric_obj.metadata.get("tags", []) + global_tags)
)
if isinstance(filepath, Path):
metric_obj.defined_in["filepath"] = str(filepath)

View File

@ -434,10 +434,14 @@ definitions:
unit:
title: Unit
description: |
The unit of the metric, for metrics that don't already require a
meaningful unit, such as `time_unit`.
The unit of the metric.
This is only required for metrics
that don't already require a meaningful unit, e.g. `quantity`
This is provided for informational purposes only and doesn't have any
effect on data collection.
Metric types like `timespan`, `datetime`
and `timing_distribution` take a `time_unit` instead.
type: string
no_lint:
@ -538,7 +542,7 @@ propertyNames:
- not:
description: "'tags' is reserved as a category name."
const: tags
- enum: ['$schema']
- enum: ['$schema', '$tags']
properties:
$schema:
@ -553,6 +557,14 @@ properties:
items:
type: string
$tags:
title: Tags that apply to the whole file
description: |
This denotes the list of tags that apply to all metrics in this file.
type: array
items:
type: string
additionalProperties:
type: object
propertyNames:
@ -685,3 +697,27 @@ additionalProperties:
Built-in pings are not allowed."
pattern:
"^(metrics|baseline|events|deletion-request|default|glean_.*)$"
-
if:
# This is a schema check:
# This is true when the checked YAML passes the schema validation.
#
# If it has a datetime/timing_distribution/timespan type
# AND has a `unit` property, then...
properties:
type:
enum:
- datetime
- timing_distribution
- timespan
required:
- unit
# ... then `time_unit` is required,
# because that's the only way we can force this to fail.
then:
required:
- time_unit
description: |
This metric type uses the (optional) `time_unit` parameter,
not `unit`.

View File

@ -134,6 +134,33 @@ def variable_name(var: str) -> str:
return var
class BuildInfo:
def __init__(self, build_date):
self.build_date = build_date
def generate_build_date(date: Optional[str]) -> str:
"""
Generate the build timestamp.
"""
ts = util.build_date(date)
data = [
("year", ts.year),
("month", ts.month),
("day", ts.day),
("hour", ts.hour),
("minute", ts.minute),
("second", ts.second),
]
# The internal DatetimeMetricType API can take a `DateComponents` object,
# which lets us easily specify the timezone.
components = ", ".join([f"{name}: {val}" for (name, val) in data])
return f'DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), {components})' # noqa
class Category:
"""
Data struct holding information about a metric to be used in the template.
@ -157,6 +184,14 @@ def output_swift(
- namespace: The namespace to generate metrics in
- glean_namespace: The namespace to import Glean from
- allow_reserved: When True, this is a Glean-internal build
- with_buildinfo: If "true" the `GleanBuildInfo` is generated.
Otherwise generation of that file is skipped.
Defaults to "true".
- build_date: If set to `0` a static unix epoch time will be used.
If set to a ISO8601 datetime string (e.g. `2022-01-03T17:30:00`)
it will use that date.
Other values will throw an error.
If not set it will use the current date & time.
"""
if options is None:
options = {}
@ -174,6 +209,12 @@ def output_swift(
namespace = options.get("namespace", "GleanMetrics")
glean_namespace = options.get("glean_namespace", "Glean")
with_buildinfo = options.get("with_buildinfo", "true").lower() == "true"
build_date = options.get("build_date", None)
build_info = None
if with_buildinfo:
build_date = generate_build_date(build_date)
build_info = BuildInfo(build_date=build_date)
filename = "Metrics.swift"
filepath = output_dir / filename
@ -199,6 +240,7 @@ def output_swift(
namespace=namespace,
glean_namespace=glean_namespace,
allow_reserved=options.get("allow_reserved", False),
build_info=build_info,
)
)
# Jinja2 squashes the final newline, so we explicitly add it

View File

@ -14,14 +14,18 @@ Jinja2 template is not. Please file bugs! #}
package {{ namespace }}
import java.util.Calendar
import java.util.TimeZone
import {{ glean_namespace }}.BuildInfo
import {{ namespace_package }}.BuildConfig
@Suppress("MagicNumber")
internal object GleanBuildInfo {
val buildInfo: BuildInfo by lazy {
BuildInfo(
versionCode = BuildConfig.VERSION_CODE.toString(),
versionName = BuildConfig.VERSION_NAME
versionName = BuildConfig.VERSION_NAME,
buildDate = {{ build_date }}
)
}
}

View File

@ -60,6 +60,16 @@ import {{ glean_namespace }}
// swiftlint:disable force_try
extension {{ namespace }} {
{% if build_info %}
class GleanBuild {
private init() {
// Intentionally left private, no external user can instantiate a new global object.
}
public static let info = BuildInfo(buildDate: {{ build_info.build_date }})
}
{% endif %}
{% for category in categories %}
{% if category.contains_pings %}
class {{ category.name|Camelize }} {

View File

@ -24,6 +24,26 @@ import yaml
if sys.version_info < (3, 7):
import iso8601 # type: ignore
def date_fromisoformat(datestr: str) -> datetime.date:
try:
return iso8601.parse_date(datestr).date()
except iso8601.ParseError:
raise ValueError()
def datetime_fromisoformat(datestr: str) -> datetime.datetime:
try:
return iso8601.parse_date(datestr)
except iso8601.ParseError:
raise ValueError()
else:
def date_fromisoformat(datestr: str) -> datetime.date:
return datetime.date.fromisoformat(datestr)
def datetime_fromisoformat(datestr: str) -> datetime.datetime:
return datetime.datetime.fromisoformat(datestr)
TESTING_MODE = "pytest" in sys.modules
@ -46,7 +66,6 @@ if sys.version_info < (3, 7):
class DictWrapper(OrderedDict):
pass
else:
class DictWrapper(dict):
@ -361,13 +380,7 @@ def parse_expires(expires: str) -> datetime.date:
Raises a ValueError in case the string is not properly formatted.
"""
try:
if sys.version_info < (3, 7):
try:
return iso8601.parse_date(expires).date()
except iso8601.ParseError:
raise ValueError()
else:
return datetime.date.fromisoformat(expires)
return date_fromisoformat(expires)
except ValueError:
raise ValueError(
f"Invalid expiration date '{expires}'. "
@ -408,16 +421,43 @@ def validate_expires(expires: str) -> None:
)
def build_date(date: Optional[str]) -> datetime.datetime:
"""
Generate the build timestamp.
If `date` is set to `0` a static unix epoch time will be used.
If `date` it is set to a ISO8601 datetime string (e.g. `2022-01-03T17:30:00`)
it will use that date.
Note that any timezone offset will be ignored and UTC will be used.
Otherwise it will throw an error.
If `date` is `None` it will use the current date & time.
"""
if date is not None:
date = str(date)
if date == "0":
ts = datetime.datetime(1970, 1, 1, 0, 0, 0)
else:
ts = datetime_fromisoformat(date).replace(tzinfo=datetime.timezone.utc)
else:
ts = datetime.datetime.utcnow()
return ts
def report_validation_errors(all_objects):
"""
Report any validation errors found to the console.
Returns the number of errors reported.
"""
found_error = False
found_errors = 0
for error in all_objects:
found_error = True
found_errors += 1
print("=" * 78, file=sys.stderr)
print(error, file=sys.stderr)
return found_error
return found_errors
def remove_output_params(d, output_params):

View File

@ -15,7 +15,7 @@ ecdsa==0.15
esprima==4.0.1
fluent.migrate==0.11
fluent.syntax==0.18.1
glean_parser==4.3.1
glean_parser==4.4.0
jsmin==2.1.0
json-e==2.7.0
mozilla-version==0.3.4

View File

@ -162,9 +162,9 @@ fluent.syntax==0.18.1 \
# -r requirements-mach-vendor-python.in
# compare-locales
# fluent.migrate
glean_parser==4.3.1 \
--hash=sha256:a8924a3a4aca7fba35dc69d93031993d6481c6ec9cd43362c068eb3e18ea43e8 \
--hash=sha256:c194aba35a57ff9d139527c5321ef526599794994e355bad4c314bd3ab64c3eb
glean_parser==4.4.0 \
--hash=sha256:3ae1435b183936a49368806421df27ab944f1802e86a02b38b8e08e53ff0aac5 \
--hash=sha256:948a2b3c81270564a33251fc8ecbfe48bf0549f74bc2d5a8027f6d7b1abae828
# via -r requirements-mach-vendor-python.in
idna-ssl==1.1.0 \
--hash=sha256:a933e3bb13da54383f9e8f35dc4f9cb9eb9b3b78c6b36f311254d6d0d92c6c7c

File diff suppressed because one or more lines are too long

View File

@ -109,6 +109,15 @@ dependencies = [
"termcolor",
]
[[package]]
name = "fastrand"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "779d043b6a0b90cc4c0ed7ee380a6504394cee7efd7db050e3774eee387324b2"
dependencies = [
"instant",
]
[[package]]
name = "ffi-support"
version = "0.4.4"
@ -143,9 +152,9 @@ dependencies = [
[[package]]
name = "getrandom"
version = "0.2.3"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c"
dependencies = [
"cfg-if",
"libc",
@ -154,7 +163,7 @@ dependencies = [
[[package]]
name = "glean-core"
version = "42.3.0"
version = "43.0.2"
dependencies = [
"bincode",
"chrono",
@ -206,6 +215,15 @@ dependencies = [
"unicode-normalization",
]
[[package]]
name = "instant"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
dependencies = [
"cfg-if",
]
[[package]]
name = "iso8601"
version = "0.4.1"
@ -217,9 +235,9 @@ dependencies = [
[[package]]
name = "itoa"
version = "0.4.8"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
[[package]]
name = "lazy_static"
@ -229,9 +247,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
version = "0.2.109"
version = "0.2.112"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f98a04dce437184842841303488f70d0188c5f51437d2a834dc097eafa909a01"
checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125"
[[package]]
name = "lmdb-rkv"
@ -325,9 +343,9 @@ dependencies = [
[[package]]
name = "once_cell"
version = "1.8.0"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
[[package]]
name = "ordered-float"
@ -365,15 +383,9 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
[[package]]
name = "pkg-config"
version = "0.3.23"
version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1a3ea4f0dd7f1f3e512cf97bf100819aa547f36a6eccac8dbaae839eb92363e"
[[package]]
name = "ppv-lite86"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba"
checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe"
[[package]]
name = "proc-macro-hack"
@ -383,62 +395,22 @@ checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
[[package]]
name = "proc-macro2"
version = "1.0.33"
version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a"
checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
dependencies = [
"unicode-xid",
]
[[package]]
name = "quote"
version = "1.0.10"
version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
checksum = "47aa80447ce4daf1717500037052af176af5d38cc3e571d9ec1c7353fc10c87d"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rand"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8"
dependencies = [
"libc",
"rand_chacha",
"rand_core",
"rand_hc",
]
[[package]]
name = "rand_chacha"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core",
]
[[package]]
name = "rand_core"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
dependencies = [
"getrandom",
]
[[package]]
name = "rand_hc"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7"
dependencies = [
"rand_core",
]
[[package]]
name = "redox_syscall"
version = "0.2.10"
@ -482,24 +454,24 @@ dependencies = [
[[package]]
name = "ryu"
version = "1.0.6"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568"
checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f"
[[package]]
name = "serde"
version = "1.0.130"
version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913"
checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.130"
version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b"
checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537"
dependencies = [
"proc-macro2",
"quote",
@ -508,9 +480,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.72"
version = "1.0.75"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0ffa0837f2dfa6fb90868c2b5468cad482e175f7dad97e7421951e663f2b527"
checksum = "c059c05b48c5c0067d4b4b2b4f0732dd65feb52daf7e0ea09cd87e7dadc1af79"
dependencies = [
"itoa",
"ryu",
@ -519,9 +491,9 @@ dependencies = [
[[package]]
name = "syn"
version = "1.0.82"
version = "1.0.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59"
checksum = "a684ac3dcd8913827e18cd09a68384ee66c1de24157e3c556c9ab16d85695fb7"
dependencies = [
"proc-macro2",
"quote",
@ -530,13 +502,13 @@ dependencies = [
[[package]]
name = "tempfile"
version = "3.2.0"
version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
dependencies = [
"cfg-if",
"fastrand",
"libc",
"rand",
"redox_syscall",
"remove_dir_all",
"winapi",
@ -573,11 +545,12 @@ dependencies = [
[[package]]
name = "time"
version = "0.1.43"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438"
checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
dependencies = [
"libc",
"wasi",
"winapi",
]
@ -640,15 +613,15 @@ dependencies = [
[[package]]
name = "version_check"
version = "0.9.3"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "wasi"
version = "0.10.2+wasi-snapshot-preview1"
version = "0.10.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
[[package]]
name = "winapi"

View File

@ -12,7 +12,7 @@
[package]
edition = "2018"
name = "glean-core"
version = "42.3.0"
version = "43.0.2"
authors = ["Jan-Erik Rediger <jrediger@mozilla.com>", "The Glean Team <glean-team@mozilla.com>"]
include = ["/README.md", "/LICENSE", "/src", "/examples", "/tests", "/Cargo.toml"]
description = "A modern Telemetry library"
@ -21,7 +21,7 @@ keywords = ["telemetry"]
license = "MPL-2.0"
repository = "https://github.com/mozilla/glean"
[package.metadata.glean]
glean-parser = "4.3.1"
glean-parser = "4.4.0"
[dependencies.bincode]
version = "1.2.1"

View File

@ -20,14 +20,6 @@ pub struct AdditionalMetrics {
/// A count of the pings submitted, by ping type.
pub pings_submitted: LabeledMetric<CounterMetric>,
/// The number of times we encountered an invalid timezone offset
/// (outside of [-24, +24] hours).
///
/// **Note**: This metric has an expiration date set.
/// However because it's statically defined here we can't specify that.
/// Needs to be removed after 2021-06-30.
pub invalid_timezone_offset: CounterMetric,
}
impl CoreMetrics {
@ -101,15 +93,6 @@ impl AdditionalMetrics {
}),
None,
),
invalid_timezone_offset: CounterMetric::new(CommonMetricData {
name: "invalid_timezone_offset".into(),
category: "glean.time".into(),
send_in_pings: vec!["metrics".into()],
lifetime: Lifetime::Ping,
disabled: false,
dynamic_label: None,
}),
}
}
}

View File

@ -224,7 +224,7 @@ impl Glean {
let _scanning_thread = upload_manager.scan_pending_pings_directories();
}
let (start_time, start_time_is_corrected) = local_now_with_offset();
let start_time = local_now_with_offset();
let this = Self {
upload_enabled: cfg.upload_enabled,
// In the subprocess, we want to avoid accessing the database entirely.
@ -248,13 +248,6 @@ impl Glean {
schedule_metrics_pings: false,
};
// Can't use `local_now_with_offset_and_record` above, because we needed a valid `Glean` first.
if start_time_is_corrected {
this.additional_metrics
.invalid_timezone_offset
.add(&this, 1);
}
Ok(this)
}

View File

@ -62,7 +62,7 @@ fn experiment_id_and_branch_get_truncated_if_too_long() {
// Make sure the branch id was truncated as well.
let experiment_data = glean.test_get_experiment_data_as_json(expected_id);
assert!(
!experiment_data.is_none(),
experiment_data.is_some(),
"Experiment data must be available"
);
@ -101,7 +101,7 @@ fn limits_on_experiments_extras_are_applied_correctly() {
// Get the data
let experiment_data = glean.test_get_experiment_data_as_json(experiment_id);
assert!(
!experiment_data.is_none(),
experiment_data.is_some(),
"Experiment data must be available"
);
@ -401,7 +401,7 @@ fn correct_order() {
Counter(0),
CustomDistributionExponential(Histogram::exponential(1, 500, 10)),
CustomDistributionLinear(Histogram::linear(1, 500, 10)),
Datetime(local_now_with_offset().0, TimeUnit::Second),
Datetime(local_now_with_offset(), TimeUnit::Second),
Experiment(RecordedExperimentData { branch: "branch".into(), extra: None, }),
Quantity(0),
String("glean".into()),
@ -931,20 +931,3 @@ fn test_activity_api() {
// Check that we set everything we needed for the 'inactuve' status.
assert!(!glean.is_dirty_flag_set());
}
/// We explicitly test that NO invalid timezone offset was recorded.
/// If it _does_ happen and fails on a developer machine or CI, we better know about it.
#[test]
fn handles_local_now_gracefully() {
let _ = env_logger::builder().is_test(true).try_init();
let dir = tempfile::tempdir().unwrap();
let (glean, _) = new_glean(Some(dir));
let metric = &glean.additional_metrics.invalid_timezone_offset;
assert_eq!(
None,
metric.test_get_value(&glean, "metrics"),
"Timezones should be valid"
);
}

View File

@ -9,7 +9,7 @@ use crate::metrics::time_unit::TimeUnit;
use crate::metrics::Metric;
use crate::metrics::MetricType;
use crate::storage::StorageManager;
use crate::util::{get_iso_time_string, local_now_with_offset_and_record};
use crate::util::{get_iso_time_string, local_now_with_offset};
use crate::CommonMetricData;
use crate::Glean;
@ -117,7 +117,7 @@ impl DatetimeMetric {
return;
}
let value = value.unwrap_or_else(|| local_now_with_offset_and_record(glean));
let value = value.unwrap_or_else(local_now_with_offset);
let value = Metric::Datetime(value, self.time_unit);
glean.storage().record(glean, &self.meta, &value)
}

View File

@ -15,7 +15,7 @@ use crate::common_metric_data::{CommonMetricData, Lifetime};
use crate::metrics::{CounterMetric, DatetimeMetric, Metric, MetricType, PingType, TimeUnit};
use crate::storage::StorageManager;
use crate::upload::HeaderMap;
use crate::util::{get_iso_time_string, local_now_with_offset_and_record};
use crate::util::{get_iso_time_string, local_now_with_offset};
use crate::{
Glean, Result, DELETION_REQUEST_PINGS_DIRECTORY, INTERNAL_STORAGE, PENDING_PINGS_DIRECTORY,
};
@ -112,7 +112,7 @@ impl PingMaker {
let start_time_data = start_time
.get_value(glean, INTERNAL_STORAGE)
.unwrap_or_else(|| glean.start_time());
let end_time_data = local_now_with_offset_and_record(glean);
let end_time_data = local_now_with_offset();
// Update the start time with the current time.
start_time.set(glean, Some(end_time_data));

View File

@ -73,7 +73,7 @@ impl MetricsPingScheduler for GleanMetricsPingScheduler {
/// **Must** be called before draining the preinit queue.
/// (We're at the Language Bindings' mercy for that)
pub fn schedule(glean: &Glean) {
let now = local_now_with_offset().0;
let now = local_now_with_offset();
let (cancelled_lock, _condvar) = &**TASK_CONDVAR;
if *cancelled_lock.lock().unwrap() {
@ -233,7 +233,7 @@ fn start_scheduler(
submitter.submit_metrics_ping(&glean, Some(when.reason()), now);
when = When::Reschedule;
}
now = local_now_with_offset().0;
now = local_now_with_offset();
}
}).expect("Unable to spawn Metrics Ping Scheduler thread.")
}
@ -337,7 +337,7 @@ mod test {
|_, when| assert_eq!(when, When::Reschedule),
);
schedule_internal(&glean, submitter, scheduler, local_now_with_offset().0);
schedule_internal(&glean, submitter, scheduler, local_now_with_offset());
assert_eq!(1, submitter_count.swap(0, Ordering::Relaxed));
assert_eq!(1, scheduler_count.swap(0, Ordering::Relaxed));
}

View File

@ -171,7 +171,7 @@ impl PingDirectoryManager {
if let (Some(Ok(path)), Some(Ok(body)), Ok(metadata)) =
(lines.next(), lines.next(), lines.next().transpose())
{
let headers = metadata.map(|m| process_metadata(&path, &m)).flatten();
let headers = metadata.and_then(|m| process_metadata(&path, &m));
return Some((document_id.into(), path, body, headers));
} else {
log::warn!(

View File

@ -48,8 +48,7 @@ pub fn get_iso_time_string(datetime: DateTime<FixedOffset>, truncate_to: TimeUni
///
/// This converts from the `Local` timezone into its fixed-offset equivalent.
/// If a timezone outside of [-24h, +24h] is detected it corrects the timezone offset to UTC (+0).
/// The return value will signal if the timezone offset was corrected.
pub(crate) fn local_now_with_offset() -> (DateTime<FixedOffset>, bool) {
pub(crate) fn local_now_with_offset() -> DateTime<FixedOffset> {
#[cfg(target_os = "windows")]
{
// `Local::now` takes the user's timezone offset
@ -84,29 +83,12 @@ pub(crate) fn local_now_with_offset() -> (DateTime<FixedOffset>, bool) {
);
let now: DateTime<Utc> = Utc::now();
let utc_offset = FixedOffset::east(0);
return (now.with_timezone(&utc_offset), true);
return now.with_timezone(&utc_offset);
}
}
let now: DateTime<Local> = Local::now();
(now.with_timezone(now.offset()), false)
}
/// Get the current date & time with a fixed-offset timezone.
///
/// This converts from the `Local` timezone into its fixed-offset equivalent.
/// If a timezone outside of [-24h, +24h] is detected it corrects the timezone offset to UTC (+0).
/// The corresponding error counter is incremented in this case.
pub(crate) fn local_now_with_offset_and_record(glean: &Glean) -> DateTime<FixedOffset> {
let (now, is_corrected) = local_now_with_offset();
if is_corrected {
glean
.additional_metrics
.invalid_timezone_offset
.add(glean, 1);
}
now
now.with_timezone(now.offset())
}
/// Truncates a string, ensuring that it doesn't end in the middle of a codepoint.
@ -297,11 +279,7 @@ mod test {
#[test]
fn local_now_gets_the_time() {
let now = Local::now();
let (fixed_now, is_corrected) = local_now_with_offset();
// We explicitly test that NO invalid timezone offset was recorded.
// If it _does_ happen and fails on a developer machine or CI, we better know about it.
assert!(!is_corrected, "Timezone offset should be valid.");
let fixed_now = local_now_with_offset();
// We can't compare across differing timezones, so we just compare the UTC timestamps.
// The second timestamp should be just a few nanoseconds later.

View File

@ -354,7 +354,7 @@ fn the_accumulate_raw_samples_api_correctly_stores_timing_values() {
let seconds_to_nanos = 1000 * 1000 * 1000;
metric.accumulate_raw_samples_nanos(
&glean,
&[seconds_to_nanos, 2 * seconds_to_nanos, 3 * seconds_to_nanos].to_vec(),
[seconds_to_nanos, 2 * seconds_to_nanos, 3 * seconds_to_nanos].as_ref(),
);
let snapshot = metric

View File

@ -1 +1 @@
{"files":{"Cargo.toml":"2592f1c0a12f24250790a516f0c194543afa412205dab039dcbb9c5faba5e00e","LICENSE":"1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5","README.md":"bfe00cc2501c9b15d5bc463c6db30ebbf8d7b5d6c555cf3827ae529fc9e7d6cc","cbindgen.toml":"ac25d1bc2ab7d6afaf25cfa0d35233f93b01f7129088cdd1fa89b9d987a8c564","glean.h":"bbe571147f9fee34f7deac1057c541f00523317328e591446d4c96bbe84c99eb","src/boolean.rs":"0d1d59d0c13cdb63592a9513f2abcf3d1a8260d6523cc7d1af40cfcb4c75572a","src/byte_buffer.rs":"eeb6df25da7b393517f0c993e1e99a0acbccd7678b1127ce0e471d0e53a4bb45","src/counter.rs":"4d8f41285e4a9dbfa2733cdf937905006b475c0af7a501df73fde4ca77818e82","src/custom_distribution.rs":"b0b3b23289e413e7d150e8dae8217e6bd409cbbab68abb127f146041bcbfaf45","src/datetime.rs":"a5c1c993605b1a8ff044d88de4f4a385aff1a781cb8cb45573b90882da801fae","src/event.rs":"ef6dd4f0493ae223e4f7091d5779e46b33ea9864c2a4e5953811a7d9e8884c32","src/fd_logger.rs":"0f8197bb086f49413cca30a72bae029f663842fc3b78ceef6d0854a070b1cdfd","src/ffi_string_ext.rs":"389ae94dcdace1f56ca2c87207e865edda6d42da45733f1027e0a4dcfa86c492","src/from_raw.rs":"b17515a58d7e303ee746ea54c1c1c6d0523dc4de0bd8157dfaba2a610da637bb","src/handlemap_ext.rs":"3b1b088a2de197a0c3eaae0f2f0915d53602f51c13d27f48297f52cd885d5abc","src/jwe.rs":"72adff64900ca16d6527e8d6a436ac2ba85f738d6e92e33f3d71df32b485d0c3","src/labeled.rs":"9cc706511961dbe62350d62b39e9b2c3a9c9e9f53d5577274e273c0f826cd8c3","src/lib.rs":"b5bee8a36a3d0e32eaa01caad0ca57f8649b61b0f99cd3df1f697c27ec9fc47a","src/macros.rs":"e11614edb156552617354d7f6120c8e60ffeb6632ebc19d2b7c6c3e88523b01b","src/memory_distribution.rs":"08ef15e340f2e7ab2f4f83cd8e883c864d4affb94458e80198c106393bfb6bd8","src/ping_type.rs":"6401bcf4342ec1e4ba3782e2b67b3320aa96c9eddc03fc3c75ecc54e2f08a619","src/quantity.rs":"f72781ea642b5f7e363e9fecaded143d1afd772575603763543f1df3448ec337","src/string.rs":"199a238f3524eb36643d82b63df5c7f013adedb6af80632a2675f8562f34e692","src/string_list.rs":"12e2fbbdc08a1b8da1885fb14acd59ab27c8b598a24dc15a4eaca16636540a54","src/timespan.rs":"b7ac51dbfd5169d8c688c3fd2db51e38b6173c925ca14d7b0e8353f225b30a50","src/timing_distribution.rs":"4b5962729fb0b4c9ebf65a5fc5af105357652fcc282c6f8840f328452ba86ac6","src/upload.rs":"320c6e97df0a87040d2a269765401cd67da50f0a226c95a9a314f22452116f7c","src/url.rs":"2dfaf006cd4024ee07eb37dc312201b027d774f6c9881e556774cc09077a6290","src/uuid.rs":"c9ea7225fac53b55a8aeef39cd33470228c0a178185aa74b8fa652657994e404","src/weak.rs":"0199f4ef38d667f0b9f8ef3c5505ff15cd6e911bc83c27e7e9954fdffe1be0bb"},"package":"9e29c3f0b9dbde127254f375499df382d5fa9c3c2b33bfcb393485876fe79fb2"}
{"files":{"Cargo.toml":"c200013c760171403ce1aad530f51936b053f2db0e7d36c0a84b6d9068374968","LICENSE":"1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5","README.md":"bfe00cc2501c9b15d5bc463c6db30ebbf8d7b5d6c555cf3827ae529fc9e7d6cc","cbindgen.toml":"ac25d1bc2ab7d6afaf25cfa0d35233f93b01f7129088cdd1fa89b9d987a8c564","glean.h":"bbe571147f9fee34f7deac1057c541f00523317328e591446d4c96bbe84c99eb","src/boolean.rs":"0d1d59d0c13cdb63592a9513f2abcf3d1a8260d6523cc7d1af40cfcb4c75572a","src/byte_buffer.rs":"eeb6df25da7b393517f0c993e1e99a0acbccd7678b1127ce0e471d0e53a4bb45","src/counter.rs":"4d8f41285e4a9dbfa2733cdf937905006b475c0af7a501df73fde4ca77818e82","src/custom_distribution.rs":"b0b3b23289e413e7d150e8dae8217e6bd409cbbab68abb127f146041bcbfaf45","src/datetime.rs":"a5c1c993605b1a8ff044d88de4f4a385aff1a781cb8cb45573b90882da801fae","src/event.rs":"ef6dd4f0493ae223e4f7091d5779e46b33ea9864c2a4e5953811a7d9e8884c32","src/fd_logger.rs":"0f8197bb086f49413cca30a72bae029f663842fc3b78ceef6d0854a070b1cdfd","src/ffi_string_ext.rs":"389ae94dcdace1f56ca2c87207e865edda6d42da45733f1027e0a4dcfa86c492","src/from_raw.rs":"b17515a58d7e303ee746ea54c1c1c6d0523dc4de0bd8157dfaba2a610da637bb","src/handlemap_ext.rs":"3b1b088a2de197a0c3eaae0f2f0915d53602f51c13d27f48297f52cd885d5abc","src/jwe.rs":"72adff64900ca16d6527e8d6a436ac2ba85f738d6e92e33f3d71df32b485d0c3","src/labeled.rs":"9cc706511961dbe62350d62b39e9b2c3a9c9e9f53d5577274e273c0f826cd8c3","src/lib.rs":"b5bee8a36a3d0e32eaa01caad0ca57f8649b61b0f99cd3df1f697c27ec9fc47a","src/macros.rs":"e11614edb156552617354d7f6120c8e60ffeb6632ebc19d2b7c6c3e88523b01b","src/memory_distribution.rs":"08ef15e340f2e7ab2f4f83cd8e883c864d4affb94458e80198c106393bfb6bd8","src/ping_type.rs":"6401bcf4342ec1e4ba3782e2b67b3320aa96c9eddc03fc3c75ecc54e2f08a619","src/quantity.rs":"f72781ea642b5f7e363e9fecaded143d1afd772575603763543f1df3448ec337","src/string.rs":"199a238f3524eb36643d82b63df5c7f013adedb6af80632a2675f8562f34e692","src/string_list.rs":"12e2fbbdc08a1b8da1885fb14acd59ab27c8b598a24dc15a4eaca16636540a54","src/timespan.rs":"b7ac51dbfd5169d8c688c3fd2db51e38b6173c925ca14d7b0e8353f225b30a50","src/timing_distribution.rs":"4b5962729fb0b4c9ebf65a5fc5af105357652fcc282c6f8840f328452ba86ac6","src/upload.rs":"320c6e97df0a87040d2a269765401cd67da50f0a226c95a9a314f22452116f7c","src/url.rs":"2dfaf006cd4024ee07eb37dc312201b027d774f6c9881e556774cc09077a6290","src/uuid.rs":"c9ea7225fac53b55a8aeef39cd33470228c0a178185aa74b8fa652657994e404","src/weak.rs":"0199f4ef38d667f0b9f8ef3c5505ff15cd6e911bc83c27e7e9954fdffe1be0bb"},"package":"a33681c61cb007b4d4c19b3cac1a8e74b211f7afe88f179328c04a3bc72ec466"}

View File

@ -12,7 +12,7 @@
[package]
edition = "2018"
name = "glean-ffi"
version = "42.3.0"
version = "43.0.2"
authors = ["Jan-Erik Rediger <jrediger@mozilla.com>", "The Glean Team <glean-team@mozilla.com>"]
include = ["/README.md", "/LICENSE", "/src", "/tests", "/Cargo.toml", "/cbindgen.toml", "/glean.h"]
description = "FFI layer for Glean, a modern Telemetry library"
@ -28,7 +28,7 @@ crate-type = ["lib"]
version = "0.4.0"
[dependencies.glean-core]
version = "42.3.0"
version = "43.0.2"
[dependencies.log]
version = "0.4.8"

View File

@ -1 +1 @@
{"files":{"Cargo.toml":"8f777d1de11f0143f451977e300df83a66fef432819f377c2378710791fdec53","LICENSE":"1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5","README.md":"fd9e0ca6907917ea6bec5de05e15dd21d20fae1cb7f3250467bb20231a8e1065","src/common_test.rs":"bd7ab2f6384bea8971f97ba68b11c946899303891bc534898f7aabbf27f9008a","src/configuration.rs":"4acbedba16d45f6404ccedde86e8aa33eea8c1b9554210cb69c79ff2ec9040c9","src/core_metrics.rs":"0593192ec0fa1b4d267411cdfb75c70f78578083eca91f6e09cd08346de32264","src/dispatcher/global.rs":"460ccfec311163b469c54f63f4cb41e057b93421ccb7675e435c2994d478cd4b","src/dispatcher/mod.rs":"9f59e466fbbcc3e1bdc42659822a2a2c4b8250456858ee885e53b16458f4a47e","src/glean_metrics.rs":"d376e4f40ec620ce31667451a78adc1146213016e100c0d457505ec240ab31bf","src/lib.rs":"5ecf8102426bbfbd941a7e19bb79a65485a90d9842783a1940c42ebdec61e183","src/net/http_uploader.rs":"9e8c1837ca0d3f6ea165ec936ab054173c4fe95a958710176c33b4d4d1d98beb","src/net/mod.rs":"284bcf182156c52ea25fa33bcc48d80b4970ee3c187a4ea3a06602cc34c710bf","src/pings.rs":"02a3ddb4e77d2033fb5a8fc9bbec09ad5500691e0bd2a1db334805cba88670fd","src/private/boolean.rs":"eeadc0529e2c69a930479f208746799b064b27facab8306c1c10c650e83fb63c","src/private/counter.rs":"0bc8a2d0df72e47b7365ff80bfc16427a5da701fd0adadeedbcce13cebcd79ce","src/private/custom_distribution.rs":"6d1271fb91e9d51a8dcf5eb9d540b3757ebe9cc998b196943ed8c729f62afc67","src/private/datetime.rs":"cb8f26f74d318e2118d6ae1b15972557eb205d4d8b24795fb0d08fdea2bc3f56","src/private/denominator.rs":"95332737f3ac80346f4811440a2141cd427692819bd04d5d3ac7374299dc20b0","src/private/event.rs":"b674ceb85351b7989bd25ed4f5d98c5c9b31e2a03f13b054a8c0dbef54190e49","src/private/labeled.rs":"2cd90d132954ee3ada43ff1ad538072ba43eece7a53ed89811a2a7b43a4819f1","src/private/memory_distribution.rs":"8b78a0e33601081d76639445c8b4875a4fe7c3aded720bb43afdabe86e0fd6ee","src/private/mod.rs":"63368b123fecb6de210ec634b8d387799b4b9dd960016335ebc3c6851e81628f","src/private/numerator.rs":"334ac2ad3d8dd7b9f02f1ca5391b683d50fbc8c6728a12882a68bb067604c800","src/private/ping.rs":"915fc42994e0929656daee5511946ac1f56fe0d4d704e97e13795771d9890180","src/private/quantity.rs":"528675cd388010b89e6ac23c9152701c78d32c2dcd0b5e9abf1a50a52ee818a5","src/private/rate.rs":"7ddfdb3d5f2d1887b378caa3769ade92ea0fbd193f6e760f5f383c8b3e9f3aff","src/private/recorded_experiment_data.rs":"66b2601902a2dc2b7a283717c21ce754de94fcca30d12e0398195c8ad49c90af","src/private/string.rs":"c85ded40b1409793ae5b78da692bc2e708f8d55defb76ec5f515096d32f206c9","src/private/string_list.rs":"472ad79fba4b9bcde0ff5b3e05fd8e0aaa3d1d2941fc181faf2ceb90f1d518bd","src/private/timespan.rs":"19ed08aa5103b685a3a0b9f06f2c60250d55f3c8f36337f8c7bdbb2dfdb92786","src/private/timing_distribution.rs":"ee7fa0c3d5427e371b5413373cb1f5841ac10df9b7ca08316ef724e7ad3591d9","src/private/url.rs":"223de8a025e2f749255103402eecb5582961c2b5af7492e294362a0e8f55c414","src/private/uuid.rs":"2b69ddaf3978aaa31c625c0f3eb948c44369744334aacc6b5a2b217268d244a7","src/system.rs":"ff23a5b94f52dab484342dfed702412bc29ab1bbfd5af326033d8e07e7b9075f","src/test.rs":"0cbe4f51fa01b1ca04e4b726e8eb729c3504086bc6b0d644e2114a5a4473165a","tests/common/mod.rs":"4837df2e771929cc077e6fb9a9239645e8e0f7bc6c9f409b71c4d147edf334fc","tests/init_fails.rs":"1e832fe454962ddb1155d546bb71b6395aa9936f848ff0fbe88affaaab7dfae3","tests/never_init.rs":"1f33b8ce7ca3514b57b48cc16d98408974c85cf8aa7d13257ffc2ad878ebb295","tests/no_time_to_init.rs":"4d61e4196d8eef23f3bcb24b59bd0b0379c1f2cb50f03434a53996ab097bfb17","tests/overflowing_preinit.rs":"be7e9a7984162da33f17a5edae29e1e07e5d0b27e8830f7f32bb238a7e788638","tests/persist_ping_lifetime.rs":"adfab91baf978f464e265eae828fcc03aa6eef83422d3918ffb680b2c2ec859e","tests/persist_ping_lifetime_nopanic.rs":"92f4739b21c0d46cb368eafea43bfb822d8dee96412d5f4fc32e01636f0cf244","tests/schema.rs":"621caef0cc7f98c79740422835485fea2343ca105d0d9a7eec6ded9cfad6232c","tests/simple.rs":"2f58d3ff90005231f2febd21f66ee41d06302618408ea990b446510449c3444f"},"package":"34d40d192d10509d941937248fe4594d47617abf34496686c809cfdb31ae8506"}
{"files":{"Cargo.toml":"5bb22247135b1f2966f8045dc205b2559a95768507d3bee4b2d4e77fd071f446","LICENSE":"1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5","README.md":"fd9e0ca6907917ea6bec5de05e15dd21d20fae1cb7f3250467bb20231a8e1065","src/common_test.rs":"bd7ab2f6384bea8971f97ba68b11c946899303891bc534898f7aabbf27f9008a","src/configuration.rs":"4acbedba16d45f6404ccedde86e8aa33eea8c1b9554210cb69c79ff2ec9040c9","src/core_metrics.rs":"0593192ec0fa1b4d267411cdfb75c70f78578083eca91f6e09cd08346de32264","src/dispatcher/global.rs":"460ccfec311163b469c54f63f4cb41e057b93421ccb7675e435c2994d478cd4b","src/dispatcher/mod.rs":"9f59e466fbbcc3e1bdc42659822a2a2c4b8250456858ee885e53b16458f4a47e","src/glean_metrics.rs":"d376e4f40ec620ce31667451a78adc1146213016e100c0d457505ec240ab31bf","src/lib.rs":"5ecf8102426bbfbd941a7e19bb79a65485a90d9842783a1940c42ebdec61e183","src/net/http_uploader.rs":"9e8c1837ca0d3f6ea165ec936ab054173c4fe95a958710176c33b4d4d1d98beb","src/net/mod.rs":"284bcf182156c52ea25fa33bcc48d80b4970ee3c187a4ea3a06602cc34c710bf","src/pings.rs":"02a3ddb4e77d2033fb5a8fc9bbec09ad5500691e0bd2a1db334805cba88670fd","src/private/boolean.rs":"eeadc0529e2c69a930479f208746799b064b27facab8306c1c10c650e83fb63c","src/private/counter.rs":"0bc8a2d0df72e47b7365ff80bfc16427a5da701fd0adadeedbcce13cebcd79ce","src/private/custom_distribution.rs":"6d1271fb91e9d51a8dcf5eb9d540b3757ebe9cc998b196943ed8c729f62afc67","src/private/datetime.rs":"cb8f26f74d318e2118d6ae1b15972557eb205d4d8b24795fb0d08fdea2bc3f56","src/private/denominator.rs":"95332737f3ac80346f4811440a2141cd427692819bd04d5d3ac7374299dc20b0","src/private/event.rs":"b674ceb85351b7989bd25ed4f5d98c5c9b31e2a03f13b054a8c0dbef54190e49","src/private/labeled.rs":"2cd90d132954ee3ada43ff1ad538072ba43eece7a53ed89811a2a7b43a4819f1","src/private/memory_distribution.rs":"8b78a0e33601081d76639445c8b4875a4fe7c3aded720bb43afdabe86e0fd6ee","src/private/mod.rs":"63368b123fecb6de210ec634b8d387799b4b9dd960016335ebc3c6851e81628f","src/private/numerator.rs":"334ac2ad3d8dd7b9f02f1ca5391b683d50fbc8c6728a12882a68bb067604c800","src/private/ping.rs":"915fc42994e0929656daee5511946ac1f56fe0d4d704e97e13795771d9890180","src/private/quantity.rs":"528675cd388010b89e6ac23c9152701c78d32c2dcd0b5e9abf1a50a52ee818a5","src/private/rate.rs":"7ddfdb3d5f2d1887b378caa3769ade92ea0fbd193f6e760f5f383c8b3e9f3aff","src/private/recorded_experiment_data.rs":"66b2601902a2dc2b7a283717c21ce754de94fcca30d12e0398195c8ad49c90af","src/private/string.rs":"c85ded40b1409793ae5b78da692bc2e708f8d55defb76ec5f515096d32f206c9","src/private/string_list.rs":"472ad79fba4b9bcde0ff5b3e05fd8e0aaa3d1d2941fc181faf2ceb90f1d518bd","src/private/timespan.rs":"19ed08aa5103b685a3a0b9f06f2c60250d55f3c8f36337f8c7bdbb2dfdb92786","src/private/timing_distribution.rs":"ee7fa0c3d5427e371b5413373cb1f5841ac10df9b7ca08316ef724e7ad3591d9","src/private/url.rs":"223de8a025e2f749255103402eecb5582961c2b5af7492e294362a0e8f55c414","src/private/uuid.rs":"2b69ddaf3978aaa31c625c0f3eb948c44369744334aacc6b5a2b217268d244a7","src/system.rs":"ff23a5b94f52dab484342dfed702412bc29ab1bbfd5af326033d8e07e7b9075f","src/test.rs":"0cbe4f51fa01b1ca04e4b726e8eb729c3504086bc6b0d644e2114a5a4473165a","tests/common/mod.rs":"4837df2e771929cc077e6fb9a9239645e8e0f7bc6c9f409b71c4d147edf334fc","tests/init_fails.rs":"1e832fe454962ddb1155d546bb71b6395aa9936f848ff0fbe88affaaab7dfae3","tests/never_init.rs":"1f33b8ce7ca3514b57b48cc16d98408974c85cf8aa7d13257ffc2ad878ebb295","tests/no_time_to_init.rs":"4d61e4196d8eef23f3bcb24b59bd0b0379c1f2cb50f03434a53996ab097bfb17","tests/overflowing_preinit.rs":"be7e9a7984162da33f17a5edae29e1e07e5d0b27e8830f7f32bb238a7e788638","tests/persist_ping_lifetime.rs":"adfab91baf978f464e265eae828fcc03aa6eef83422d3918ffb680b2c2ec859e","tests/persist_ping_lifetime_nopanic.rs":"92f4739b21c0d46cb368eafea43bfb822d8dee96412d5f4fc32e01636f0cf244","tests/schema.rs":"621caef0cc7f98c79740422835485fea2343ca105d0d9a7eec6ded9cfad6232c","tests/simple.rs":"2f58d3ff90005231f2febd21f66ee41d06302618408ea990b446510449c3444f"},"package":"5eee21709bc0417a5e2b8ea436717bba01c6851111d3ac096994efa73bb79dab"}

View File

@ -12,7 +12,7 @@
[package]
edition = "2018"
name = "glean"
version = "42.3.0"
version = "43.0.2"
authors = ["Jan-Erik Rediger <jrediger@mozilla.com>", "The Glean Team <glean-team@mozilla.com>"]
include = ["/README.md", "/LICENSE", "/src", "/tests", "/Cargo.toml"]
description = "Glean SDK Rust language bindings"
@ -28,7 +28,7 @@ features = ["serde"]
version = "0.5"
[dependencies.glean-core]
version = "42.3.0"
version = "43.0.2"
[dependencies.inherent]
version = "0.1.4"

View File

@ -6,7 +6,7 @@ edition = "2018"
license = "MPL-2.0"
[dependencies]
glean = { version = "42.3.0", features = ["rkv-safe-mode"] }
glean = { version = "43.0.2", features = ["rkv-safe-mode"] }
# In theory we only need this for `target_os = "android"` builds.
# Cargo has the ability to do that with `[target.'cfg(target_os = "android")'.dependencies]`.
# However that seems to confuse `cbindgen` quite a lot;
@ -15,7 +15,7 @@ glean = { version = "42.3.0", features = ["rkv-safe-mode"] }
# So for now we unconditionally depend on it, but in the code we only `extern crate` it on Android builds.
# While `glean-ffi` is still built (I think it is),
# it's not linked into the final library.
glean-ffi = "42.3.0"
glean-ffi = "43.0.2"
log = "0.4"
nserror = { path = "../../../xpcom/rust/nserror" }
nsstring = { path = "../../../xpcom/rust/nsstring" }

View File

@ -8,7 +8,7 @@ publish = false
[dependencies]
bincode = "1.0"
chrono = "0.4.10"
glean = "42.3.0"
glean = "43.0.2"
inherent = "0.1.4"
log = "0.4"
nsstring = { path = "../../../../xpcom/rust/nsstring", optional = true }