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

243 Коммитов

Автор SHA1 Сообщение Дата
Dan Schomburg e9ea50835f
Revert "task(content): Update privacy policy document" 2023-10-16 15:58:31 -07:00
dschom 70d03c1380
task(content): Update privacy policy document
Because:
- We now want to reference a privacy policy specific to Mozilla

This Commit:
- Starts using the `mozilla_privacy_policy.md` legal doc
2023-10-12 15:11:16 -07:00
Bianca Danforth 67512368ad
chore(scripts): increase check-url.sh RETRY value
Because:

* Mac M1 and M2 machines are slower to start up infrastructure like Redis and Firestore (which runs under emulation).

This commit:

* Doubles the RETRY period from 120 to 240s as most of the time, the __heartbeat__ response for fxa-auth-server and firestore processes responded between 140 - 190s.

Closes #No ticket
2023-09-06 10:59:27 -04:00
dschom d96797ae6a
task(CI): Improve nx caching for CI pipelines
Because:
- Not all CI operations where taking advantage of NX caches

This Commit:
- Adjusts nx.json config to ensure correct caching behavior
- Adjusts nx.json config to ensure proper target chains. ie build is dependent on pre-build
- Uses nx to directly run integration tests
- Uses nx to directly run unit tests
- Phases out dependency on generated .list files
- Ensures 'start up' for services for functional tests is done with nx and uses nx caches.
- Creates nx tags to facilitate test commands
- Fixes linter errors encountered
- Updates docker images to nx for builds
- Updates nx ignore files
2023-08-29 11:19:54 -07:00
Reino Muhl 8a4ed3350a
feat(infra): wait for db patches on startup
Because:

* On stack startup, services start before mysql patches have completed,
  causing profile-server to fail on startup.

This commit:

* Adds script to check if patcher script has started and is still
  running.

Closes #
2023-07-20 12:08:34 -04:00
Lisa Chan d4bf24117c
chore(next): Add Next.js to fxa and initial setup 2023-07-19 14:57:15 -04:00
Dan Schomburg e3300d6d52
Merge pull request #15293 from mozilla/FXA-7333
task(many): Investigate adding auth to redis connection
2023-05-17 11:28:49 -07:00
dschom c7995188d0
task(many): Investigate adding auth to redis connection
Because:
- We want a poc that auth can be added to redis

This Commit:
- Configures all configs to support a redis password
- Sets the standard env for redis auth to REDIS_PASSWORD
- Creates a default redis password of 'fxa123' for local dev
- Starts redis container with --requirepass fxa123
2023-05-12 16:22:38 -07:00
dschom b4cfc9c325
chore(CI): Switch to multi stage docker build and clean up
Because:
- We want to clean up our docker build
- We no longer used our service specific images

This Commit:
- Switches to multi stage docker build
  - Removes unused building of individual services
  - Removes used script that sets environment variables.
  - Removes `workspaces focus` call that resulted in redundant installs
  - Removes trap on build logs.
  - Uses circleci DLC to get cache hits for fxa-utils and fxa-build-utils
- Removes scripts that build service specific images
- Cleans up naming conventions to reflect that only one image is being built
2023-05-11 17:13:06 -07:00
dschom 7f79c431d0
task(CI): Patch package.json version fields to reflect the git tag
Because:
- We want the package.json version to match the git tag being deployed.
- We don't want to commit a change on the package.json file to accomplish this.

This Commit:
- If there is a git tag, the code will send it into the docker build as a VERSION build arg.
- This build arg is then used to update the version field in all package.json files.
2023-05-05 12:13:46 -07:00
Wil Clouser f3eb8bd475
chore(build): remove unused legal-md-to-pdf script 2023-04-19 11:30:27 -07:00
dschom 261f58a299
task(ci): Allow docker build phase to happen in parallel
Because:
- We can build the docker image while tests are running
- This will cut down on deploy time

This commit:
- Builds the deployed docker images in parallel to tests
- Pushes temporary image to docker up
- Once tests finish re-tags temporary image and pushes to docker hub
- Removes temporary build image from docker hub
2023-04-12 08:31:08 -07:00
dschom b843d2bb94
task(settings): Move legal doc query to gql
Because:
- We want to move our legal doc query to the server side so it can be made with a single call.

