-
Notifications
You must be signed in to change notification settings - Fork 286
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
chore(cacti): use lerna 8.1 instead of lerna lite #3369
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
# CI Build and Test Refactoring | ||
|
||
This epic builds on the proof of concept here: https://github.com/hyperledger/cacti/pull/3348 | ||
|
||
Intention is to refactor the cacti ci scripts to push logic from ci jobs to commonly defined targets in the base packages, to simplify ci logic and minimize changes to ci when new packages are introduced. These targets may be, for instance: | ||
|
||
- test | ||
- build:docker | ||
|
||
### Task Breakdown | ||
- [x] Switch from lerna-lite to lerna 8.1 to take advantage of the lerna --since syntax, which unlike 'lerna-lite changed', can use git to compute changed packages. This allows ci to easily identify cascading changes. | ||
- [ ] Programatically refactor ci.yaml: | ||
- [ ] Parse and output ci.yaml with no changes to prepare for programatic changes | ||
- [ ] Add test targets to individual package.json files to run jest and tape tests | ||
- [ ] Add build:docker targets to individual package:json files for scanning in ci | ||
- [ ] Add test:long target (or custom variable?) to individual packages which returns the name of long tests which must be run as individual jobs in ci | ||
- [ ] Integrate weaver packages (TBD) | ||
- [ ] Add package.json and nx.json files to the weaver fabric go SDK so file changes are visible to lerna | ||
- [ ] Expose weaver tests in ci as packages/cacti-test packages | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
"reset:git": "git clean -f -X", | ||
"reset:yarn-lock": "yarn run init-registries && yarn install --update-checksums --force", | ||
"reset": "run-s reset:git reset:node-modules reset:yarn-lock configure", | ||
"configure": "npm run init-registries && yarn install && yarn build:dev:backend", | ||
"configure": "npm run init-registries && NODE_OPTIONS=\"--max_old_space_size=3072\" yarn install && yarn build:dev:backend", | ||
"set-yarn-version": "yarn set version stable", | ||
"enable-corepack": "npm i -g corepack && corepack enable && corepack prepare [email protected] --activate", | ||
"custom-checks": "TS_NODE_PROJECT=./tools/tsconfig.json node --trace-deprecation --experimental-modules --abort-on-uncaught-exception --loader ts-node/esm --experimental-specifier-resolution=node ./tools/custom-checks/run-custom-checks.ts", | ||
|
@@ -129,12 +129,6 @@ | |
"@commitlint/config-conventional": "17.7.0", | ||
"@connectrpc/connect": "1.4.0", | ||
"@connectrpc/protoc-gen-connect-es": "1.4.0", | ||
"@lerna-lite/cli": "3.7.0", | ||
"@lerna-lite/exec": "3.7.0", | ||
"@lerna-lite/list": "3.7.0", | ||
"@lerna-lite/publish": "3.7.0", | ||
"@lerna-lite/run": "3.7.0", | ||
"@lerna-lite/version": "3.7.0", | ||
"@openapitools/openapi-generator-cli": "2.7.0", | ||
"@redocly/openapi-core": "1.15.0", | ||
"@types/adm-zip": "0.5.0", | ||
|
@@ -311,5 +305,8 @@ | |
"built": false | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"lerna": "^8.1.5" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jenniferlianne One more thing I just notced: Please put this under devDependencies. It doesn't really matter which one it is since all dependencies are dev dependencies in the root package.json anyway but still it's much better to have them organized into a single section. One more thing: Please pin it to an exact version, auto-upgrades open us up to nasty software-supply-chain attacks. |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it the case that with lerna we do not need this configuration option (as vs lerna lite)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RafaelAPB Good question, I'm not sure TBH. It could be that lerna ignores this option, but I didn't look up their docs. Maybe @jenniferlianne knows.