Because:
- We want to be able to generate a single FTL file for fxa-content-server-l10n to pick up
- We want to be able to pull in existing auth locales from fxa-content-server-l10n
This commit:
- Adds a new grunt task for generating a single FTL file, placing it in a location fxa-content-server-l10n will find it
- Updates the clone-l10n script to check for auth server locales in the fxa-content-server-l10n repo
In order to decomission fxa-auth-db-mysql we need a new place for its migrations. Since we've also got other dbs and migrations scattered around, now is a good opportunity to bring them all together since they don't live in separate repos anymore.
In local dev the patcher now runs as part of the mysql docker process startup.
This refactoring fixes checkout of the official L10N Git repository by using the
existing environment variable FXA_L10N_SHA. By default, the commit history depth
for checkout into a specific commit is set to 1000 but can be increased with
environment variable FXA_L10N_DEPTH.
New features include:
* checkout a different repository (e.g. a fork) with variable FXA_L10N_REPO
* checkout a branch other than "master" with variable FXA_L10N_BRANCH
* symlink to an existing local checkout instead with variable FXA_L10N_COPY_FROM
* clone to/link from a different in-package directory with variable FXA_L10N_DOWNLOAD_PATH
* skipping the clone/update with variable FXA_L10N_SKIP
Current behavior is retained, the default values for the above variables are:
FXA_L10N_REPO = https://github.com/mozilla/fxa-content-server-l10n.git
FXA_L10N_BRANCH = master
FXA_L10N_COPY_FROM = <empty>
FXA_L10N_DOWNLOAD_PATH = fxa-content-server-l10n
FXA_L10N_SKIP = <empty>
Closes: #7767
Because:
- we have multiple similar scripts that pull translations from the
fxa-content-server-l10n repo
- we need that functionality for new settings
This commit:
- combine the scripts into a single one
Because
* We want to publish Storybook builds to preview component work
This commit
* Integrates [mozilla-fxa/storybook-gcp-publisher](github.com/mozilla-fxa/storybook-gcp-publisher) into the CircleCI flow so that Storybooks are built and published to a Google Cloud static site for every test run
EXP-281
- We have two clients for the auth-server API, one in `content-server/app/scripts/lib/auth` and `fxa-js-client`. The content-server one was meant to replace fxa-js-client but I didn't finish the work to get it running on nodejs.
- Extracts the content-server implementation into `fxa-auth-client`
- Wraps the implementation with shims to work with nodejs in `server.ts`
- Updates references to fxa-js-client to use fxa-auth-client
- Removes fxa-js-client
fixes#5577
Using the newish "exports" property of package.json allows
us to keep the source ts separate from the compiled js
and still use require('fxa-react/components/..'). No more
clean required to run jest tests.
Because:
* Creating a script to aid in the conversion of entire directories or single markdown files to pdfs will reduce the amount of time spent on markdown to pdf conversion requests.
This commit:
* Provides a bash script to aid in the conversion process
* Includes the initial legal docs required for the VPN services in the directory specified in the request: "/assets/legal" for review
Closes#5718
In order to keep the typescript shared modules up to date for their dependents to use while running locally this adds them to pm2 so that a `tsc --watch` can run alongside the other services.
Note, this DOES NOT automatically restart dependent javascript service processes.
This change refactors pm2-all.sh in order to start processes in dependency topological order. This requires an update to most pm2.config.js files in order to set PATH correctly while running under yarn.
@fxa-react is no longer used. content-server should reference
fxa-react through a workspace dependency.
This commit fixes references and build configs for this change.
It's easy to not notice when to run a `yarn install` either
when switching branches or doing a git pull. This adds a
hook to diff your previous yarn.lock with the one your changing
to, and if there's changes running 'yarn install' for you.
- post a comment on PRs for storybook deploy when relevant
- tweaks to CircleCi config to build & deploy storybooks for pull
requests and master merges
- try to avoid building storybooks if the packages are not in
packages/test.list generated by base-install
- updates for yarn
- tweaks to use github personal access token
- refactor storybook webpack customizations to use shared function in
fxa-react, along with fixes to module resolution
- add fxa-content-server as dependency for fxa-react, since it seems to
reuse content server styles that, in turn, need photon-colors
issue #5385
since @types can be lifted to the top-level now
and jest and mocha have competing definitions
we need to specify the "types" config to use
the correct one.
fixes#5086
This is an interim fix to the package-locks for
internal dependencies, i.e. "file:.." ones. There
appears to be at least one bug in npm in parsing
a package-lock with more than one level of depth.
I couldn't find a way to make both lerna and npm
happy at the same time. I think the real fix will
be a different approach to handling internal deps
and their build order resolution.
This adds a base node image and builder image so
that all our service images can share the same
common base, be smaller, and require less customization.
why, after all these years?
because there's a few annoying cases where the loopback
makes dev harder. When you try to test a flow from a not
local machine, like a tv, mobile device, or a saucelabs
proxy session. With localhost it's easy enough to forward
but loopback not so much
enough is enough
why: several reasons...
- to have a unified approach and pattern for:
- debugging
- fs watching for local dev
- running services in dev
- configuring services in dev
- to improve the initial clone and subsequent `npm ci` experience
- to make future work on tooling easier
1. renamed _scripts/*.sh to use kebab-case
2. linted _scripts with shellcheck
3. added _dev directory and moved pm2 json files there
4. added nps and package-scripts.js
- this allows us to do nice things like: `npm start debug firefox`
- I'd like to expand this further but it's a start
5. refactored the install scripts to make `npm install` nicer
6. renamed pm2 process names for easier control
- can use `pm2 logs auth` instead of the id
This commit addresses the following papercuts that I found while testing
various mobile browsers against a local FxA stack:
* The profile-server runs a pretend CDN on port 1112, which the device
needs to be able to reach in order to fetch profile images. I've added
this to `adb reverse` alongside the existing ports.
* Fennec has a bug where it doesn't correctly send the port number
in the Host header, causing auth errors on the tokenserver;
Ref https://bugzilla.mozilla.org/show_bug.cgi?id=1482462
I've set `force_wsgi_environ` to allow it to work. This setting is
generally not advised as it can mask security problems, but they're
not relevant for us in local dev.
* The Firefox for iOS OAuth client id was not in the default local dev
configuration for auth-server. I've added it.
Because:
* The syncserver docker container used for local development needs to
talk to the local FxA server to verify OAuth tokens.
This commit:
* Passes appropriate environment variables to configure syncserver to
use the local FxA server as its identity provider.
* Requires an update to the syncserver docker image in order to work around
some network access issues; ref https://github.com/mozilla-services/syncserver/pull/209
Because:
* When running the syncserver docker image for local development, we need to
configure it with a different verifier URL depending on whether it can reach
the verifier process over localhost (which it can on Linux) or whether it
needs to talk to a special hostname (necessary on Mac and Windows).
* The latest Docker Desktop for Windows seems to report its operating system
as "Docker Desktop" rathert than anything with the word "Windows" in it.
This commit:
* Treats "Docker Desktop" as another case where we have to the special hostname
for accessing other services running under docker.
* Works on my machine, but hasn't been tested on yours.
start-android is no longer needed so it was removed
along with its dependencies and replaced by adb-reverse
I removed `adr-log` in favor of running `npx adr-log` to
make `npm ci` smaller.
`concurrently` is no longer used.
The remainder were updated to their latest versions.
In order to reduce our CI resource usage we've combined
some jobs and changed what runs for each workflow.
Most packages have fast test runs. We've combined these
under one job. Packages with slower runs use their own
job so they can be run in parallel. Also, we've added
branch filters to the rarely changing, but resource
intensive jobs.
We now have three workflows that run at different times.
1. test_pull_request: runs only on PR branches and
only runs tests.
2. deploy_master: runs only on master and only builds
and deploys docker images
3. test_and_deploy_tag: runs only on tags and tests,
builds, and deploys
Because:
* It can be useful to debug multiple services at once.
This commit:
* Adds a pm2 config that starts 4 of the servers using start-dev-debug
with unique inspect ports so that they can be debugged all at the
same time.
* Updates the package.json files for these services so they don't choose
the same port.
* Documents the ports used for debugging.
* Add's an attach debug for VS Code that lets one choose which process
to debug.
Because:
* The capability list assembling could result in duplicate capabilities
for a clientId.
* When sending the subscription state SQS message, only the capabilities
are included, not prefixed with a clientID as the event-broker had
assumed based on a prior un-implemented concept.
This commit:
* Removes duplicates from the client/capabilities response by using a
Set.
* Looks up the clientId based on the capability rather than assuming
its the prefix in the productCapabilities.
Fixes#4315
- fxa-amplitude-send has a dependency on node-parquet which has several unaccounted for native deps that currently break npm install locally
- node-parquet adds several minutes to the CI build time which is not currently required
- refactored script vars to be more explicit about their purpose
see #3231
Also adds:
* Caching abstraction for automatically refreshed data.
* Cached services for webhook urls and the client capabilities.
* Dockerfile for CI integration.
Closes#1268, #1267