Skip to content

Commit

Permalink
Merge branch 'master' into pr/test-getConfig-provider-array-fix
Browse files Browse the repository at this point in the history
* master:
  fix(db pull): only output schema to stdout when using --print (#8551)
  chore(deps): update engines to 2.29.0-12.8b139c140bd01ba4dd6c98f44a1edac48baa58e2 (#8552)
  ci: fix publish
  ci: debug publish
  ci: prepare for major bump (#8240)
  Update update-studio-version.yml
  fix(migrate): db push after reset if unexecutable step (#8540)
  chore(deps): update engines to 2.29.0-10.e60a94c3a98104c76460aa8ab556c33fab0e3781 (#8545)
  chore(deps): update engines to 2.29.0-9.b0d6f0c282944bba506eed792838c02fdbdab0f8 (#8542)
  chore(deps): update engines to 2.29.0-7.10fbb58853d626be41afb2930e56e0a36afefb9f (#8538)
  chore: disable migrate logging
  feat(migrate): Allow migration engine to log to stdout (#7896)
  chore: pin dependencies (#8534)
  chore(deps): update engines to 2.29.0-5.8062e306decdf2fe2c2dcb8409c513a2023c8653 (#8533)
  chore(deps): update fkirc/skip-duplicate-actions action to v3.4.1 (#8528)
  chore: move buildkite folder + fix publish (#8531)
  chore(prisma): type discovery + fast builds + clean monorepo (#8497)
  • Loading branch information
Jolg42 committed Aug 3, 2021
2 parents 442f366 + 87d8673 commit 7a6ad37
Show file tree
Hide file tree
Showing 1,369 changed files with 8,383 additions and 9,509 deletions.
Expand Up @@ -13,8 +13,8 @@ cd ..

# Any update here needs to be done for
# - https://github.com/prisma/prisma/blob/master/.github/workflows/test.yml#L8 GitHub Actions
# - https://github.com/prisma/prisma/blob/master/src/.buildkite/test/buildkite-entry.sh
EXCLUDE_LIST="*.bench.ts,docs,.vscode,examples,src/graphs,README.md,LICENSE,CONTRIBUTING.md,.github"
# - https://github.com/prisma/prisma/blob/master/.buildkite/test/buildkite-entry.sh
EXCLUDE_LIST="*.bench.ts,docs,.vscode,examples,graphs,README.md,LICENSE,CONTRIBUTING.md,.github"
echo $EXCLUDE_LIST
node last-git-changes/bin.js --exclude="$EXCLUDE_LIST"
export CHANGED_COUNT=$(node last-git-changes/bin.js --exclude="$EXCLUDE_LIST" | wc -l)
Expand All @@ -25,7 +25,7 @@ echo $BUILDKITE_SOURCE
echo $UPDATE_STUDIO

if [ $CHANGED_COUNT -gt 0 ] || [ $BUILDKITE_TAG ] || [ $BUILDKITE_SOURCE == "trigger_job" ] || [ $UPDATE_STUDIO ]; then
buildkite-agent pipeline upload src/.buildkite/publish/publish.yml
buildkite-agent pipeline upload .buildkite/publish/publish.yml
else
echo "Nothing changed"
fi
Expand Up @@ -3,9 +3,9 @@ services:
app:
image: node:12-buster
volumes:
- ../../../:/app
- ../../:/app
working_dir: /app
command: /app/src/.buildkite/publish/run.sh
command: /app/.buildkite/publish/run.sh
environment:
# PostgreSQL
- TEST_POSTGRES_URI_MIGRATE=postgres://prisma:prisma@postgres:5432/tests-migrate
Expand Down
Expand Up @@ -3,6 +3,6 @@ steps:
timeout_in_minutes: 45
plugins:
- docker-compose#v3.8.0:
config: src/.buildkite/publish/docker-compose.yml
config: .buildkite/publish/docker-compose.yml
run: app
- wait
4 changes: 0 additions & 4 deletions src/.buildkite/publish/run.sh → .buildkite/publish/run.sh
Expand Up @@ -46,8 +46,6 @@ npm i --silent -g pnpm@6 --unsafe-perm
retry 6 pnpm i --no-prefer-frozen-lockfile
pnpm run lint

cd src

if [ "$DEVELOPMENT_ENVIRONMENT_COMMIT" ]; then
git stash
git checkout $DEVELOPMENT_ENVIRONMENT_COMMIT
Expand All @@ -56,8 +54,6 @@ fi
node -v
npm -v

retry 6 pnpm i --no-prefer-frozen-lockfile

pnpm run setup

cd packages/integration-tests
Expand Down
Expand Up @@ -13,8 +13,8 @@ cd ..

# Any update here needs to be done for
# - https://github.com/prisma/prisma/blob/master/.github/workflows/test.yml#L8 GitHub Actions
# - https://github.com/prisma/prisma/blob/master/src/.buildkite/publish/buildkite-entry.sh
EXCLUDE_LIST="*.bench.ts,docs,.vscode,examples,src/scripts/ci/publish.ts,src/graphs,README.md,LICENSE,CONTRIBUTING.md,.github"
# - https://github.com/prisma/prisma/blob/master/.buildkite/publish/buildkite-entry.sh
EXCLUDE_LIST="*.bench.ts,docs,.vscode,examples,scripts/ci/publish.ts,graphs,README.md,LICENSE,CONTRIBUTING.md,.github"
echo $EXCLUDE_LIST
node last-git-changes/bin.js --exclude="$EXCLUDE_LIST"
export CHANGED_COUNT=$(node last-git-changes/bin.js --exclude="$EXCLUDE_LIST" | wc -l)
Expand All @@ -23,7 +23,7 @@ echo $BUILDKITE_TAG
echo $CHANGED_COUNT

if [ $CHANGED_COUNT -gt 0 ]; then
buildkite-agent pipeline upload src/.buildkite/test/test.yml
buildkite-agent pipeline upload .buildkite/test/test.yml
else
echo "Nothing changed"
fi
Expand Down
Expand Up @@ -3,9 +3,9 @@ services:
app:
image: node:14-buster
volumes:
- ../../../:/app
- ../../:/app
working_dir: /app
command: /app/src/.buildkite/test/run.sh
command: /app/.buildkite/test/run.sh
environment:
# PostgreSQL
- TEST_POSTGRES_URI_MIGRATE=postgres://prisma:prisma@postgres:5432/tests-migrate
Expand Down
14 changes: 5 additions & 9 deletions src/.buildkite/test/run.sh → .buildkite/test/run.sh
Expand Up @@ -41,6 +41,11 @@ function retry {
return 0
}

# Only for job 2 = Node-API
if [ "$BUILDKITE_PARALLEL_JOB" = "2" ]; then
export PRISMA_FORCE_NAPI=true
fi

npm i --silent -g pnpm@6 --unsafe-perm

retry 6 pnpm i --no-prefer-frozen-lockfile
Expand All @@ -50,18 +55,9 @@ if [ "$BUILDKITE_PARALLEL_JOB" = "0" ]; then
pnpm run lint
fi

# Only for job 2 = Node-API
if [ "$BUILDKITE_PARALLEL_JOB" = "2" ]; then
export PRISMA_FORCE_NAPI=true
fi

node -v
npm -v

cd src

retry 6 pnpm i --no-prefer-frozen-lockfile

pnpm run setup

pnpm run test
2 changes: 1 addition & 1 deletion src/.buildkite/test/test.yml → .buildkite/test/test.yml
Expand Up @@ -4,7 +4,7 @@ steps:
timeout_in_minutes: 25
plugins:
- docker-compose#v3.8.0:
config: src/.buildkite/test/docker-compose.14.yml
config: .buildkite/test/docker-compose.14.yml
run: app

- wait
File renamed without changes.
4 changes: 2 additions & 2 deletions .eslintrc.js
Expand Up @@ -2,7 +2,7 @@ const globby = require("globby");
const fs = require("fs");
const path = require("path");

const ignoreFiles = globby.sync("src/packages/*/.eslintignore");
const ignoreFiles = globby.sync("packages/*/.eslintignore");

const ignorePatterns = flatten(
flatten(
Expand Down Expand Up @@ -33,7 +33,7 @@ module.exports = {
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
project: ["./src/packages/*/tsconfig.eslint.json"],
project: ["./packages/*/tsconfig.eslint.json"],
// debugLevel: true,
},
ignorePatterns,
Expand Down
34 changes: 17 additions & 17 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -2,26 +2,26 @@

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
* @Jolg42 @williamluke4 @millsp
* @Jolg42 @williamluke4 @millsp

# root
/.github/ @Jolg42 @williamluke4
/.github/ @Jolg42 @williamluke4
/.github/workflows/benchmark.yml @williamluke4
/scripts/ @Jolg42 @williamluke4
/graphs/ @williamluke4
/scripts/ @Jolg42 @williamluke4
/graphs/ @williamluke4

# src
/src/.buildkite/ @Jolg42 @williamluke4
/src/scripts/ @Jolg42
/.buildkite/ @Jolg42 @williamluke4 @millsp
/scripts/ @Jolg42

# src/packages
/src/packages/cli/ @Jolg42 @williamluke4 @millsp
/src/packages/client/ @williamluke4 @millsp
/src/packages/debug/ @williamluke4 @millsp
/src/packages/engine-core/ @williamluke4 @millsp
/src/packages/generator-helper/ @williamluke4 @millsp
/src/packages/get-platform/ @williamluke4 @millsp
/src/packages/migrate/ @Jolg42
/src/packages/react-prisma/ @williamluke4 @millsp
/src/packages/sdk/ @Jolg42 @williamluke4 @millsp
/src/packages/integration-tests/ @williamluke4 @millsp
# packages
/packages/cli/ @Jolg42 @williamluke4 @millsp
/packages/client/ @williamluke4 @millsp
/packages/debug/ @williamluke4 @millsp
/packages/engine-core/ @williamluke4 @millsp
/packages/generator-helper/ @williamluke4 @millsp
/packages/get-platform/ @williamluke4 @millsp
/packages/migrate/ @Jolg42
/packages/react-prisma/ @williamluke4 @millsp
/packages/sdk/ @Jolg42 @williamluke4 @millsp
/packages/integration-tests/ @williamluke4 @millsp
2 changes: 1 addition & 1 deletion .github/renovate.json
Expand Up @@ -59,7 +59,7 @@
},
{
"groupName": "react-prisma",
"paths": ["src/packages/react-prisma/**"],
"paths": ["packages/react-prisma/**"],
"rangeStrategy": "replace",
"schedule": ["before 8am on Wednesday"]
}
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/benchmark.yml
Expand Up @@ -7,18 +7,18 @@ on:
paths-ignore:
# Any update here needs to be done for
# - `pull_request` see below
# - https://github.com/prisma/prisma/blob/master/src/.buildkite/test/buildkite-entry.sh
# - https://github.com/prisma/prisma/blob/master/src/.buildkite/publish/buildkite-entry.sh
# - https://github.com/prisma/prisma/blob/master/.buildkite/test/buildkite-entry.sh
# - https://github.com/prisma/prisma/blob/master/.buildkite/publish/buildkite-entry.sh
- "*.md"
- ".vscode/**"
- "docs/**"
- "examples/**"
- "LICENSE"
- '.github/CODEOWNERS'
- "src/.buildkite/**"
- "src/.dockerignore"
- "src/scripts/ci/publish.ts"
- "src/graphs/**"
- ".dockerignore"
- "scripts/ci/publish.ts"
- "graphs/**"

env:
PRISMA_TELEMETRY_INFORMATION: "prisma benchmark.yml"
Expand Down Expand Up @@ -47,7 +47,6 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}

# This is required as setup.sh can modify pnpm-lock.yml
- run: rm -f src/pnpm-lock.yaml
- run: rm -f ./pnpm-lock.yaml

- name: Run benchmarks
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/detect-jobs-to-run.js
Expand Up @@ -35,27 +35,27 @@ async function main() {
// If changes are located only in one of the paths below
if (
filesChanged.every((fileChanged) =>
fileChanged.startsWith("src/packages/cli/")
fileChanged.startsWith("packages/cli/")
)
) {
jobsToRun.push("-cli-");
} else if (
filesChanged.every((fileChanged) =>
fileChanged.startsWith("src/packages/client/")
fileChanged.startsWith("packages/client/")
)
) {
jobsToRun.push("-client-");
jobsToRun.push("-integration-tests-");
jobsToRun.push("-cli-");
} else if (
filesChanged.every((fileChanged) =>
fileChanged.startsWith("src/packages/integration-tests/")
fileChanged.startsWith("packages/integration-tests/")
)
) {
jobsToRun.push("-integration-tests-");
} else if (
filesChanged.every((fileChanged) =>
fileChanged.startsWith("src/packages/migrate/")
fileChanged.startsWith("packages/migrate/")
)
) {
jobsToRun.push("-migrate-");
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/setup.sh
Expand Up @@ -4,9 +4,6 @@ set -ex

npm i --silent -g pnpm@6 --unsafe-perm

pnpm i --no-prefer-frozen-lockfile
cd src

pnpm i --no-prefer-frozen-lockfile

pnpm run setup

0 comments on commit 7a6ad37

Please sign in to comment.