Skip to content

Commit

Permalink
Merge branch 'master' into pr/publish-for-major-bump
Browse files Browse the repository at this point in the history
* master: (45 commits)
  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)
  fix(migrate): fix cases where migrate engine was not stopped after an error (#8482)
  chore: add dash to studio update branch for better branch names (#8507)
  chore(deps): update dependency @prisma/studio-server to v0.418.0
  fix(tar): upgrade to 6.1.2 (#8501)
  ci: create action for studio updates (#8502)
  chore(deps): update dependency rollup to v2.55.0 (#8477)
  chore(deps): update dependency ts-jest to v27.0.4 (#8474)
  chore(deps): update devdependencies (non-major)
  chore(deps): update react-prisma
  chore(deps): update definitelytyped
  chore: update renovate: ignore engines wrapper pkgs (#8113)
  docs: remove "(ORM Replacement)" from repo (#8456)
  fix(deps): update engines to v2.28.0-17.89facabd0366f63911d089156a7a70125bfbcd27
  chore(deps): update dependency @prisma/studio-server to v0.417.0
  chore(deps): update codecov-action action to v2 [skip ci] (#8352)
  ...

# Conflicts:
#	scripts/ci/publish.ts
  • Loading branch information
Jolg42 committed Aug 2, 2021
2 parents 6426aae + 0229501 commit c752b02
Show file tree
Hide file tree
Showing 1,370 changed files with 25,979 additions and 9,656 deletions.
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: '3.7'
services:
app:
image: node:12
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ steps:
- label: ":llama: Publish"
timeout_in_minutes: 45
plugins:
- docker-compose#v3.7.0:
config: src/.buildkite/publish/docker-compose.yml
- docker-compose#v3.8.0:
config: .buildkite/publish/docker-compose.yml
run: app
- wait
4 changes: 0 additions & 4 deletions src/.buildkite/publish/run.sh → .buildkite/publish/run.sh
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: '3.7'
services:
app:
image: node:14
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
Original file line number Diff line number Diff line change
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
4 changes: 2 additions & 2 deletions src/.buildkite/test/test.yml → .buildkite/test/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ steps:
parallelism: 3
timeout_in_minutes: 25
plugins:
- docker-compose#v3.7.0:
config: src/.buildkite/test/docker-compose.14.yml
- docker-compose#v3.8.0:
config: .buildkite/test/docker-compose.14.yml
run: app

- wait
File renamed without changes.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
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 …
Original file line number Diff line number Diff line change
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
29 changes: 4 additions & 25 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@
"dependencyDashboard": true,
"reviewers": ["@jolg42", "@williamluke4", "millsp"],
"rebaseWhen": "conflicted",
"ignoreDeps": ["esbuild", "sqlite3"],
"ignoreDeps": ["esbuild", "sqlite3", "@prisma/engines", "@prisma/engines-version", "@prisma/fetch-engine", "@prisma/get-platform"],
"packageRules": [
{
"groupName": "devDependencies (non-major)",
"automerge": "true",
"depTypeList": ["devDependencies"],
"updateTypes": ["patch", "minor"],
"excludePackageNames": [
"@prisma/engines",
"@prisma/engines-version",
"@prisma/fetch-engine",
"@prisma/get-platform",
"@prisma/studio-server",
"checkpoint-client"
],
Expand All @@ -28,10 +24,6 @@
"depTypeList": ["dependencies"],
"updateTypes": ["patch", "minor"],
"excludePackageNames": [
"@prisma/engines",
"@prisma/engines-version",
"@prisma/fetch-engine",
"@prisma/get-platform",
"checkpoint-client"
],
"schedule": ["before 8am on Wednesday"]
Expand All @@ -42,31 +34,18 @@
"packagePatterns": ["^@types/"],
"updateTypes": ["patch", "minor"]
},
{
"groupName": "engines",
"automerge": "true",
"ignoreUnstable": false,
"followTag": "latest",
"reviewers": ["@jolg42", "@williamluke4", "millsp"],
"packageNames": [
"@prisma/engines",
"@prisma/engines-version",
"@prisma/fetch-engine",
"@prisma/get-platform"
]
},
{
"groupName": "Studio",
"automerge": "true",
"packageNames": ["@prisma/studio-server"],
"updateTypes": ["patch", "minor"],
"reviewers": ["@madebysid", "@jolg42"]
"reviewers": ["@madebysid", "@jolg42", "millsp"]
},
{
"groupName": "checkpoint-client",
"packageNames": ["checkpoint-client"],
"updateTypes": ["patch", "minor"],
"reviewers": ["@Weakky", "jolg42"]
"reviewers": ["@Weakky", "jolg42", "millsp"]
},
{
"groupName": "jest",
Expand All @@ -80,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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 c752b02

Please sign in to comment.