Skip to content

Commit

Permalink
Update to yarn 4 (#3887)
Browse files Browse the repository at this point in the history
This PR makes the following changes:

## Changes

- Updates `teraslice` repo from yarn `v1.22.19` to yarn `v4.6.0`
- Updates `website` repo form yarn `v1.22.19` to yarn `v4.6.0`
- Updates `teraslice-cli` test assets fixture repo to be compliant with
yarn 4
- Updates all `package.json` test scripts in the packages directory to
be compliant with yarn 4's explicit dependency scope restrictions
- In this case, `@teraslice/scripts` was only a dependency at the
top-level, which is caused all `workspaces` that doesn't have
`@teraslice/scripts` to not find the scripts binary within it's
directory.
- Yarn 1 had a loose dependency resolution algorithm where yarn 4
enforces explicit dependencies.
  - https://yarnpkg.com/blog/release/4.0#javascript-constraints

## Bumped Packages
- release: (**minor**) **teraslice@2.12.0**
- bump: (**minor**) **teraslice-cli@2.10.0**
- bump: (patch) **@terascope/data-mate@1.7.1**
- bump: (patch) **elasticsearch-store@1.7.1**
- bump: (patch) **terafoundation@1.9.1**
- bump: (patch) **ts-transforms@1.7.1**
- bump: (patch) **@terascope/data-types@1.7.1**
- bump: (patch) **@terascope/docker-compose-js@1.4.4**
- bump: (patch) **@terascope/elasticsearch-api@4.7.1**
- bump: (patch) **@terascope/teraslice-state-storage@1.7.1**
- bump: (patch) **@terascope/eslint-config@1.1.4**
- bump: (patch) **@terascope/job-components@1.9.1**
- bump: (patch) **teraslice-client-js@1.7.1**
- bump: (patch) **@terascope/teraslice-messaging@1.10.1**
  • Loading branch information
sotojn authored and busma13 committed Jan 10, 2025
1 parent bf851ac commit 3f2449a
Show file tree
Hide file tree
Showing 47 changed files with 28,683 additions and 167,352 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/daily-docker-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ on:

jobs:
call-refresh-docker-cache-workflow:
uses: terascope/workflows/.github/workflows/refresh-docker-cache.yml@f5e098fa861fe7744fa61842e82124f806364be9
uses: terascope/workflows/.github/workflows/refresh-docker-cache.yml@f86f716e47d989b939d978befa7721c1f5b10134
secrets: inherit
4 changes: 1 addition & 3 deletions .github/workflows/publish-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ jobs:
cache: 'yarn'

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false --silent"
run: yarn && yarn setup

- name: Publish to npm
run: yarn ts-scripts publish -t latest npm
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/publish-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ jobs:
cache: 'yarn'

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false --silent"
run: yarn && yarn setup

- name: Publish to npm
run: yarn ts-scripts publish -t tag npm
Expand Down Expand Up @@ -58,9 +56,7 @@ jobs:
cache: 'yarn'

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false --silent"
run: yarn && yarn setup

- name: Publish to docker
run: yarn ts-scripts publish -t tag -n ${{ matrix.node-version }} docker
68 changes: 23 additions & 45 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,15 @@ jobs:
cache: 'yarn'

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false"
run: YARN_ENABLE_HARDENED_MODE=1 yarn && yarn setup

check-docker-limit-before:
uses: terascope/workflows/.github/workflows/check-docker-limit.yml@f5e098fa861fe7744fa61842e82124f806364be9
uses: terascope/workflows/.github/workflows/check-docker-limit.yml@f86f716e47d989b939d978befa7721c1f5b10134
secrets: inherit

cache-docker-images:
needs: check-docker-limit-before
uses: terascope/workflows/.github/workflows/cache-docker-images.yml@f5e098fa861fe7744fa61842e82124f806364be9
uses: terascope/workflows/.github/workflows/cache-docker-images.yml@f86f716e47d989b939d978befa7721c1f5b10134
secrets: inherit

linux-unit-tests:
Expand All @@ -71,12 +69,10 @@ jobs:
cache: 'yarn'

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false"
run: yarn && yarn setup

- name: Test
run: yarn --silent test -- --suite unit --
run: yarn test --suite unit --

teraslice-elasticsearch-tests:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -105,9 +101,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false"
run: yarn && yarn setup

- name: Create Docker Image List
run: |
Expand All @@ -122,7 +116,7 @@ jobs:
key: docker-images-${{ hashFiles('./images/image-list.txt') }}

- name: Test ${{ matrix.search-version }}
run: yarn --silent test:${{ matrix.search-version }}
run: yarn test:${{ matrix.search-version }}
working-directory: ./packages/teraslice

elasticsearch-store-tests:
Expand Down Expand Up @@ -152,9 +146,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false"
run: yarn && yarn setup

- name: Create Docker Image List
run: |
Expand All @@ -169,7 +161,7 @@ jobs:
key: docker-images-${{ hashFiles('./images/image-list.txt') }}

- name: Test ${{ matrix.search-version }}
run: yarn --silent test:${{ matrix.search-version }}
run: yarn test:${{ matrix.search-version }}
working-directory: ./packages/elasticsearch-store

lint-and-sync:
Expand All @@ -188,9 +180,7 @@ jobs:
cache: 'yarn'

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false"
run: yarn && yarn setup

- name: Lint codebase
run: yarn lint
Expand Down Expand Up @@ -225,9 +215,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false"
run: yarn && yarn setup

- name: Create Docker Image List
run: |
Expand All @@ -242,7 +230,7 @@ jobs:
key: docker-images-${{ hashFiles('./images/image-list.txt') }}

- name: Test ${{ matrix.search-version }}
run: yarn --silent test:${{ matrix.search-version }}
run: yarn test:${{ matrix.search-version }}
working-directory: ./packages/elasticsearch-api

e2e-tests:
Expand Down Expand Up @@ -272,9 +260,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false"
run: yarn && yarn setup

- name: Create Docker Image List
run: |
Expand All @@ -293,7 +279,7 @@ jobs:
working-directory: ./e2e

- name: Test ${{ matrix.search-version }}
run: NODE_VERSION=${{ matrix.node-version }} yarn --silent test:${{ matrix.search-version }}
run: NODE_VERSION=${{ matrix.node-version }} yarn test:${{ matrix.search-version }}
working-directory: ./e2e

e2e-k8s-tests:
Expand Down Expand Up @@ -322,9 +308,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false"
run: yarn && yarn setup

- name: Create Docker Image List
run: |
Expand All @@ -348,7 +332,7 @@ jobs:
install_only: "true"

- name: Test k8s elasticsearch7
run: NODE_VERSION=${{ matrix.node-version }} yarn --silent test:k8s
run: NODE_VERSION=${{ matrix.node-version }} yarn test:k8s
working-directory: ./e2e

e2e-k8s-v2-tests:
Expand Down Expand Up @@ -377,9 +361,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false"
run: yarn && yarn setup

- name: Create Docker Image List
run: |
Expand All @@ -403,7 +385,7 @@ jobs:
install_only: "true"

- name: Test k8s V2 elasticsearch7
run: NODE_VERSION=${{ matrix.node-version }} yarn --silent test:k8sV2
run: NODE_VERSION=${{ matrix.node-version }} yarn test:k8sV2
working-directory: ./e2e

e2e-external-storage-tests:
Expand Down Expand Up @@ -432,9 +414,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false"
run: yarn && yarn setup

- name: Create Docker Image List
run: |
Expand All @@ -453,7 +433,7 @@ jobs:
working-directory: ./e2e

- name: Test external Asset Storage opensearch1
run: NODE_VERSION=${{ matrix.node-version }} yarn --silent test:s3AssetStorage
run: NODE_VERSION=${{ matrix.node-version }} yarn test:s3AssetStorage
working-directory: ./e2e

e2e-external-storage-tests-encrypted:
Expand Down Expand Up @@ -482,9 +462,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install and build packages
run: yarn setup
env:
YARN_SETUP_ARGS: "--prod=false"
run: yarn && yarn setup

- name: Create Docker Image List
run: |
Expand Down Expand Up @@ -515,7 +493,7 @@ jobs:
working-directory: ./e2e

- name: Test external Asset Storage opensearch1
run: ENCRYPT_MINIO=true NODE_VERSION=${{ matrix.node-version }} yarn --silent test:s3AssetStorage
run: ENCRYPT_MINIO=true NODE_VERSION=${{ matrix.node-version }} yarn test:s3AssetStorage
working-directory: ./e2e

check-docker-limit-after:
Expand All @@ -529,5 +507,5 @@ jobs:
elasticsearch-store-tests,
teraslice-elasticsearch-tests
]
uses: terascope/workflows/.github/workflows/check-docker-limit.yml@f5e098fa861fe7744fa61842e82124f806364be9
uses: terascope/workflows/.github/workflows/check-docker-limit.yml@f86f716e47d989b939d978befa7721c1f5b10134
secrets: inherit
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ webiste/.cache-loader
website/build/
website/node_modules
website/i18n/*
website/.yarn/install-state.gz
docs/packages/*/api

.ts-test-config

# CI test files
images/*

# .yarn
.yarn/install-state.gz
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/node_modules/jest-config/build/ValidConfig.js b/node_modules/jest-config/build/ValidConfig.js
index 0c1250c..67e586e 100644
--- a/node_modules/jest-config/build/ValidConfig.js
+++ b/node_modules/jest-config/build/ValidConfig.js
diff --git a/build/ValidConfig.js b/build/ValidConfig.js
index 0c1250c4da55984ef3ef0befb3bbf3c2133fe912..67e586e0f664629e18553927325f912c1b25a409 100644
--- a/build/ValidConfig.js
+++ b/build/ValidConfig.js
@@ -331,6 +331,7 @@ const initialProjectOptions = {
['/__tests__/\\.test\\.[jt]sx?$', '/__tests__/\\.spec\\.[jt]sx?$']
),
Expand Down
Loading

0 comments on commit 3f2449a

Please sign in to comment.