Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert yarn4 #7334

Merged
merged 6 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@
!README.md
!frontend
frontend/node_modules
!.yarn/**
!.yarnrc.yml
!frontend/.yarn/**
node_modules
4 changes: 1 addition & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ jobs:
with:
node-version: 20.x
cache: 'yarn'
- run: yarn install --immutable
env:
YARN_ENABLE_SCRIPTS: false
- run: yarn install --frozen-lockfile --ignore-scripts
- run: yarn lint
- run: yarn build:backend
- run: yarn run test:report # This adds test results as github check to the workflow
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_frontend_prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20.x
- run: yarn --immutable
- run: yarn run lint:material:icons
- run: yarn --frozen-lockfile
- run: yarn run lint:check
- run: yarn run test
- run: yarn run ts:check # TODO: optimize
2 changes: 1 addition & 1 deletion .github/workflows/docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: [ 20.14.0-alpine ]
version: [20.13.1-alpine]
steps:
- name: Checkout tag v${{ inputs.version }}
if: ${{ inputs.version != '' }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/e2e.frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Run Cypress
uses: cypress-io/github-action@v6
uses: cypress-io/github-action@v5
with:
working-directory: frontend
env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all
config: baseUrl=${{ github.event.deployment_status.target_url }}
spec: cypress/integration/${{ matrix.test }}
install-command: yarn --immutable
4 changes: 2 additions & 2 deletions .github/workflows/gradual-strict-null-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ jobs:
YARN_1="yarn --mutex network --cwd ./current"
YARN_2="yarn --mutex network --cwd ./main"

$YARN_1 install &> /dev/null && $YARN_1 build:backend --strictNullChecks true 2> .stderr-current > .out-current &
$YARN_1 install --ignore-scripts &> /dev/null && $YARN_1 build:backend --strictNullChecks true 2> .stderr-current > .out-current &
pid1=$!
$YARN_2 install &> /dev/null && $YARN_2 build:backend --strictNullChecks true 2> .stderr-main > .out-main &
$YARN_2 install --ignore-scripts &> /dev/null && $YARN_2 build:backend --strictNullChecks true 2> .stderr-main > .out-main &
pid2=$!

# wait for the processes that are expected to fail
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/notify_enterprise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'
- name: Trigger sync
uses: actions/github-script@v7
env:
Expand All @@ -43,7 +42,7 @@ jobs:
- name: Build static assets
run: |
cd frontend
yarn install --immutable
yarn install --frozen-lockfile
yarn build
- uses: aws-actions/configure-aws-credentials@v2
with:
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/publish-new-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ concurrency:

permissions:
contents: write
id-token: write
id-token: write

on:
workflow_dispatch:
Expand All @@ -30,7 +30,7 @@ jobs:

strategy:
matrix:
node-version: [ 20.x ]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -66,12 +66,10 @@ jobs:
else
echo "No changes to CHANGELOG.md"
fi
- run: yarn install --immutable
env:
YARN_ENABLE_SCRIPTS: false
- run: yarn install --frozen-lockfile --ignore-scripts
- name: npm version
run: |
npm version ${{ github.event.inputs.version }}
npm version ${{ github.event.inputs.version }} --ignore-scripts
git push origin ${{ github.ref_name }}
git push --tags
env:
Expand Down Expand Up @@ -106,10 +104,8 @@ jobs:
run: git checkout origin/${{ github.ref_name }} -- CHANGELOG.md
- name: lint
run: |
yarn install --immutable
yarn install --frozen-lockfile --ignore-scripts
yarn lint:fix
env:
YARN_ENABLE_SCRIPTS: false
- name: push changes
run: |
git add package.json CHANGELOG.md
Expand All @@ -122,7 +118,7 @@ jobs:
secrets: inherit
with:
version: ${{ github.event.inputs.version }}

publish-npm:
needs: build
uses: ./.github/workflows/release.yaml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
cache: 'yarn'
- name: Build
run: |
yarn install --immutable
yarn install --frozen-lockfile
- name: Publish to npm
run: |
LATEST=$(npm show unleash-server version)
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/validate-migrations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'
node-version: 20.x
cache: 'yarn'
- name: Start database
working-directory: test-migrations
run: docker compose up db -d --wait -t 90
Expand All @@ -29,18 +29,16 @@ jobs:
# add some data with terraform
- name: Apply migrations
env:
DATABASE_URL: postgres://postgres:unleash@localhost:5432/unleash
DATABASE_SSL: false
YARN_ENABLE_SCRIPTS: false
DATABASE_URL: postgres://postgres:unleash@localhost:5432/unleash
DATABASE_SSL: false
run: |
yarn install --immutable
yarn install --frozen-lockfile --ignore-scripts
yarn db-migrate up
# run ui tests against previous version of Unleash
- name: Run Cypress
uses: cypress-io/github-action@v6
uses: cypress-io/github-action@v5
with:
working-directory: frontend
env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all
config: baseUrl=http://localhost:4242
spec: cypress/oss/**/*.spec.ts
install-command: yarn --immutable
Binary file removed .yarn/install-state.gz
Binary file not shown.
894 changes: 0 additions & 894 deletions .yarn/releases/yarn-4.2.2.cjs

This file was deleted.

3 changes: 0 additions & 3 deletions .yarnrc.yml

This file was deleted.

4 changes: 0 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ Before you begin:
- Have you read the [code of conduct](CODE_OF_CONDUCT.md)?
- Check out the [existing issues](https://github.com/unleash/Unleash/issues)
- Browse the [developer-guide](./website/docs/contributing/developer-guide.md) for tips on environment setup, running the tests, and running Unleash from source.
- You need
- Node 20
- corepack enabled `corepack enable`
- yarn installed globally `npm install -g yarn`

### Don't see your issue? Open one

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ WORKDIR /unleash

COPY . /unleash

RUN corepack enable
RUN yarn config set network-timeout 300000

RUN yarn install --immutable && yarn prepare:backend && yarn local:package
RUN yarn install --frozen-lockfile --ignore-scripts && yarn prepare:backend && yarn local:package

# frontend/build should already exist (it needs to be built in the local filesystem but in case of a fresh build we'll build it here)
RUN yarn build:frontend:if-needed
Expand All @@ -17,7 +17,7 @@ RUN mkdir -p /unleash/build/frontend && mv /unleash/frontend/build /unleash/buil

WORKDIR /unleash/docker

RUN yarn workspaces focus -A --production
RUN yarn install --frozen-lockfile --production=true

FROM node:$NODE_VERSION

Expand Down
8 changes: 2 additions & 6 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@
"src/test/examples/*.json",
".docusaurus",
"coverage",
"CHANGELOG.md",
"./package.json",
"./frontend/package.json"
"CHANGELOG.md"
]
},
"organizeImports": {
Expand All @@ -76,9 +74,7 @@
"coverage",
"website/build",
"website/global.js",
".docusaurus",
"./package.json",
"./frontend/package.json"
".docusaurus"
],
"indentWidth": 4
},
Expand Down
Binary file removed docker/.yarn/install-state.gz
Binary file not shown.
Loading
Loading