forked from redwoodjs/redwood
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Start of telemetry package * Add telemetry middleware to yargs * Attempt to time build command (doesn't work) * Add telemetry url config value, refactor diagnostic info getting, capture nodeEnv * Refactor, rename timer version * Don't worry about second argument to slice * Sanitize recorded command and strip paths from binaries in diagnostics * Flatten info structure * Switch to supabase/postgrest for submitting telemetry data * Typescriptify telemetry package * yarn.lock update * Get around circular dependency on internal <-> structure * Enforce row level security and inserts-only for anon user * Updates snapshot with telemetry config * Move telemetry to directory, use fork() for running send process * Try to unref() to force child detach * Swap fork to spawn * Add error handling function * Error telemetry looking good, adds 'build' type * Adds errorTelemetry to all CLI commands that catch errors * Adds ENV var for verbose telemetry * Use netlify endpoint for telemetry * Adds envinfo to internal * import node-fetch * Update config to real endpoint * Update a few generators to use errorTelemetry * Remove unused import * Snapshot update * Adds systeminformation package * Pull cpu core count and total memory * Move payload construction into separate function * Support multiple replacement text, add tests for argv santization * Removed unused variable, no response shown to user * Remove unused import * Set and cache UUID * Set 'command' to empty string if no argv * Send `create` telemetry event * Moves telemetry to separate package * CRA using new script in separate package * Removes debugging * Error handling in create * sendTelemetry working with create Thanks @dac09! * Can set version from command args (yarn create doesn't have a version of Redwood installed so getInfo() can't find it) * Adds ability to redact option flags * Merge package updates * Update telemetry version to match other packages * Fix version requirement * Fix envinfo version * Update import from internal -> telemetry * Update lint for all files in create-redwood-app/src * Remove telemetry URL from config * Moves telemetry tests * Add a couple missing global.__dirname = __dirname * Mock telemetry for all CLI commands * Move telemetry mock to standalone file * Add comment for eslint * Update telemetry version * Disable telemetry in e2e test app * Disable telemetry in GH workflow runs * Must return function call from timedTelemetry if disabled * Update telemetry to 0.40.0 * Update lock * Updates requirement of internal from telemetry * Re-generate lock AGAIN * Fix import * Updated lock file * Bad imports * Remove debugging error throw * yarn constraints --fix * Update dependency versions in telemetry * New URL for telemetry data post * Bump telemetry to 0.41.0 * Fix dependency version * Actually lock that update * Set REDWOOD_CI env var during cypress testing * Add redwoodCi to telemetry payload * yarn install * Update dependency versions * Simplify REDWOOD_CI check * Set REDWOOD_CI in execa defaults * Turn telemetry back on for create, add to a couple more commands * Disable telemetry for gitpod * Remove DO_NOT_TRACK check for telemetry * Try putting --no-telemetry flag back on e2e tests * yarn install * Update jest dependency in telemetry * Remove --no-telemetry on create * Put `--no-telemetry` back * update yarn.lock * add GitHub Action Telemetry Check * to revert: testing non-detached process * IDEs may not be present at all depending on environment (like CI) * refactor setup deploy errorTelemetry * remove env from E2E * more options for REDWOOD_VERBOSE_TELEMETRY * add telemetry CI commands * lint fixes * fix create-redwood-app telemetry; add CI verbose * update yarn.lock and lint --fix Co-authored-by: David Price <thedavid@thedavidprice.com>
- Loading branch information
1 parent
d45c500
commit 4c69711
Showing
50 changed files
with
679 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Telemetry Checks and Benchmarks | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
cypress-run: | ||
if: github.repository == 'redwoodjs/redwood' | ||
strategy: | ||
matrix: | ||
os: ['ubuntu-latest'] | ||
node-version: ['14', '16'] | ||
fail-fast: true | ||
runs-on: ${{ matrix.os }} | ||
name: ${{ matrix.os }} | Node ${{ matrix.node-version }} latest | ||
env: | ||
REDWOOD_CI: 1 | ||
REDWOOD_VERBOSE_TELEMETRY: 1 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
|
||
- name: Cache yarn | ||
uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
yarn- | ||
- name: Install dependencies and Build Framework | ||
run: | | ||
yarn install --immutable | ||
yarn build:clean && yarn build:js | ||
- name: Create a temporary directory | ||
id: createpath | ||
run: | | ||
project_path=$(mktemp -d -t redwood.XXXXXX) | ||
echo "::set-output name=project_path::$project_path" | ||
framework_path=$(pwd) | ||
echo "::set-output name=framework_path::$framework_path" | ||
- name: Create Redwood Project | ||
run: | | ||
yarn babel-node packages/create-redwood-app/src/create-redwood-app.js ${{ steps.createpath.outputs.project_path }} --no-yarn-install | ||
- name: Add Framework Dependencies to Project | ||
run: | | ||
yarn project:deps ${{ steps.createpath.outputs.project_path }} | ||
- name: Run Project Yarn Install | ||
run: | | ||
yarn install | ||
working-directory: ${{ steps.createpath.outputs.project_path }} | ||
|
||
- name: Copy Framework Packages to Project | ||
run: | | ||
yarn project:copy ${{ steps.createpath.outputs.project_path }} | ||
- name: Run `rw info` | ||
run: | | ||
yarn rw info | ||
working-directory: ${{ steps.createpath.outputs.project_path }} | ||
|
||
- name: Run `rw build` | ||
run: | | ||
yarn rw build | ||
working-directory: ${{ steps.createpath.outputs.project_path }} | ||
|
||
- name: Run "prisma migrate dev" | ||
run: | | ||
yarn rw prisma migrate dev --name ci-test | ||
working-directory: ${{ steps.createpath.outputs.project_path }} | ||
|
||
- name: Run "g page" | ||
run: | | ||
yarn rw g page home / | ||
working-directory: ${{ steps.createpath.outputs.project_path }} | ||
|
||
- name: Throw Error | Run `rw g sdl <model>` | ||
run: | | ||
yarn rw g sdl DoesNotExist | ||
working-directory: ${{ steps.createpath.outputs.project_path }} | ||
continue-on-error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/cli/src/commands/generate/function/__tests__/function.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/cli/src/commands/setup/auth/__tests__/addAuthConfigToApp.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/cli/src/commands/setup/auth/__tests__/authHandler.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.