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

26 Коммитов

Автор SHA1 Сообщение Дата
Herraj Luhano 902e80c57d
fix(schemas): Allow firefoxLabsTitle and firefoxLabsDescription to be null in json schema (#11750)
Because

- Json schemas were incorrectly failing validation on `firefoxLabsTitle`
and `firefoxLabsDescription` fields. We need to allow them to be `null`
(omitted).

This commit

- Updates `DesktopNimbusExperiment` and `DesktopNimbusExperiment`
classes' fields mentioned above.
- Updates schema version.
- Generates new TS schema.
- Adds new test (fixture) for this use case.

Fixes #11749
2024-11-12 19:42:20 +00:00
Beth Rennie 13cd532967
bug(schemas): Match the placeholder feature ID to Experimenter (#11718)
Because:

- Experimenter uses a different placeholder feature ID than the
specified in the schemas; and
- using the new split schema in Firefox Desktop would break the world

This commit:

- splits the Firefox Desktop schema into two versions: a strict,
backwards-compatible version (one that enforces the branches[].feature
field is present), and a more lax client version (that does not require
the branches[].feature field);
- updates the strict schema to use the correct placeholder feature ID;
- updates all the fixtures to use the correct placeholder;
- updates all the tests to test against both the strict and lax schemas;
and
- updates the schemas package to 2024.11.4.

Fixes #11717
2024-11-12 16:55:55 +00:00
Beth Rennie 4b23a0ad7d
feat(schemas): Split experiment schema into Firefox Desktop and SDK-specific versions (#11716)
Because:

- our current pan-application schema currently allows SDK experiments to
validate on Firefox Desktop (because there is no conditional validation
enforcing a relationship between the application field and the branches
field);
- we no longer publish single feature experiments; and
- we no longer support applications that do not support multi-feature
experiments.

This commit:

- splits our NimbusExperiment schema into a DesktopNimbusExperiment and
an SdkNimbusExperiment;
- removes support for mono-feature experiments from both Desktop and SDK
experiment schemas;
- removes some old, mono-feature fixtures that do not validate with our
new schemas; and
- bumps the schemas package version to 2024.11.3 to publish these
changes.

Fixes #11704
2024-11-07 19:52:25 +00:00
Herraj Luhano 6552a3f1f3
fix(schemas): Make firefoxLabsTitle not required for desktop branch schema (#11705)
Because

- We found a bug where the `firefoxLabsTitle` field was set as required
on the `ExperimentMultiFeatureDesktopBranch` class.

This commit

- Updates the `firefoxLabsTitle` field on the above class to use
`default=None`.
- Updates schema version to `2024.11.2`.
- Updates TS schema

Fixes #11701
2024-11-06 16:52:34 +00:00
Beth Rennie ad39342a4e
feat(schemas): pull out NimbusExperiment.localizations into a schema model (#11677)
Because:

- we previously were using the generated JSONSchema definition of the
localizations field to validate it in Experimenter; and
- we now have pydantic v2 in Experimenter

This commit:

- pulls out the localizations field into a separate model so that we can
use that for valdiation directly in Experimenter; and
- bumps the version to 2024.11.1

Fixes #11673
2024-11-01 19:31:47 +00:00
Herraj Luhano 0285f58d1c
feat(schema): Add schema changes for firefox labs (#11636)
Because

- We need to update the Nimbus Experiment schema with Firefox Labs
relevant fields.

This commit

- Updates `NimbusExperiment` class in the `experiments.py` module with
these optional fields `isFirefoxLabsOptIn`, `firefoxLabsTitle`,
`firefoxLabsDescription`.
- Updates `ExperimentMultiFeatureDesktopBranch` class in the
`experiments.py` module with the optional field `firefoxLabsTitle`.
- Adds relevant generated json and TS schemas.
- Updates and adds unit tests for `NimbusExperiment`.
- Adds fixtures(json) for the above tests.

Fixes #[11562](https://github.com/mozilla/experimenter/issues/11562)
2024-10-30 17:14:15 +00:00
Beth Rennie be67f0b808
feat(schemas): generate .schema.json files for Experimenter and Feature Manifest schemas (#11519)
Because:

- we need the .schema.json files in Desktop;
- they are not currently packaged into either the NPM or PyPI packages;
  and
- the generated schemas do not include the custom validation logic
  expressed by Pydantic validators

This commit:

- adds JSON schema validation via Pydantic's json_schema_extra hook to
  give the JSON schemas validation parity with the Pydantic models and
  existing JSON schemas in Desktop;
- generates the JSON schemas and commits them (in schemas/schemas);
- packages the produced schemas into the NPM package;
- packages the produced schemas into the PyPI package (but uncommitted,
  since they are duplicates);
- revises the Makefile build steps for schema package generation; and
- bumps the schema package version.

Fixes #11518
2024-10-18 20:30:05 +00:00
Mike Williams 0a4a4e81b2
chore(schemas): upgrade twine to fix publishing error (#11333)
Because

- last publish of schemas package to PyPI failed
- failure appears to be related to a bug documented in twine that was
fixed in the latest version

This commit

- upgrades to the latest 5.1.1 version
- bumps version of schemas so it will be published

Fixes #11331
2024-09-09 21:55:11 +00:00
Mike Williams a65feef108
chore(schemas): update to pydantic v2 (#11304)
Because

- the schemas package is used by a lot of data tooling
- the data tooling is starting to complain about schemas requiring
pydantic v1 due to other dependencies
- the pydantic-to-typescript package is outdated and does not support
pydantic v2

This commit

- updates the schemas package to v2
- changes the typescript generation to a script internal to experimenter

Fixes #11214
2024-09-09 18:26:28 +00:00
Mike Williams 9d7f33ade6
chore(schemas): remove unused field from Statistic (#11288)
Because

- we added p_value to Statistic but never had time to follow up with
using it
- Jetstream would need to update to add this field to the results schema
- we don't foresee being able to do anything with this anytime soon
- it's easy to add back if we ever get around to using it

This commit

- remove p_value from Statistic

Fixes #11287
2024-09-05 16:55:30 +00:00
Mike Williams 8128e2e593
chore(schemas): use python 3.10 in schemas package (#11267)
Because

- analysis tooling is using python 3.10
- schemas package is using 3.11
- analysis tooling relies on schemas package

This commit

- downgrades schemas package to bring them in sync on python 3.10

Fixes #11266
2024-08-30 18:59:45 +00:00
Mike Williams c6151e23a3
chore(schemas): create RandomizationUnit enum (#11245)
Because

- randomization unit is configurable
- new profile mgmt feature requires jetstream to behave differently
depending on the randomization unit
- randomization unit options are defined in Experimenter where Jetstream
can't use them
- we don't want to redefined the options in multiple places

This commit

- adds randomization unit enum to schemas package so it can be used by
both Experimenter and Jetstream

Fixes #11244
2024-08-27 20:30:47 +00:00
Mike Williams 1ce553a1e7
feat(schemas): add 'all' usertype for pop sizing schemas (#10930)
Because

- we added "all" as a possible user type in precomputed pop sizing data

This commit

- adds "all" as an option to the SizingUserType enum

Fixes #10929
2024-07-02 17:26:12 +00:00
Mike Williams e434071f8f
feat(schemas): add version info to jetstream metadata schema (#10451)
Because

- we want to export metric and image version metadata from jetstream
(https://github.com/mozilla/jetstream/issues/1786)
- schemas_build make command was confusing

This commit

- adds config version to the jetstream metadata schema
- makes schemas_build do the npm and pypi builds

Fixes #10450
Fixes #10080
2024-03-25 15:08:55 +00:00
Barret Rennie 7f604d3a72
feat(schemas): Support new setPref format for Firefox Desktop (#10116)
Because

- Desktop changed the format of setPref in [bug
1875404](https://bugzilla.mozilla.org/show_bug.cgi?id=1875404)

This commit

- updates the feature manifest schema to support the new setPref format.

Fixes #10079
2024-01-23 16:13:00 +00:00
Mike Williams 709f09f7a7
chore(schemas): add dupe validation to jetstream stat results schema (#10044)
Because

- we want to ensure that Jetstream doesn't publish duplicate results

This commit

- adds validation to the schema to check for duplicate results
- bumps schemas package to version `2024.1.3`

Fixes #10043
2024-01-16 14:10:59 +00:00
Daniel Berry c587fbb70e
Update statistics.py (#10007)
Adds field to statistics schema

Because

- It would be useful to data scientists if Jetstream results contained
p-values

This commit

- Adds p-values to the shared schemas

Fixes #github_issue_number
2024-01-08 18:17:30 +00:00
Mike Williams 8fd4249712
feat(schemas): add results ingestion enums to schemas package (#10003)
Because

- Some of these enums could be useful in the UI as typescript types

This commit

- Copies the enums defined in Experimenter's Jetstream results ingestion
client to the schemas package

Fixes #10001
2024-01-08 17:34:34 +00:00
Jared Lockhart bba7fd789b
fix #9271 chore(project): dockerize schemas (#9616)
Because

* As we add a wider variety of elements to the Nimbus project including
binary packages it becomes increasingly important to have a consistent
environment for each of our modules
* Using Docker allows us to control the environment each module runs in
and use a consistent base layer
* Dockerizing the schemas package will allow us to use identical Python,
Node, and Rust environments as the other modules in Nimbus

This commit

* Wraps the schemas module in a Dockerfile that is consistent with the
other modules in Nimbus
2023-10-24 20:30:55 +00:00
Barret Rennie 2647828c6c
bug(nimbus): Refactor FeatureManifest schema (#9598)
Because:
- the feature schema was causing superfluous errors that weren't really
  errors (e.g., complaining that has_exposure must be true/false) when
  running into real errors; and
- the hasExposure field is required by desktop;

This commit:
- adds a new Feature type which is a discriminated union, which will
  prevent these errors; and
- marks the hasExposure field as a required field.
2023-10-17 17:17:28 +00:00
Barret Rennie 08df3df27b
Add schemas for feature manifests (#9574)
Because

- the feature manifest schema is used in Experimenter and desktop;
- there are bugs in the schema (e.g., the definition of hasExposure);
  and
- the field names in the Python definition are not pythonic

This commit

- adds a copy of the schema from experimenter/features to
  mozilla_nimbus_schemas;
- updates the field names with aliases to be more pythonic; and
- adds a unit test to validate all vendored manifests.
2023-10-12 17:02:15 +00:00
Mike Williams 2d67438b19
fix #9437 feat(schemas): add languages to pop sizing schema (#9438)
Because

- mobile experiments use language instead of locale

This commit

- adds languages to the recipe schema for pop sizing data
2023-09-19 16:41:06 +00:00
Jared Lockhart 7a40728d8b
fix #9359 feat(schemas): add experiment schema to nimbus schemas (#9361)
Because

* We now have the mozilla-nimbus-schemas package for storing all Nimbus
related schemas
* We should add the experiment schema there and update all components to
use it

This commit

* Adds the Nimbus experiment schema to the nimbus schemas package
* Adds all existing test fixtures from shared
2023-09-06 17:30:08 +00:00
Mike Williams c73c47c683
fix #9339 bug(schemas): include proper types filename in npm package (#9340)
Because

- I changed the name of the generated types file to be consistent with
normal TS type filenames (`*.d.ts`)
- I forgot to reference the new filename in the package.json

This commit

- uses the new filename in the package.json
- bumps schemas version so it will be published
2023-09-01 20:32:37 +00:00
Mike Williams add7dd7cf9
fix #9323 feat(schemas): add new source field to analysis errors schema (#9324)
Because

- Both auto-sizing and jetstream use the same logs table
- auto-sizing and jetstream logs will be differentiated by a new
`source` column

This commit

- adds the `source` column to the schema
2023-08-30 15:35:58 +00:00
Mike Williams 60d6c69389
fix #9156 feat(schemas): typescript schema generation and npm publish (#9157)
Because

- we want to use the population sizing schemas for graphql and UI

This commit

- sets up generation of typescript schemas from the pydantic schemas
- sets up publishing the typescript schemas to npm
2023-08-11 20:56:49 +00:00