This Commit:
- Changes to clone script:
  - Use the provided state.json provided by l10n repo
  - Moves download to external folder
- Changes to settings:
  - Use gql to fetch legal doc
- Changes to gql
  - Adds ability to resolve a legal document.
2023-03-27 18:02:43 -07:00
Barry Chen ba550558a0
chore(repo): delete pushbox service integration
Because:
 - the pushbox service has been decommissioned

This commit:
 - removes the pushbox service integration config and code from the
   auth-erver
2023-03-21 13:53:44 -05:00
dschom 76ad8cb534
task(many): Fix issues with l10n:clone failing on postinstall
Because:
- We are hitting race conditions using postinstall
- If two packages invoke l10n:clone at the same time in their post install git will error out

This Commit:
- Adds a git checkout hook, so the l10n folder is regularly updated
- Remove l10n:clone and l10n:prime commands from the post install
- Moves the l10n:prime command into build and tests commands
- Adds clean script so blank slates can be tested locally
- Adds respective l10n-bundle and l10n-prime scripts per workspace
- Moves the creation of the git-head.txt to the prime step and avoids creating an change on the l10n repo

Co-authored-by: Peter deHaan <peter@deseloper.com>
2023-03-20 11:23:00 -05:00
Dan Schomburg 2fdd96107f
Merge pull request #15018 from mozilla/FXA-6463
task(many): Only clone l10n once and combine ftl files.
2023-03-15 12:47:03 -07:00
dschom 1d709000fe
task(many): Only clone l10n once and combine ftl files.
Because:
- We want to avoid redundant git clone operations
- We want to reduce the number of ftl bundles requested on the client side.

