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

241 Коммитов

Автор SHA1 Сообщение Дата
Danny Coates 833326ad59
feat(tests): implement prod smoke tests in playwright
There's an ADR for why Playwright
2021-11-17 10:19:19 -08:00
Danny Coates c14d4aac4e
feat(metrics): filter backbone metrics when opted-out (#10832)
closes #9083
2021-10-27 11:51:39 -07:00
Barry Chen 8f23a2c787
chore(assets): update subscriptions legal docs 2021-10-25 11:19:49 -05:00
Danny Coates 45a399e8cf
feat(dev): add firebase emulator ui visit http://localhost:9299 2021-10-15 16:48:06 -07:00
Danny Coates a95f1270af
refactor(build): use esbuild instead of ts-node (#10639) 2021-10-07 09:57:36 -07:00
Jody Heavener f17a4fa121
chore(auth): set up auth server to generate dist FTL file, clone/import existing FTL locales
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
2021-09-14 09:40:45 -03:00
Danny Coates 9e78144188
refactor(db): created a new package for all db migrations
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.
2021-09-08 13:10:38 -07:00
Barry Chen dec5c97f8f
Merge pull request #7769 from eNote-GmbH/feature/improved-download-l10n
Enhance L10N handling
2021-04-06 11:03:29 -05:00
Barry Chen d51624babf
chore(legal): update downloadable VPN legal docs 2021-03-29 10:48:08 -05:00
Michael Kane Juncker f2900398ac
Enhance L10N handling to allow commit pinning at build time and local copy support
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
2021-03-26 19:37:53 +01:00
lesley b635856266
Revert Mozilla VPN legal docs file pattern 2021-03-11 11:52:04 -06:00
lesleyjanenorton 780d604cba
Update legal-md-to-pdf.sh script and add resulting localized PDFs. 2021-03-09 15:09:36 -06:00
Dave Justice 8948be2535
Merge pull request #7077 from mozilla/6902-legal-doc-restructuring-adjustments
task(fxa-content-server): account for legal-docs new format
2021-02-09 15:03:17 -05:00
Dave Justice f4597eaa0a
task(fxa-content-server): account for legal-docs new format
- update scripts to account for legal-docs repo changes coming in
https://github.com/mozilla/legal-docs/tree/restructure
2021-02-09 19:45:23 +00:00
Barry Chen 37887cf115
chore(l10n): combine the download l10n scripts
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
2021-02-08 12:51:42 -06:00
Danny Coates 3f4b700cf4
chore(deps): bump local mysql docker to 5.7 2021-01-22 12:03:25 -08:00
Michael Kane Juncker 2130334955
Fix base-docker.sh to print out errors logs from yarn install 2021-01-15 13:10:23 +01:00
Michael Kane Juncker 3c978d9d00
Allow environment variable customizations in Docker builds - refs #7118 2021-01-07 14:44:10 +01:00
Michael Kane Juncker a8e4f00151
Dump npm logs to console in Docker builds for troubleshooting 2021-01-07 14:39:42 +01:00
Les Orchard 17b2099292
chore(storybooks): switch to a new shared Storybook publisher
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
2020-09-29 17:43:49 -04:00
Danny Coates 2742c1d07a
feat(docker): publish fxa-mono docker image
because we want to transition from an image per service to one image for all services
2020-08-28 10:10:14 -07:00
Les Orchard 306846f0ae
fix(storybook): delete commits and pulls over 3 weeks old on every build
Ugly hack, but it munges git log output to find commit and pull directories to
delete old builds.
2020-08-13 19:29:20 -04:00
Danny Coates 7358a3cae5
feat(auth-client): replace fxa-js-client with fxa-auth-client
- 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
2020-07-21 09:08:35 -07:00
Danny Coates 10c230f041
fix(react): use package.json export
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.
2020-07-02 15:48:45 -07:00
John Morrison fa1ba02d19
fix(legal): change upload script to handle pdf 2020-07-01 12:40:20 -07:00
Jackie Munroe 6a1bf9ce30
chore (fxa script): create script to convert legal markdown files to pdfs
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
2020-07-01 09:23:41 -07:00
Jared Hirsch 20a0acf8b0
chore(docs): Replace 'master' with 'main' throughout
Certain references to 'master' haven't been removed yet, see
issue #5698, issue #5699, issue #5700 for more complex followups.
2020-06-25 13:44:28 -07:00
Les Orchard 9a1f4fa076
feat(storybooks): link to commit rather than pull request for status check target URL
fixes #5682
2020-06-16 18:59:27 -04:00
Danny Coates c3780546b6
fix(local-dev): added fxa-shared and fxa-react to pm2
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.
2020-06-03 10:05:02 -07:00
Danny Coates 17f2311274
fix(content-server): fixed content-server build
@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.
2020-06-02 10:54:39 -07:00
Les Orchard 705833d3ae
feat(storybooks): Switch Storybook notification from comment post to commit status check
fixes #5474
2020-05-27 17:41:24 -04:00
Danny Coates e6f60d2880
feat(dev): added post-checkout/merge git hooks to keep deps in sync
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.
2020-05-26 16:13:14 -07:00
Les Orchard a71aa0cb74
feat(storybooks): build storybooks for CI and deploy to mozilla-fxa/storybooks
- 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
2020-05-26 16:27:29 -04:00
Danny Coates ad6ea39826
fix(docker): need to specify types in some tsconfigs
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.
2020-05-21 14:56:08 -07:00
Danny Coates 81575019a9
refactor(packages): use workspace references 2020-05-21 10:57:21 -07:00
Les Orchard acf5c00bab
feat(storybook): build static gh-pages site from storybook builds
issue #4823
2020-05-20 19:48:00 -04:00
Danny Coates 11ddc0b603
fix(npm): fixed npm install in content-server etc
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.
2020-04-23 16:22:08 -07:00
Danny Coates d4da8a3606
feat(docker): created fxa-builder docker image
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.
2020-04-22 16:27:22 -07:00
Danny Coates 1dd1b038d4
refactor(config): replace 127.0.0.1 with localhost
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
2020-04-15 13:55:42 -07:00
Danny Coates 3a054dfc3f
refactor(pm2): restructure our pm2 configs
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
2020-04-14 14:38:38 -07:00
Danny Coates a4b3996349
refactor(npm-scripts): refactored npm scripts for better ergonomics
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
2020-04-13 16:17:36 -07:00
Jody Heavener 35af352758
chore(audit): only audit once per day 2020-04-13 15:45:34 -04:00
Danny Coates 37a42e721f
chore(tests): made root level "npm test" more functional 2020-04-08 15:58:16 -07:00
Ryan Kelly 0bc155af3a
fix(localdev): Help local dev environment work with mobile browsers.
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.
2020-04-01 17:19:10 +11:00
Ryan Kelly 3e397ee61f
fix(docker): Configure docker syncserver to correctly verify oauth tokens.
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
2020-03-30 17:19:25 +11:00
Ryan Kelly 7f74c7dbbc
fix(docker): Improve detection of Docker running on Windows.
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.
2020-03-24 14:56:01 +11:00
Danny Coates 7f60ef5769
chore(deps): update top-level dependencies
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.
2020-03-12 14:01:59 -07:00
Danny Coates 7e77b0a292
refactor(ci): major refactor of CircleCI workflow
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
2020-03-10 10:06:16 -07:00
Ben Bangert 5d3747e384
feat: add pm2 debug servers and add'l debug scripts
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.
2020-03-06 10:33:20 -08:00
Jody Heavener d01b175c44
chore(services): check for and warn about ports in use that the servers require 2020-03-04 17:42:19 -05:00
Danny Coates 1479940518
fix(dev): some processes need to wait for mysql to startup 2020-03-03 12:08:31 -08:00
Ben Bangert bb1b255856
fix: lookup clientids in eventbroker
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
2020-03-02 16:02:56 -08:00
John Morrison af405ab8fe
fix(assets): add a self-documenting echo comment 2020-01-22 09:32:27 -08:00
Lauren Zugai 46b279d33f
Merge pull request #3731 from mozilla/revert-node-10-option
chore(build): [blocked by #3828] Revert allowing Node 10 in check.sh, update docs
2020-01-08 16:03:56 -06:00
Jon Buckley 1e003c3dbd
feat(assets): Add script to upload product icons to CDN 2019-12-20 17:13:51 -05:00
Danny Coates aeb95a2225
fix(build): update check.sh to use node 12 2019-12-19 10:57:04 -06:00
Lauren Zugai 523049d04c
Revert "fix(ci): [temp] Allow Node 10 installations in CI"
This reverts commit 82083a1c87.
2019-12-19 10:49:31 -06:00
Lauren Zugai 82083a1c87
fix(ci): [temp] Allow Node 10 installations in CI 2019-12-16 19:45:29 -05:00
Danny Coates 8f3b2627d5
refactor(build): disable npm install by default on fxa-amplitude-send
- 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
2019-11-05 10:30:42 -08:00
Danny Coates 95c6eba2c8
fix(build): slow-roll npm ci on circle 2019-11-01 14:28:44 -07:00
Danny Coates 7d222da260
fix(build): go back to `concurrently` for `install_packages.sh`. too many errors with lerna 2019-10-31 11:07:46 -07:00
Danny Coates a2edb48f49
fix(local): fixed localhost docker networking 2019-10-29 12:33:56 -07:00
Danny Coates 3c3a888a84
refactor(build): some random dev build changes 2019-10-28 17:27:35 -07:00
Danny Coates b5f7df167f
refactor(oauth): move oauth-server into auth-server (phase 2)
See #2757
2019-10-28 10:49:46 -07:00
Vijay Budhram 173b90e1c5
fix(deps): Remove yuidoc from js-client 2019-10-03 15:56:15 -04:00
Vlad Filippov 17921f718c
fix(dev): clean up pm2 scripts and docs 2019-10-02 10:56:56 -04:00
Vlad Filippov cf51e1d0bc
chore(dev): use the docker fxa-email-service in local dev 2019-10-02 10:17:40 -04:00
Danny Coates f7431dff59
chore(oauth): Phase 1 of oauth->auth server consolidation #1922 2019-10-01 16:30:40 -07:00
Vlad Filippov 8ca039616c
refactor(basket): remove fxa-basket-proxy from the mono repo 2019-09-06 14:22:26 -04:00
Danny Coates be709e07d9
fix(build): fixed fxa-shared build on `npm install` 2019-08-27 17:00:18 -07:00
dave justice 2ffe1334df
feat(fortress): add "fortress" relying party
- fixes #1894
2019-08-26 15:26:59 -04:00
Shane Tomlinson 1cc2ff4e66
feat(install): Check for node 10 on install
If a version of node other than 10 is installed, error out.

fixes #1964
2019-08-16 11:01:34 +01:00
vladikoff eb752efab9
chore(console): move OAuth console out 2019-07-29 17:59:04 -07:00
Ben Bangert 45b304acb3
feat: reduce build time for fxa-email-service 2019-07-23 17:27:49 -07:00
Ben Bangert 4095612295
refactor(support-panel): rename to fxa-support-panel for consistency 2019-07-18 12:58:08 -07:00
Phil Booth f829648f5d
fix(scripts): run grunt sjcl after npm ci for fxa-js-client 2019-07-09 10:52:02 +01:00
Ben Bangert 4a3b1854a2
Merge pull request #1549 from mozilla/feat/issue-1269
feat(event-broker): add proxy for RPs and integration test utils
2019-06-24 09:42:59 -07:00
Ben Bangert c1cf036334
feat: add proxy for RPs and integration test utils
Closes #1269
2019-06-24 09:34:44 -07:00
Shane Tomlinson 7e0d73e40d
fix(docs): Update the Ubuntu installation docs
The docker deps were out of date, also added a section on
installing rust nightly.
2019-06-24 14:28:26 +01:00
Les Orchard b6e1897929
feat(payments): Add storybook deployment to _scripts/gh-pages.sh 2019-06-12 11:05:30 -04:00
Ben Bangert 90d4bf7533
feat(event-broker): add GCP pub/sub storing of subscription changes
Also adds:
* Caching abstraction for automatically refreshed data.
* Cached services for webhook urls and the client capabilities.
* Dockerfile for CI integration.

Closes #1268, #1267
2019-06-05 08:34:08 -07:00
Ben Bangert 7f1a5b7a21
fix: turn off interactive gcloud prompts 2019-05-30 07:53:51 -07:00
Ben Bangert 095360cbaf
feat(event-broker): add database tests
Adds local google cloud pubsub/firestore emulator and rigs tests into
it.

Issue #1267

Closes #1266
2019-05-29 07:39:13 -07:00
Ben Bangert c940100d26
feat: initial Typescript based fxa event broker
Implements the message receiving portion of the event broker in a new
TypeScript based Node app.

Closes #682
2019-05-28 14:35:49 -07:00
Ian Bicking 201ebfd033
feat(support): implement a stub support panel app
This implements much of the server setup, but doesn't connect to a database, and is not show correct information.
2019-05-23 15:21:17 -05:00
Vlad Filippov 4c2c5d14cc
chore(local-dev): remove unused channelserver from scripts 2019-05-13 16:43:03 -04:00
Ben Bangert 31a1d3e853
fix: setup missing packages and include natives
Closes #1049
2019-05-09 10:56:30 -07:00
Phil Booth 2f6da8f9bf
chore(scripts): clone auth db from HEAD instead of master 2019-04-11 19:44:20 +01:00
Phil Booth f78826aa2e
fix(tests): pick up latest auth db in auth server tests 2019-04-11 16:42:26 +01:00
Phil Booth 8b504a3e4a
feat(packages): create fxa-event-broker skeleton rust project 2019-04-11 13:16:05 +01:00
Shane Tomlinson c4706afc09
chore(setup): Remove install_extras.sh, it's not needed
install_extras.sh installed the Loop server, which
is no longer used and the repo has been archived.
2019-04-11 11:10:39 +01:00
Phil Booth 69fea40b9c
feat(ci): build docs and push to gh-pages branch 2019-04-09 19:00:59 +01:00
Les Orchard 97fac2f845
fix(scripts): fix paths to start mysql servers for local dev 2019-04-05 12:13:23 -04:00
Danny Coates 52e5d10a43 prepare for monorepo 2019-04-01 10:58:37 -07:00
Shane Tomlinson c70acd5a9f chore(install): Use `npm ci` in install_all.sh to avoid updates to package.json
We already do this in update_all.sh to avoid updates to package.json,
updating install_all.sh to act the same.
2019-03-27 08:32:20 +00:00
Vlad Filippov fcc37d08bf fix(script): remove oauth server from update script 2019-03-04 22:28:30 -05:00
Edouard Oger 21a2c812b1 fix(install): generate oauth server keys mozilla/fxa-local-dev#147) 2019-01-09 19:13:07 -05:00
Vlad Filippov 1733a920bd fix(update): update script to use npm ci mozilla/fxa-local-dev#144)
Fixes mozilla/fxa-local-dev#124
2018-12-24 15:47:00 -05:00
Vlad Filippov d5b9974aa9 Remove cargo override from install 2018-11-22 15:15:35 -05:00
Vlad Filippov 13dcbd20d5 refactor(oauth): remove oauth internal server mozilla/fxa-local-dev#134) 2018-11-21 14:40:06 -05:00