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

213 Коммитов

Автор SHA1 Сообщение Дата
Beth Rennie 525c1398d8
chore(project): docker run with --rm (#11664)
Because:

- we are creating many short-lived containers for commands; and
- we are not cleaning them up except in `make kill`

This commit:

- updates all docker run commands to use the `--rm` flag so that they
are automatically deleted after the container exits.

Fixes #11662
2024-11-08 19:47:05 +00:00
Beth Rennie f4f2972162
feat(project): add a make refresh_db target (#11663)
Because:

- make refresh does rebuild the DB but also blows away all containers;
and
- I just want to rebuild the DB

This commit:

- adds a make refresh_db (which refresh depends on) that will just
recreate the database.

Fixes #11661
2024-10-31 19:49:37 +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
Benjamin Forehand Jr d88e155a02
chore(ci): Modify integration test script to install firefox desktop from stored key. (#11412)
Because

- We added the capability to track and store what version of firefox
release is current for use in our integration tests

This commit

- Follows on from that to modify the script so that it will download and
install that specific version

Fixes #11411
2024-09-20 18:35:35 +00:00
Mohamed Mahmoud 013f8cf0b7
fix(cirrus): Run cirrus pytest in verbose mode (#11362)
Because

- To make it easier to identify failing tests

This commit

- make cirrus pytest tests run in verbose mode

Fixes #9148

Co-authored-by: mosaadm <mohamed.mahmoud@toptal.com>
2024-09-13 15:43:17 +00:00
Benjamin Forehand Jr a85f1354bc
chore(ci): Add steps to download firefox beta build for testing from specific tasks. (#11312)
Because

- We are now able to trigger builds based on changes made to Firefox
Beta on mozilla-central. How ever, we weren't using the firefox images
from those tasks.

This commit

- Allows us to run the firefox beta tests against the recently built
version of Firefox Beta.

Fixes #11311
2024-09-09 19:08:47 +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
Rana Al-Khulaidi 2a4388b2f3
feat(project): Retrieve metric-hub segments in Experimenter (#11243)
Because

* Experimenter needs to retrieve the segments from metric-hub as they
are currently not available there

This commit

* allows Experimenter to retrieve segments from metric-hub

Fixes #11242
2024-08-30 16:42:38 +00:00
Benjamin Forehand Jr 46dd3aee06
chore(project): Change fenix integration tests to run off of upstream trigger. (#11233)
Because

- We want to run certain jobs based on external dependency changes as
they happen.

This commit

- Changes the fenix integration and enrollment tests to run when a
change has been detected within fenix.

Fixes #11230
2024-08-27 20:41:33 +00:00
Yashika Khurana dd543fadcb
feat(cirrus): Nimbus preview flag to return features based on preview experiments (#10998)
Because

- QA should be able to test web experiments on the prod of the
implementing application

This commit

- Supports Cirrus to handle the `nimbus_preview` flag so that it should
return a response based on the preview records

Fixes #10953

---------

Co-authored-by: Jared Lockhart <119884+jaredlockhart@users.noreply.github.com>
2024-07-24 16:48:06 +00:00
Jared Lockhart ac6b7c0060
bug(nimbus): update ruff fix command (#10993)
Because

* Ruff deprecated the `ruff <path>` interface for `ruff check <path>`
* We updated the check call but not the fix call

This commit

* Updates the ruff fix call in the Makefile to use the `ruff check
--fix` interface

fixes #10990
2024-07-11 16:35:27 +00:00
dependabot[bot] 11a3827d11
chore(deps-dev): Bump ruff from 0.4.1 to 0.5.0 in /schemas (#10927)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.4.1 to 0.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.5.0</h2>
<h2>Release Notes</h2>
<p>Check out the <a href="https://astral.sh/blog/ruff-v0.5.0">blog
post</a> for a migration guide and overview of the changes!</p>
<h3>Breaking changes</h3>
<p>See also, the &quot;Remapped rules&quot; section which may result in
disabled rules.</p>
<ul>
<li>Follow the XDG specification to discover user-level configurations
on macOS (same as on other Unix platforms)</li>
<li>Selecting <code>ALL</code> now excludes deprecated rules</li>
<li>The released archives now include an extra level of nesting, which
can be removed with <code>--strip-components=1</code> when
untarring.</li>
<li>The release artifact's file name no longer includes the version tag.
This enables users to install via <code>/latest</code> URLs on
GitHub.</li>
<li>The diagnostic ranges for some <code>flake8-bandit</code> rules were
modified (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10667">#10667</a>).</li>
</ul>
<h3>Deprecations</h3>
<p>The following rules are now deprecated:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/syntax-error/"><code>syntax-error</code></a>
(<code>E999</code>): Syntax errors are now always shown</li>
</ul>
<h3>Remapped rules</h3>
<p>The following rules have been remapped to new rule codes:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-http-call-in-async-function/"><code>blocking-http-call-in-async-function</code></a>:
<code>ASYNC100</code> to <code>ASYNC210</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/open-sleep-or-subprocess-in-async-function/"><code>open-sleep-or-subprocess-in-async-function</code></a>:
<code>ASYNC101</code> split into <code>ASYNC220</code>,
<code>ASYNC221</code>, <code>ASYNC230</code>, and
<code>ASYNC251</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-os-call-in-async-function/"><code>blocking-os-call-in-async-function</code></a>:
<code>ASYNC102</code> has been merged into <code>ASYNC220</code> and
<code>ASYNC221</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-timeout-without-await/"><code>trio-timeout-without-await</code></a>:
<code>TRIO100</code> to <code>ASYNC100</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-sync-call/"><code>trio-sync-call</code></a>:
<code>TRIO105</code> to <code>ASYNC105</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-async-function-with-timeout/"><code>trio-async-function-with-timeout</code></a>:
<code>TRIO109</code> to <code>ASYNC109</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-unneeded-sleep/"><code>trio-unneeded-sleep</code></a>:
<code>TRIO110</code> to <code>ASYNC110</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-zero-sleep-call/"><code>trio-zero-sleep-call</code></a>:
<code>TRIO115</code> to <code>ASYNC115</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/repeated-isinstance-calls/"><code>repeated-isinstance-calls</code></a>:
<code>PLR1701</code> to <code>SIM101</code></li>
</ul>
<h3>Stabilization</h3>
<p>The following rules have been stabilized and are no longer in
preview:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/mutable-fromkeys-value/"><code>mutable-fromkeys-value</code></a>
(<code>RUF024</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/default-factory-kwarg/"><code>default-factory-kwarg</code></a>
(<code>RUF026</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/django-extra/"><code>django-extra</code></a>
(<code>S610</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/manual-dict-comprehension/"><code>manual-dict-comprehension</code></a>
(<code>PERF403</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/print-empty-string/"><code>print-empty-string</code></a>
(<code>FURB105</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/readlines-in-for/"><code>readlines-in-for</code></a>
(<code>FURB129</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/if-expr-min-max/"><code>if-expr-min-max</code></a>
(<code>FURB136</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/bit-count/"><code>bit-count</code></a>
(<code>FURB161</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/redundant-log-base/"><code>redundant-log-base</code></a>
(<code>FURB163</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/regex-flag-alias/"><code>regex-flag-alias</code></a>
(<code>FURB167</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/isinstance-type-none/"><code>isinstance-type-none</code></a>
(<code>FURB168</code>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.5.0</h2>
<p>Check out the <a href="https://astral.sh/blog/ruff-v0.5.0">blog
post</a> for a migration guide and overview of the changes!</p>
<h3>Breaking changes</h3>
<p>See also, the &quot;Remapped rules&quot; section which may result in
disabled rules.</p>
<ul>
<li>Follow the XDG specification to discover user-level configurations
on macOS (same as on other Unix platforms)</li>
<li>Selecting <code>ALL</code> now excludes deprecated rules</li>
<li>The released archives now include an extra level of nesting, which
can be removed with <code>--strip-components=1</code> when
untarring.</li>
<li>The release artifact's file name no longer includes the version tag.
This enables users to install via <code>/latest</code> URLs on
GitHub.</li>
<li>The diagnostic ranges for some <code>flake8-bandit</code> rules were
modified (<a
href="https://redirect.github.com/astral-sh/ruff/pull/10667">#10667</a>).</li>
</ul>
<h3>Deprecations</h3>
<p>The following rules are now deprecated:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/syntax-error/"><code>syntax-error</code></a>
(<code>E999</code>): Syntax errors are now always shown</li>
</ul>
<h3>Remapped rules</h3>
<p>The following rules have been remapped to new rule codes:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-http-call-in-async-function/"><code>blocking-http-call-in-async-function</code></a>:
<code>ASYNC100</code> to <code>ASYNC210</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/open-sleep-or-subprocess-in-async-function/"><code>open-sleep-or-subprocess-in-async-function</code></a>:
<code>ASYNC101</code> split into <code>ASYNC220</code>,
<code>ASYNC221</code>, <code>ASYNC230</code>, and
<code>ASYNC251</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-os-call-in-async-function/"><code>blocking-os-call-in-async-function</code></a>:
<code>ASYNC102</code> has been merged into <code>ASYNC220</code> and
<code>ASYNC221</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-timeout-without-await/"><code>trio-timeout-without-await</code></a>:
<code>TRIO100</code> to <code>ASYNC100</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-sync-call/"><code>trio-sync-call</code></a>:
<code>TRIO105</code> to <code>ASYNC105</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-async-function-with-timeout/"><code>trio-async-function-with-timeout</code></a>:
<code>TRIO109</code> to <code>ASYNC109</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-unneeded-sleep/"><code>trio-unneeded-sleep</code></a>:
<code>TRIO110</code> to <code>ASYNC110</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/trio-zero-sleep-call/"><code>trio-zero-sleep-call</code></a>:
<code>TRIO115</code> to <code>ASYNC115</code></li>
<li><a
href="https://docs.astral.sh/ruff/rules/repeated-isinstance-calls/"><code>repeated-isinstance-calls</code></a>:
<code>PLR1701</code> to <code>SIM101</code></li>
</ul>
<h3>Stabilization</h3>
<p>The following rules have been stabilized and are no longer in
preview:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/mutable-fromkeys-value/"><code>mutable-fromkeys-value</code></a>
(<code>RUF024</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/default-factory-kwarg/"><code>default-factory-kwarg</code></a>
(<code>RUF026</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/django-extra/"><code>django-extra</code></a>
(<code>S610</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/manual-dict-comprehension/"><code>manual-dict-comprehension</code></a>
(<code>PERF403</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/print-empty-string/"><code>print-empty-string</code></a>
(<code>FURB105</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/readlines-in-for/"><code>readlines-in-for</code></a>
(<code>FURB129</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/if-expr-min-max/"><code>if-expr-min-max</code></a>
(<code>FURB136</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/bit-count/"><code>bit-count</code></a>
(<code>FURB161</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/redundant-log-base/"><code>redundant-log-base</code></a>
(<code>FURB163</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/regex-flag-alias/"><code>regex-flag-alias</code></a>
(<code>FURB167</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/isinstance-type-none/"><code>isinstance-type-none</code></a>
(<code>FURB168</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/type-none-comparison/"><code>type-none-comparison</code></a>
(<code>FURB169</code>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="244b923f61"><code>244b923</code></a>
Add necessary permissions for cargo-dist Docker build (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12072">#12072</a>)</li>
<li><a
href="a8b48fce7e"><code>a8b48fc</code></a>
Release v0.5.0 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12068">#12068</a>)</li>
<li><a
href="04c8597b8a"><code>04c8597</code></a>
[<code>flake8-simplify</code>] Stabilize detection of Yoda conditions
for &quot;constant&quot; col...</li>
<li><a
href="4029a25ebd"><code>4029a25</code></a>
[Ruff v0.5] Stabilise 15 pylint rules (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12051">#12051</a>)</li>
<li><a
href="0917ce16f4"><code>0917ce1</code></a>
Update documentation to mention <code>etcetera</code> crate instead of
<code>dirs</code> for user c...</li>
<li><a
href="22cebdf29b"><code>22cebdf</code></a>
Add server config to filter out syntax error diagnostics (<a
href="https://redirect.github.com/astral-sh/ruff/issues/12059">#12059</a>)</li>
<li><a
href="72b6c26101"><code>72b6c26</code></a>
Simplify <code>LinterResult</code>, avoid cloning
<code>ParseError</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11903">#11903</a>)</li>
<li><a
href="73851e73ab"><code>73851e7</code></a>
Avoid displaying syntax error as log message (<a
href="https://redirect.github.com/astral-sh/ruff/issues/11902">#11902</a>)</li>
<li><a
href="e7b49694a7"><code>e7b4969</code></a>
Remove <code>E999</code> as a rule, disallow any disablement methods for
syntax error (#...</li>
<li><a
href="c98d8a040f"><code>c98d8a0</code></a>
[<code>pyflakes</code>] Stabilize detection of is comparisons to lists,
etc. (<code>F632</code>) (#...</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.4.1...0.5.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.4.1&new-version=0.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jared Lockhart <119884+jaredlockhart@users.noreply.github.com>
2024-07-03 20:32:25 +00:00
Benjamin Forehand Jr 0f1f843dd0
chore(tests): Change integration test suite to use poetry (#10908)
Because

- We use poetry for most other package management

This commit

- Updates our integration tests to use poetry too.

Fixes #10907
2024-06-26 19:10:13 +00:00
Benjamin Forehand Jr a7b0b08a9b
test(nimbus): Add android e2e test config. (#10844)
Because

It would be awesome to extend our coverage to android devices to make
sure those stay healthy.

This commit

* Adds a job to build the fenix test APKs from mozilla central.
* Adds a job to run a small suite of tests on fenix

Fixes #10843
2024-06-24 18:56:10 +00:00
Jared Lockhart 7b3dce9a3a
chore(nimbus): setup webpack for nimbus_ui_new (#10834)
Because

* Now that all of the functionality is finished for the new nimbus ui
list page
* We can setup webpack to bundle all the dependencies

This commit
* Adds webpack to nimbus_ui_new
* Move scripts from being inline to actually stored as static assets
with proper linting
* Setup SASS so we can have some proper styling for bootstrap-select
with dark mode

fixes #10708
2024-06-13 17:57:54 +00:00
Jared Lockhart 8a75ec68b5
chore(nimbus): add django template formatting (#10657)
Because
    
* We will now be switching nimbus ui to use django templates
* We need a way to keep the formatting/linting consistent across PRs
    
This commit
    
* Adds djlint to the makefile to format/lint django templates locally
and in ci
    
fixes #10656
2024-05-07 18:11:49 +00:00
Barret Rennie f481cecb48
bug(nimbus): Support latest uniffi changes in application services (#10520)
Because

- application-services updated uniffi, which resulted in generating
  Python with relative imports;

This commit:

- updates our application-services packaging to produce a
  `nimbus_megazord` Python package; and
- updates to the latest application-services build.

Fixes #10521
2024-04-05 15:51:17 +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
Benjamin Forehand Jr 7d667e1e52
chore(project): Fix exp-10370, attached vnc image not starting. (#10371)
Because

- The ```integration_vnc_up``` command was failing to start

This commit

- Fixes the error by just starting the firefox container

Fixes #10370
2024-03-07 00:37:58 +00:00
Yashika Khurana 52fa1d3951
feat(nimbus): Sync VPN FML (#9970)
Because

- VPN FML is
[available](https://github.com/mozilla-services/guardian-website/blob/main/nimbus.yaml)
and we want to sync with the experimenter so that the experiment owner
can select a feature for VPN

This commit

- Add new sync support for FML

Fixes #9969
2024-02-09 00:05:48 +00:00
Barret Rennie 38f43fc693
feat(nimbus): auto-update application-services (#10182)
Because:

- we have standardized on using a single version of application-services
  across all Experimenter, Cirrus, and integration tests; and
- we do not want to manually manage updating this version

This commit:

- adds a CI task to open a new PR for new application-services
  nightlies.

Fixes https://github.com/mozilla/experimenter/issues/9688
2024-01-31 22:19:56 +00:00
Barret Rennie 17eec3d5bf
bug(cirrus): Fix cirrus builds (#10173)
Because:

- the cirrus test jobs require the megazords; and
- the cirrus build requires rustc on arm64

This commit:

- adds `build_megazords` as a dependency of `cirrus_build_test`; and
- installs `rustc` inside the `python-builder` phase of the Cirrus
build.

Fixes #10172
2024-01-31 01:11:50 +00:00
Barret Rennie 50aac87c01
feat(nimbus): Use pre-built A-S in Cirrus and Experimenter (#10151)
feat(nimbus): Use pre-built A-S in Cirrus and Experimenter

Because:

- our integration tests have been updated to use pre-built
  application-services artifacts;
- the Cirrus and Experimenter Dockerfiles are currently building
  application-services from source;
- Cirrus was using a Debian buster (oldoldstable); and
- Cirrus and Experimenter were using a pinned minor version of Python,
  which prevents them from getting security upgrades in minor patches.

This commit:

- updates the Cirrus and Experimenter Dockerfiles to reference the
  `experimenter:megazords` image, which contains the pre-built binaries;
- updates Cirrus to use a Debian bullseye (oldstable) image; and
- updates Cirrus and Experimenter to not pin the minor verison of Python
  (3.11.2 to 3.11).

Fixes #10150
2024-01-30 21:08:02 +00:00
Barret Rennie a9cceb323c
feat(nimbus): Upgrade sdk integration tests to modern application-services (#10148)
Because

- The sdk integration test image was stuck on application-services
  v97.5.1 due to build system changes, which prevented landing any new
  targeting using new targeting attributes from v98 onwards.
- The current system of periodically pushing a integration test image
  and pulling that pre-built image in tests lead to headaches and
  issues.
- I discovered several oddities in the current
  integration-test-nimbus-rust setup (specifying a webdriver driver,
  sudo commands that never ran because sudo was not installed).
- The new application services has a very different NimbusClient
  interface from the one currently used in tests.

This commit

- Adds a `experimenter:megazords` container, which is responsible for
  downloading a tagged nightly of the Cirrus and Nimbus-Experimenter
  megazords.
- Adds a new `experimenter:integration-tests` container, which takes the
  place of the old "nimbus-rust-image" container. This container is very
  barebones, and only includes the application services megazord (copied
  from the other container) and tox.
- Removes the old `Dockerfile-rust-image` and its publishing steps from
  CI.
- Configures our integration tests to build the image on the fly instead
  of pulling a pre-built image from a registry.
- Cleans up a few things in the `test_mobile_targeting.py` suite and
  updates the code to match the new interfaces.
- Updates the `integration_test_nimbus_rust` task to run tox with `-vv`,
  which includes the output of any commands issued.

Fixes #9820
2024-01-26 19:16:00 +00:00
Barret Rennie 662b70463b
bug(nimbus): Pass GITHUB_BEARER_TOKEN through docker to manifesttool (#9973)
Because

- we are running into the GitHub API request limit;
- we have an API token in CI; and
- we are not using the API while authenticated because Docker does not
  transparently pass environment variables through to containers

This commit

- updates the `feature_manfests` Make target to pass the
  `GITHUB_BEARER_TOKEN` through to the docker container.

Fixes #9972
2023-12-20 14:50:37 +00:00
Jared Lockhart cc0228eeec
chore(project): add a flag to disable/enable cirrus (#9916)
Because

* Building Cirrus can be time consuming
* Cirrus is not necessary for many integration tests or local workflows
* We can add a flag to enable/disable cirrus to speed up the integration
tests or local workflows that don't involve Cirrus

This commit

* Adds a flag to enable/disable Cirrus in the Makefile
* Sets the flag automatically for all Cirrus make commands
* Sets the flag for Cirrus integration tests

fixes #9910
2023-12-07 19:50:36 +00:00
Barret Rennie 9c9fd6d687
feat(nimbus): Include fetch summary in update_external_resources PR (#9816)
Because

- fetching feature manifests can fail (see #9804 for an example);
- the fetch command does not hard fail when an individual fetch fails;
and
- we are generating a summary of all the fetches

This commit

- updates the fetch command to hard fail if there are fetch failures and
no
  successes (i.e., in the case where it would not open or update a PR);
- adds a flag to the fetch command to write the summary to a file; and
- opens and updates PRs with a summary of the fetches in the PR
description

Fixes #9815
2023-11-24 19:41:42 +00:00
Barret Rennie 10be90af41
feat(nimbus): Fetch features from FML apps going back 5 versions (#9686)
Because

- we want to keep track of features on individual product versions

This commit

- fetches features from releases going back 5 versions in FML apps; and
- does not do an initial import for the FML apps because it is a very
  large change (see #9751).

Fixes #9685
2023-11-16 20:44:53 +00:00
Mathieu Leplatre 6d42bf46f1
Implement most trivial rules from our quality standards (#9711)
Because

- We are trying to promote [Quality
Standards](https://mozilla.github.io/syseng-pod/quality-standards/)
across Mozilla's repositories
- Experimenter has a [very good score
already](https://mozilla.github.io/syseng-pod/quality-standards/#service-Experimenter)

This PR

- Implements a few of the harmless ones to improve even the score :)

---------

Co-authored-by: Jared Lockhart <119884+jaredlockhart@users.noreply.github.com>
Co-authored-by: Yashika Khurana <yashikakhuranayashika@gmail.com>
2023-11-10 01:18:05 +00:00
Barret Rennie ba85d17570
bug(nimbus): Fix integration tests by reverting #9694 (#9712)
Because:

- #9694 broke integration tests;

This commit

- reverts #9694; and
- adds an explicit pull of our integration test image in our CI
workflow.

Fixes #9707
2023-11-09 21:23:19 +00:00
Barret Rennie 338dc7bdd6
feat(nimbus): Fetch A-S megazords from Taskcluster (#9694)
Because

- we don't want to manually build application-services megazords
  ourselves for each container; and
- application-services publishes megazord artifacts on Taskcluster

This commit

- adds a new as-builder docker container to download cirrus and nimbus
  megazords with the appropriate binaries for the platform as Python
  packages;
- updates the cirrus and experimenter containers to copy the megazords
  from the as-builder container;
- updates cirrus and experimenter to refer to the new megazord packages;
- updates cirrus to be based on Debian Bullseye so it can use the
  generated binaries; and
- updates the Dockerfile-rust-image container to be built on top of
  as-builder in CI.
2023-11-08 18:40:54 +00:00
Barret Rennie aed924f210
bug(nimbus): don't use multiplatform builds in CI (#9697)
Because

- the default docker builder does not support multi-platform builds

This commit

- removes multi-platform build support from our Makefile.
2023-11-08 16:37:48 +00:00
Jared Lockhart 85d93a9b8c
fix #9687 chore(project): lock application services version (#9690)
Because

* Changes to Application Services can break consuming code in
Cirrus/Experimenter
* We currently consume the main branch of Application Services
* This means that changes can land in main in Application Services and
break main in Cirrus/Experimenter
* We also neglected to explicitly rebuild the Cirrus test container when
running Cirrus tests

This commit

* Explicitly locks Application Services to a specific hash when consumed
in Cirrus/Experimenter
* Explicitly builds the test container for Cirrus when running Cirrus
tests
2023-11-07 20:36:54 +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 c8036e8f19
fixes #9410 feat(nimbus): Fetch Firefox Desktop manifests with manifest-tool (#9592)
Because

- we want to support fetching mozilla-central with manifest-tool

This commit

- adds support for hg.mozilla.org repositories to manifest-tool;
- adds support for legacy experimenter.yaml-based apps to manifest-tool;
- adds Firefox Desktop to apps.yaml; and
- updates make feature_manifests to fetch Firefox Desktop manifests.
2023-10-19 02:02:05 +00:00
Jared Lockhart 08eec26446
fix #9538 bug(project): build dev container before running manifest tool (#9540)
Because

* We recently moved our FML parsing into the Experimenter Docker
container
* This requires that the experimenter:dev container is built before
running the make fetch_external_resources command
* This was ommitted and the hourly CircleCI task is broken

This commit

* Adds build_dev as a pre requisite to make fetch_external_resources
2023-10-03 21:16:35 +00:00
Barret Rennie 5f74ee3f40
fixes #9409 feat(nimbus): Vendor FML files for all FML-based applications (#9471)
Because
- we want to use FML in experimenter

this commit
- adds nimbus-cli to the experimenter:dev docker image;
- adds a wrapper around nimbus-cli (manifest-tool) for fetching all the
  FML files and generating experimenter.yaml files;
- updates apps.yaml to include monitor; and
- does an initial import of all the FML files.
2023-09-27 17:03:39 +00:00
jhugman 77170a1639
Add libnimbus_experimenter.so to experimenter (#9455)
Because

- we haven't yet cross compiled libnimbus_experimenter.so for developer
machines

This commit

- Adds an extra git checkout / cargo build to get
libnimbus_experimener.so into experimenter.

N.B. this uses the `--library` form of `uniffi_bindgen`. Once lands, we
should remove the `cdylib_name` entries in the FML and Nimbus
`uniffi.toml` files in application-services.
2023-09-20 20:48:12 +00:00
Jared Lockhart 42db38a9a3
fix #9451 chore(project): build multiple docker platforms in circle (#9452)
Because

* We can now target multiple platforms in our Docker builds in Circle

This commit

* Enables multiplatform builds for Docker in Circle
2023-09-20 20:30:37 +00:00
Yashika Khurana 2191bd884e
fix #9436 fix(cirrus): Update channels for monitor in make command (#9439)
Because

- As the monitor channels are now staging and production, our cron job
is failing.

This commit

- Modify the make command with the appropriate channel option
`production`
2023-09-19 19:00:15 +00:00
Barret Rennie 285551ec24
chore(nimbus): reorganize manifests into directories (#9395)
Because
- feature versioning means vendoring several nimbus.fml,
  experimenter.yaml, and JSON schema files per application

This commit
- moves apps.yaml into the manifests directory; and
- renames {app}.yaml to {app}/experimenter.yaml because each app will
  have multiple manifests.
2023-09-15 20:28:15 +00:00
Jared Lockhart c44fb70587
fix #9391 chore(project): use docker hydrobuild (#9392)
Because

* We now have access to Docker Hydrobuild
* This allows us to use a shared cloud builder for our docker images so
we can share a build cache between CI and local dev

This commit

* Updates the makefile to explicitly use docker buildx
* Updates the circle config to install the latest docker client and
setup a cloud builder
2023-09-15 20:17:24 +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
jhugman 8698b4a21c
Use pre-built nimbus-cli for FML transformations (#9331)
Because

- prebuilt versions of nimbus-cli include FML are available for
linux-musl

This commit

- Installs the nimbus-cli as part of deployment
- Uses this to fetch and transform FML files from the Firefox Mobile,
Focus and Monitor apps

This means:

- Faster deploy times
- We can remove the .experimenter.yaml files from the apps' repos and
build scripts.

---------

Co-authored-by: Jared Lockhart <119884+jaredlockhart@users.noreply.github.com>
2023-08-31 16:22:38 +00:00
Barret Rennie 5984019f62
fixes #9294 bug(nimbus): Use correct channel for monitor-web fml (#9295)
Because

- monitor changed their channels in
  https://github.com/mozilla/blurts-server/pull/3320, which caused
  `make convert_feature_manifests` to fail;
- as a result, we have not merged feature manifests since the break

This commit

- updates `make convert_feature_manifests` to use the correct channel;
and
- merges the updated feature manifests from monitor and desktop.
2023-08-21 16:52:07 +00:00
Jared Lockhart 8c91e1fa05
fix #9287 chore(project): remove anonymous volumes in make kill (#9297)
Becuase

* Restarting docker containers can cause images, containers, volumes,
etc to start piling up
* Eventually you run out of disk space and have to docker system prune
-a
* We added some prune commands to remove temporary data on refresh
* This was catching a bunch of things but missing 'anonymous volumes'

This commit

* Adds an additional step to docker_prune to remove anonymous volumes
and prevent them from filling the disk
2023-08-18 20:50:04 +00:00
Yashika Khurana d73217d069
fix #9265 feat(cirrus): Demo app integration with fml and cirrus (#9289)
Because

- We want to test Cirrus end to end with the local remote setting,
including fml and experimenter to launch an experiment for the Demo app

This commit

- Integrate fml, remote settings, experimenter, cirrus to demo app
- Fixes RS pushing to web

PS: currently it uses the static value for client and context, in the
next ticket work, we will add an option in the frontend app to set the
client value and context
https://github.com/mozilla/experimenter/issues/9288

fixes #9265
2023-08-18 18:46:05 +00:00
Jared Lockhart 61d59be4e3
fix #9267 feat(nimbus): convert monitor web fml to experimenter format (#9280)
Becuase
    
* The FML format that lives in an applications repo is not parseable by
Experimenter
* The FML command line tool will convert it into the format expected by
Experimenter
* Currently supported applications do this as part of their build chain
* New applications, particularly web, may not do this so we should do
this conversion on our end as part of the external resource fetch step
    
This commit
    
* Adds a step to the fetch_external_resources make command to download
and build the FML tool and convert the FML files into a format
Experimenter can parse
2023-08-16 17:24:05 +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
Yashika Khurana 636b828f17
fix #9243 feat(cirrus): Demo app frontend and server (#9250)
Because

- We want to test cirrus end to end

This commit

- Introduces demo app with frontend and server
- Make command to build and run the demo app- `make build_demo_app`
`make run_demo_app`
- The frontend of the Demo App is accessible at
[http://localhost:8080](http://localhost:8080)
- The backend of the Demo App is accessible at
[http://localhost:3002](http://localhost:3002)

ps: FML and cirrus integration will come in different PR

fixes #9243
fixes #9244
2023-08-11 17:35:58 +00:00