-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# New Changes - Adds node `22.2.0` support - Removes experimental `json` imports with standard typescript imports - This removes the need to use `assert` to grab objects out of `.json` files - #3622 - Adds **nan** `v2.19.0` to resolutions for node 22 compatibility - Updates docs to have a new `.md` file that gives detailed instructions on how to introduce new node versions of node - **Removes** outdated `generator-teraslice` package - Release: (minor) **teraslice** `v1.8.0` Ref to issue #3605
- Loading branch information
Showing
59 changed files
with
564 additions
and
1,760 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
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,83 @@ | ||
--- | ||
title: Updating Node Versions | ||
sidebar_label: Node | ||
--- | ||
|
||
## Adding a new node verison | ||
|
||
Updating node is a multi-step process that requires changes across multiple Terascope repositories. | ||
|
||
### 1. Updating Node in the Base Docker Image Repository | ||
|
||
Start by modifying the CI YAML files in the base-docker-image repository. | ||
|
||
https://github.com/terascope/base-docker-image | ||
|
||
|
||
#### Modify CI YAML Files | ||
|
||
There are two files that need to be updated to create new base images with the appropriate Node versions for Teraslice. These files are: | ||
|
||
- build.yml | ||
- release.yml | ||
|
||
Add the new Node version to the matrix list in both files. | ||
|
||
https://github.com/terascope/base-docker-image/tree/master/.github/workflows | ||
|
||
#### Push and Merge Changes | ||
|
||
Push your changes to a new branch. | ||
Once the changes are merged and a new release is made, the CI will create new base Docker images with the updated Node version. | ||
|
||
#### Verify New Docker Images | ||
|
||
The new Docker images will be available on Docker Hub here: | ||
|
||
https://hub.docker.com/r/terascope/node-base/tags | ||
|
||
### 2. Updating node in assets | ||
|
||
Before we can update teraslice we must update the assets. This is because teraslice e2e tests will break if we don't already have asset releases with the new node version. | ||
|
||
To start, update `teraslice-cli` to have the ability to build assets with the specified node version. | ||
|
||
Update the `bundleTarget` in teraslice/packages/teraslice-cli/src/helpers/asset-src.ts and the `bundle-target` `choices` array in teraslice/packages/teraslice-cli/src/helpers/yargs-options.ts | ||
|
||
Afterwards bump `teraslice-cli` and make a new npm release. | ||
|
||
Next we need to update the workflows repo to include the new node version: | ||
|
||
https://github.com/terascope/workflows | ||
|
||
Update node matrices in workflows/.github/workflows/asset-build-and-publish.yml and workflows/.github/workflows/asset-test.yml | ||
|
||
After it's merged, Copy hash from the merge of workflows and append to `uses` in .github/workflows/build-and-publish-asset.yml and .github/workflows/test-asset.yml of each of these assets: | ||
|
||
- https://github.com/terascope/file-assets | ||
- https://github.com/terascope/standard-assets | ||
- https://github.com/terascope/kafka-assets | ||
- https://github.com/terascope/elasticsearch-assets | ||
|
||
Example `test-asset.yml`: | ||
|
||
```yaml | ||
jobs: | ||
call-asset-test-workflow: | ||
uses: terascope/workflows/.github/workflows/asset-test.yml@ieqo2423biu22 <- Replace everything after `@` w/ new merge hash | ||
secrets: inherit | ||
``` | ||
**_IMPORTANT NOTE:_** elasticsearch-assets has it's own `test-asset.yml` so it's important to manually add the node version to the matrices of that file. | ||
|
||
Create all new releases for the assets before moving on to the next step. | ||
|
||
### 3. Updating node in teraslice | ||
|
||
Add the new node version to all the spots needed inside each file in `.github/workflows` in teraslice. | ||
|
||
- publish-master.yml | ||
- publish-tag.yml | ||
- test.yml | ||
|
||
Once the node version has been added to the arrays of all the workflow .yml files, pushing the branch and making a new PR should trigger CI to run new tests with the added node version. Once all tests are passing, then a new node version has been succesfully introduced to teraslice. |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
export default { | ||
name: 'generator', | ||
slicers: 1, | ||
lifecycle: 'persistent', | ||
workers: 2, | ||
analytics: false, | ||
assets: ['elasticsearch', 'standard'], | ||
max_retries: 0, | ||
operations: [ | ||
{ | ||
_op: 'data_generator', | ||
size: 100 | ||
}, | ||
{ | ||
_op: 'elasticsearch_bulk', | ||
index: 'replace-me-1000', | ||
type: 'events', | ||
size: 1000 | ||
} | ||
] | ||
}; |
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
export default { | ||
name: 'generator-asset', | ||
slicers: 1, | ||
lifecycle: 'persistent', | ||
workers: 2, | ||
assets: ['ex1', 'standard'], | ||
max_retries: 0, | ||
analytics: false, | ||
operations: [ | ||
{ | ||
_op: 'data_generator', | ||
size: 1000 | ||
}, | ||
{ | ||
_op: 'drop_property', | ||
property: 'userAgent' | ||
}, | ||
{ | ||
_op: 'delay', | ||
ms: 100 | ||
} | ||
] | ||
}; |
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
export default { | ||
name: 'generator', | ||
slicers: 1, | ||
lifecycle: 'once', | ||
workers: 3, | ||
analytics: false, | ||
assets: ['standard', 'large-example-asset'], | ||
max_retries: 0, | ||
operations: [ | ||
{ | ||
_op: 'data_generator', | ||
size: 1000, | ||
stress_test: false | ||
}, | ||
{ | ||
_op: 'noop' | ||
} | ||
] | ||
}; |
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
export default { | ||
name: 'generator', | ||
slicers: 1, | ||
lifecycle: 'persistent', | ||
workers: 3, | ||
analytics: false, | ||
assets: ['standard'], | ||
max_retries: 0, | ||
operations: [ | ||
{ | ||
_op: 'data_generator', | ||
size: 1000, | ||
stress_test: false | ||
}, | ||
{ | ||
_op: 'noop' | ||
} | ||
] | ||
}; |
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
export default { | ||
name: 'ID_Reindex', | ||
lifecycle: 'once', | ||
analytics: true, | ||
slicers: 2, | ||
workers: 4, | ||
assets: ['elasticsearch'], | ||
operations: [ | ||
{ | ||
_op: 'id_reader', | ||
index: 'replace-me-1000', | ||
type: 'events', | ||
size: 500, | ||
key_type: 'base64url' | ||
}, | ||
{ | ||
_op: 'elasticsearch_bulk', | ||
index: 'test-id_reindex-1000', | ||
type: 'events', | ||
size: 200 | ||
} | ||
] | ||
}; |
Oops, something went wrong.