This Commit:
- Adds _scripts/l10n/*.sh for conducting l10n build operations
- Bundles ftl files together into ftl main
- Removes bundle prop on AppLocalizer, so that it uses the default, [main.ftl]
- Replace - with _ in locale names when resolving ftl files
- Removes clone-l10n.sh
2023-03-15 11:30:44 -07:00
Barry Chen 2b2fada774
chore(repo): delete support panel from fxa
Because:
 - the support panel has been replaced by features in the admin panel

This commit:
 - deletes the support panel package
2023-03-14 10:49:43 -05:00
Valerie Pomerleau 7400b25168
refactor(fxa-settings): Use global branding file in fxa-settings
Because:

* We want to standardize the branding used across fxa packages. FXA-5994 set up a global branding file that was initially used only for fxa-auth-server, and we now want to expand this file to be used for fxa-settings too.

This commit:

* Move branding terms from fxa-settings/src/components/en.ftl to the global branding file in fxa-shared/l10n/.
* Update clone-l10n script to include branding.ftl in the fxa-settings locales folders.
* Update fxa-setting to include "branding" in the Fluent bundle.
* Update ftl-test paths to include branding.ftl and react ftl files.

Closes #FXA-5995
2023-02-17 08:44:06 -08:00
Lauren Zugai 586a46b9b8
feat(react): Reactify legal, legal/terms, legal/privacy
Because:
* We're refactoring our legacy tech stack to our preferred stack by extending settings

This commit:
* Adds a clone-legal-docs script so we always fetch latest rather than pin to commit
* Reworks the 'react groups' into separate server and router files; router.js needs access, but cannot have any reference to route definitions since they now contain server-side logic and imports
* Moves available content-server routes into a separate file that does not import route definitions
* Uses and accounts for the existing regex for legal, legal/terms, and legal/privacy
* Adds two helper packages to render the MDs once fetched

Closes FXA-6131
2023-02-15 13:02:04 -06:00
dschom a620922422
task(CI): build, unit test, and integration test jobs
Because:
- We wanted to run a few preliminary checks before proceeding to more
  expensive CI jobs. Checks include:
    - Compiling typescript in commonly referenced workspace packages
    - Linting code that has changed
    - Executing Unit Tests for code that has changed
- We wanted to partition test operations into unit tests, and
   integration tests. Unit tests can be run relatively quickly and
   require no additional infrastructure. Integration tests require
   additional infrastructure and generally have longer execution
   times. Now that jobs are blocked from running until preliminary
   checks pass, one of which is unit tests, it is important to draw a
   distinction between these two types of tests.
- We want to avoid unnecessary yarn installs and typescript
  compilations, which are time consuming.
- We want to make sure that test results are published and failing tests
   can be easily viewed in the CI.

This Commit:

- Creates a build-and-validate job in the CI that builds, lints, and
  unit tests code prior to running any other jobs.
- Creates unit-test job in CI config
- Creates integration-test job in CI config
- Removes redundant calls to compile workspace packages. These
  are now built up front, cached, and restored as needed for future
  runs.
- Extends the create-lists script functionality to generate commands
  that can be executed with the parallel command.
- Removes unnecessary yarn install operations. Invoking yarn workspace
   focus results in a yarn install. In the case of running tests this is largely
   unnecessary, because we already do a yarn install in the base-install
   step.
- Make sure test results are exported as junit xml so the CI can report
  back on tests that were failing. This was done for a couple workspace
  packages, but many were lacking the capability. All test:unit and
  test:integration npm scripts now export this data.
- Fixes the following issues encountered along the way:
        - Adds logs to monitor heap usage of jest tests. Some
          jest tests are still using a lot of memory.
        - Moves a few slow / long running tests from unit test to
          integration tests.
        - Ensures that jest.transform for ts-jest is always instructed
           to have the config option isolateModules is set to true. This
           definitely decreases memory overhead and resolves some
           of the OOM errors we were hitting. It was configured in
           some places but not everywhere.
        - Exports test results files for all tests
        - Exports all test artifacts
        - Uses gnu parallel to run tests in parallel. Turns out yarn
          workspaces foreach would give a false positive when an OOM
          was encountered. Fortunately, the parallel command offered an
          acceptable work around, and even offers some nice features
          like the load argument, which allows to control test execution a
          bit more efficiently.
2023-01-10 12:52:01 -08:00
dschom 12779b14ee
bug(CI): test-content-server-remote must not have parameters
Because:
- We cannot add parameters to job triggered through circleci's API

This Commit:
- Removes parameters from the `test-content-server-remote` job
2022-12-22 10:15:55 -08:00
Valerie Pomerleau 499a41a410
refactor(l10n): Ensure shared FTL strings not duplicated on Pontoon
Because:

- Concatenating shared FTL strings into multiple packages before sending for localization created duplication of localization work, and we want each string to only be translated once.

This commit:

- Remove concatenation of shared files (branding.ftl, fxa-react ftl files) from grunttasks
- Add grunttasks in fxa-react to concatenate fxa-react FTL files into one react.ftl file
- Add grunt to fxa-react dev dependencies
- Update fxa-react scripts to run l10n and ftl tasks
- Update clone-l10n script to distribute react.ftl to packages
- Bundle branding and shared into AppLocalizationProvider

Closes #FXA-6388
2022-12-08 15:45:34 -08:00
Dan Schomburg 26bfd5bf07
Merge pull request #14578 from mozilla/fix-firestore
task(pm2): Fix firefstore startup failure
2022-12-01 11:39:05 -08:00
dschom fa4ac145b6
task(pm2): Fix firefstore startup failure
Because:
- Something in the 'latest' tag on the firestore image is preventing startup

This Commit:
- Rolls back to a known good tag
2022-12-01 11:04:35 -08:00
Barry Chen b04f0d7118
chore(l10n): fix clone script for masOS post-Ventura
Because:
 - `realpath` is now in macOS but it does not have a `-m` option

This commit:
 - add minimal extra check for the `-m`
2022-11-28 11:22:26 -06:00
Valerie Pomerleau d79c30d50a
feat(l10n): Split payments-server single FTL file into per-component files
Because

* Organizing l10n strings in per-component files aligns payments-server with the setup used for auth-server and settings. Splitting the FTL files also improves maintability by more tightling coupling the strings with the components where the strings are used.

This commit

* Create a temporary branding file in fxa-payments-server/src
* Create a gruntfile with tasks for FTL concatenation and watching
* Rename the destination file from main.ftl to payments.ftl
* Switch payments-server's default locale from en-US to en and update all references of en-US to en
* Create individual FTL files per component and move messages to their respective component FTL file
* Add a l10n entry in the package readme
* Update clone-l10n.sh to copy 'payments' ftl files instead of 'main'
* Update AppLocalizationProvider to use 'payments' bundles
* Replace setupFluentLocalizationTest with getFtlBundle/getFtlFromPackage from fxa-react
* Remove setupFluentLocalizationTest function (no longer used in fxa-settings)
* Add merge-ftl:test task to package.json start and test:frontend scripts
* Remove legacy strings from FTL files
* Update currency and date formats to use 'en' as default locale
* Remove legacy paths from .gitignore files in payments-server
* Move remaining paths to global .gitignore
* Delete .gitignore files in payments-server

Closes #FXA-5996 and #FXA-6255
2022-11-09 13:26:40 -08:00
dschom 1ab4ba501b
task(shared): Fix docker network error with otel
Because:
- When starting tracing with open telemetry the network name would sometimes collide and result in error.

This Commit:
- Sets an 'fxa' network name
- Applies this network to services
- Allows services to communicate by their names
2022-11-04 16:22:11 -07:00
Reino Muhl 4b11cd35fc
Merge pull request #14264 from mozilla/fxa-5100-pull-legal-pdfs
feat(scripts): pull pdfs from legal-docs
2022-10-21 12:49:47 -04:00
Reino Muhl 9fc1193385
feat(scripts): pull pdfs from legal-docs
Because:

- We need to pull the latest pdfs from legal-docs into the fxa
  assets folder.

This commit:

- Create a script to copy the latest pdfs into assets/legal.
- Create a Github Action to automatically pull in the pdfs from
  legal-docs, and open a pull request to move pdfs into assets/legal.

Closes #fxa-5100
2022-10-20 18:22:29 -04:00
Ben Bangert ecb1a7f5ea
fix: tweaks for test all to pass
Because:

* Test all didn't run in parallel to take advantage of more cores and
  a few older tests were flakey.
* Tests would hang as packages had a default test that was in watch
  mode.

This commit:

* Updates several flakey tests and runs the test all in parallel for a
  shorter completion time.
* Updates settings and payment-server packages to have new watch command
  and deafult test command that runs the tests.

Closes #FXA-6096
2022-10-18 15:26:45 -07:00
Ben Bangert 41d19078b1
fix(auth): test for proper mysql response
Because:

* We updated the local mysql to a version that doesn't pass auth-server
  tests.

This commit:

* Drops the local mysql to a version that the test passes.

Closes #FXA-6068.
2022-10-12 12:19:49 -07:00
dschom bdcd59ff70
task(content): Add support for tracing on client side
Because:
- We want to start trace capture at client side
- We can't report trace data directly to cloud trace

This Commit:
- Adds support for client side tracing in tracing/browser-tracing.ts
- Some refactors to fxa-shared/tracing to ensure code is reused
- Cleans up tests
- Introduces traceparent header and tracestate html headers
- Opens up OTLP ports on jaeger
- Introduces a clientName to trace config
- Adds an open telemetry collector service (otel-collector)
- Uses this services for all trace capture
- Adds flow id to trace id headers so traces can be validated
2022-10-11 16:00:03 -07:00
dschom 923bbf6e00
task(content): Add support for tracing on client side
Because:
- We want to start trace capture at client side

This Commit:
- Adds support for client side tracing in tracing/browser-tracing.ts
- Some refactors to fxa-shared/tracing to ensure code is reused
- Cleans up tests
- Introduces traceparent header and tracestate html headers
- Opens up OTLP ports on jaeger
- Introduces a clientName to trace config
2022-10-10 14:14:32 -07:00
Reino Muhl 6d3dcc8140
docs(legal): upload sub services legal docs
Because:

- Subscription Services is prepareing for initial release

This commit:

- Adds initial set of Subscription Services legal documents.

Closes #FXA-6036
2022-10-05 13:12:56 -04:00
Reino Muhl 580f888bd0
docs(legal): upload hubs legal docs
Because:

- Hubs is preparing for initial release

This commit:

- Adds initial set of hubs legal documents

Closes #
2022-09-22 09:26:44 -04:00
dschom e8ae3388d0
fix(infrastructure): Improve Jaeger startup behavior
Because:
- When not enabled Jaeger was exiting with an 'error' status which was confusing.

This commit:
- Adjust infrastructure.config.js so that Jaeger exists cleanly with a 'stopped' status.
- Reports a better log message so that it's clear Jaeger is not required to run FxA.
2022-09-07 16:29:49 -07:00
dschom f14a2dc923
task(auth): Enable open telemetry on auth server
Because:
- We want to be able to see trace information
- We want to be able to export trace information to google cloud

This Commit:
- Adds utility class to fxa-shared for configuring and initializing open telemetry
- Initializes open telemetry in the auth server
- Forces resolution of google-gax.
- Forces resolution of @grpc/grpc-js.
- Adds the jaeger docker container for viewing traces locally. This is accessible on localhost:16686.

Note, adding @google-cloud/opentelemetry-cloud-trace-exporter resulted
in a version conflicts for google-gax and @grpc/grpc-js, which caused
runtime failures when interacting with @google-cloud/firestore. After
many experiments, this seems to do the trick.
2022-09-02 17:54:41 -07:00
Julian Poyourow ec67ad4d63
chore(db): development mysql version
Because:
MySQL version 8.0.29 was pulled by MySQL due to a critical issue (see here: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-29.html) and is no longer available for download. Attempting to run the _scripts/mysql.sh file will fail due to the lack of any 8.0.29 tag (https://hub.docker.com/r/mysql/mysql-server).

This commit:
Bumps MySQL to 8.0.30 as recommended by MySQL here https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-29.html.

Closes: no corresponding issue
2022-08-22 20:47:05 -07:00
Bianca Danforth b39c91b7d0
fix(scripts): don't remove first line of 'yarn workspaces list' output
Because:
- Some affected packages were not being compiled

This pull request
- Includes the first line output by 'yarn workspaces list', so that the package is included in subsequent checks.

[skip ci]
2022-08-18 17:15:23 -04:00
Barry Chen af4c552523
Merge pull request #13778 from mozilla/l10n_main
chore(l10n): replace references to master with main in l10n automation
2022-07-29 13:48:30 -07:00
Francesco Lodolo b8d38f30e4
chore(l10n): replace references to master with main in l10n automation
Because:

* The fxa-content-server-l10n is still using master as default branch, and we want to update it to main.

This commit:

* Updates references from master to main in automation
* Fixes or removes master references in docs
* Fixes a few typos
2022-07-28 07:13:55 +02:00
Barry Chen 544e8b0b3b
chore(db): upgrade to mysql 8 for local dev
Because:
 - we want to upgrade to mysql 8

This commit:
 - upgrade mysql for local dev
 - start mysqld with default auth set to native password for backwards
   compat with the 'mysql' module
2022-07-21 09:07:51 -05:00
Bianca Danforth ddba42afd4
chore(all): run TS compiler as part of test-many job
Because:

* We should be informed about TS errors before a patch merges into main.

This commit:

* Adds a new script to run as the first task in the test-many job that compiles any modified back-end Typescript packages and any packages that depend on them.

Closes #12823

Co-authored-by: Barry Chen <bchen@mozilla.com>
2022-06-15 08:11:16 -04:00
郭佳慧 1d5d90db81
Update syncserver.sh
remove http://
check-url.sh would add http. so no need http in here.
2022-06-02 19:50:36 +08:00
Vijay Budhram 00198a053c
fix(configs): Do a clean install of fxa-auth-client when doing `yarn install` 2022-05-27 14:49:33 -04:00
Florian Dieminger 2ec2261a81
add mdn plus legal docs (#11955)
- updating the legal-md-to-pdf script
- adding English terms and privacy for mdn plus
2022-02-16 09:36:55 -06:00
Wil Clouser 119f0c8a7f
refactor(scripts): removing old unused scripts
Because:

* `gh-pages.sh` and `upload-assets-to-cdn.sh` are no longer used

This commit:

* removes them.  Once this lands I will update the documentation as
well.
2022-01-24 09:21:04 -08:00
Danny Coates 50e124b518
feat(services): remove fxa-auth-db-mysql, fxa-email-event-proxy, and fxa-email-service
and fxa-metrics-processor
2022-01-13 16:23:22 -08:00
Danny Coates dfb1cd9517
feat(event-broker): wire up events from auth-server through event-broker to webhooks in local dev 2021-12-15 16:00:50 -08:00