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

build: fix release automation #2175

Closed
petermetz opened this issue Oct 19, 2022 · 3 comments · Fixed by #2180, #2194 or #3315
Closed

build: fix release automation #2175

petermetz opened this issue Oct 19, 2022 · 3 comments · Fixed by #2180, #2194 or #3315
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file Developer_Experience documentation Improvements or additions to documentation P1 Priority 1: Highest SPIKE Exploratory work to better scope additional effort

Comments

@petermetz
Copy link
Contributor

petermetz commented Oct 19, 2022

When I run the release automation to publish the packages to npm, it crashes
because some of the package.json files do not contain a publishConfig property.

$ yarn lerna publish from-git --loglevel=debug
lerna-lite verb publish @hyperledger/cactus-common
lerna-lite verb publish @hyperledger/cactus-plugin-ledger-connector-fabric-socketio
lerna-lite verb publish @hyperledger/cactus-plugin-ledger-connector-go-ethereum-socketio
lerna-lite verb publish @hyperledger/cactus-plugin-ledger-connector-sawtooth-socketio
lerna-lite sill HttpErrorGeneral: 404 Not Found - PUT https://registry.npmjs.org/@hyperledger%2fcactus-plugin-ledger-connector-go-ethereum-socketio - Not found
lerna-lite sill     at /.../cactus/node_modules/npm-registry-fetch/lib/check-response.js:93:15
lerna-lite sill     at processTicksAndRejections (node:internal/process/task_queues:96:5)
lerna-lite sill     at async publish (/.../cactus/node_modules/libnpmpublish/lib/publish.js:43:12)
lerna-lite sill     at async /.../cactus/node_modules/p-pipe/index.js:12:19
lerna-lite sill     at async run (/.../cactus/node_modules/p-queue/dist/index.js:163:29)
lerna-lite sill  HttpErrorGeneral: 404 Not Found - PUT https://registry.npmjs.org/@hyperledger%2fcactus-plugin-ledger-connector-go-ethereum-socketio - Not found
lerna-lite sill     at /.../cactus/node_modules/npm-registry-fetch/lib/check-response.js:93:15
lerna-lite sill     at processTicksAndRejections (node:internal/process/task_queues:96:5)
lerna-lite sill     at async publish (/.../cactus/node_modules/libnpmpublish/lib/publish.js:43:12)
lerna-lite sill     at async /.../cactus/node_modules/p-pipe/index.js:12:19
lerna-lite sill     at async run (/.../cactus/node_modules/p-queue/dist/index.js:163:29) {
lerna-lite sill   headers: [Object: null prototype] {
lerna-lite sill     date: [ 'Wed, 19 Oct 2022 05:03:32 GMT' ],
lerna-lite sill     'content-type': [ 'application/json' ],
lerna-lite sill     'content-length': [ '21' ],
lerna-lite sill     connection: [ 'keep-alive' ],
lerna-lite sill     'cf-ray': [ '75c6f7c07b1f97dc-SJC' ],
lerna-lite sill     vary: [ 'Accept-Encoding' ],
lerna-lite sill     server: [ 'cloudflare' ],
lerna-lite sill     'x-fetch-attempts': [ '1' ]
lerna-lite sill   },
lerna-lite sill   statusCode: 404,
lerna-lite sill   code: 'E404',
lerna-lite sill   method: 'PUT',
lerna-lite sill   uri: 'https://registry.npmjs.org/@hyperledger%2fcactus-plugin-ledger-connector-go-ethereum-socketio',
lerna-lite sill   body: { error: 'Not found' },
lerna-lite sill   pkgid: '@hyperledger/cactus-plugin-ledger-connector-go-ethereum-socketio@1.1.0'
lerna-lite sill }
lerna-lite ERR! E404 Not found
lerna-lite ERR! E404 Not found
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@petermetz petermetz added bug Something isn't working dependencies Pull requests that update a dependency file Developer_Experience documentation Improvements or additions to documentation P1 Priority 1: Highest SPIKE Exploratory work to better scope additional effort labels Oct 19, 2022
@petermetz petermetz self-assigned this Oct 19, 2022
petermetz added a commit to petermetz/cacti that referenced this issue Oct 31, 2022
Adds a GitHub workflow yaml file that executes the
publish script.
This workflow only gets triggered when a git tag has been
created that starts with the letter v (as in version).

Fixes hyperledger-cacti#1951
Fixes hyperledger-cacti#2054
Fixes hyperledger-cacti#2175

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit to petermetz/cacti that referenced this issue Nov 2, 2022
Adds a GitHub workflow yaml file that executes the
publish script.
This workflow only gets triggered when a git tag has been
created that starts with the letter v (as in version).

Fixes hyperledger-cacti#1951
Fixes hyperledger-cacti#2054
Fixes hyperledger-cacti#2175

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit to petermetz/cacti that referenced this issue Nov 2, 2022
Adds a GitHub workflow yaml file that executes the
publish script.
This workflow only gets triggered when a git tag has been
created that starts with the letter v (as in version).

Fixes hyperledger-cacti#1951
Fixes hyperledger-cacti#2054
Fixes hyperledger-cacti#2175

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit that referenced this issue Nov 2, 2022
Adds a GitHub workflow yaml file that executes the
publish script.
This workflow only gets triggered when a git tag has been
created that starts with the letter v (as in version).

Fixes #1951
Fixes #2054
Fixes #2175

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
@petermetz
Copy link
Contributor Author

Re-opening until we can fix the release automation issues.

@petermetz petermetz reopened this Nov 9, 2022
@petermetz
Copy link
Contributor Author

The crash log from the latest execution of the auto-publishing workflow action: 2022-11-04-cacti-ci-release-automation-crash.log

petermetz added a commit to petermetz/cacti that referenced this issue Nov 9, 2022
A second attempt at fixing the release automation.

The missing piece was that some of the Indy SDK dependencies
were not installed by default and we forgot to run the ci.sh
script to take care of that within this workflow action.

With this fix now we have an additional step in the action which
takes care of installing the OS level build dependencies for
the project.

Fixes hyperledger-cacti#1951
Fixes hyperledger-cacti#2069
Fixes hyperledger-cacti#2175

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
@petermetz
Copy link
Contributor Author

Re-opening yet again because the auto-publishing is still broken just with different issues now...

https://github.com/hyperledger/cactus/actions/workflows/all-nodejs-packages-publish.yaml

2022-11-11T18:01:20.5818754Z lerna-lite info publish Publishing packages to npm...
2022-11-11T18:01:20.5826942Z lerna-lite info Verifying npm credentials
2022-11-11T18:01:20.5827689Z lerna-lite verb Retrieving npm user profile
2022-11-11T18:01:20.8693474Z 403 Forbidden - GET https://registry.npmjs.org/-/npm/v1/user
2022-11-11T18:01:20.8694186Z lerna-lite ERR! EWHOAMI Authentication error. Use `npm whoami` to troubleshoot.
2022-11-11T18:01:20.8695306Z lerna-lite ERR! Authentication error. Use `npm whoami` to troubleshoot.
2022-11-11T18:01:20.8919010Z error Command failed with exit code 1.

2022-11-11T17_41_05_auto-publish-node-packages-crash.log

@petermetz petermetz reopened this Nov 23, 2022
petermetz referenced this issue in petermetz/cacti Jun 12, 2024
On a high level this is a find & replace operation where the occurrences of the
first bullet point were replaced with the second bullet point:
* `"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2`
* `"$ref": "../../../../..`

The firs bullet point above is called a URL reference while the second one is
called a REMOTE references (remote as in a different spec file on the file-system).

1. With this change, we unlock the release process being able to issue code that
is working on the latest OpenAPI specifications that we are cross-referencing
from one package to another.
2. Previously you had to manually update the references in about a hundred
and fifty locations to make sure that the versions are bumped but after this
change this happens automatically as the newly introduced bundling process
and the usage of the REMOTE references instead of URL references.
3. The problem so far with the release process was that with the URL references
we dependended on the existence of a pushed git tag for a successful release build.
But we cannot git push the tag before having performed a successful release build,
so this was a chicken-egg problem that had to be somehow untangled from its
circular dependency hell and this change is what makes it happen by no longer
depending on the git tags having been pushed to the upstream repository.

Related to, but does not yet fix: https://github.com/hyperledger/cacti/issues/2175

Depends on hyperledger-cacti#3288

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz referenced this issue in petermetz/cacti Jun 13, 2024
On a high level this is a find & replace operation where the occurrences of the
first bullet point were replaced with the second bullet point:
* `"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2`
* `"$ref": "../../../../..`

The firs bullet point above is called a URL reference while the second one is
called a REMOTE references (remote as in a different spec file on the file-system).

1. With this change, we unlock the release process being able to issue code that
is working on the latest OpenAPI specifications that we are cross-referencing
from one package to another.
2. Previously you had to manually update the references in about a hundred
and fifty locations to make sure that the versions are bumped but after this
change this happens automatically as the newly introduced bundling process
and the usage of the REMOTE references instead of URL references.
3. The problem so far with the release process was that with the URL references
we dependended on the existence of a pushed git tag for a successful release build.
But we cannot git push the tag before having performed a successful release build,
so this was a chicken-egg problem that had to be somehow untangled from its
circular dependency hell and this change is what makes it happen by no longer
depending on the git tags having been pushed to the upstream repository.

Related to, but does not yet fix: https://github.com/hyperledger/cacti/issues/2175

Depends on hyperledger-cacti#3288

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz referenced this issue Jun 14, 2024
On a high level this is a find & replace operation where the occurrences of the
first bullet point were replaced with the second bullet point:
* `"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2`
* `"$ref": "../../../../..`

The firs bullet point above is called a URL reference while the second one is
called a REMOTE references (remote as in a different spec file on the file-system).

1. With this change, we unlock the release process being able to issue code that
is working on the latest OpenAPI specifications that we are cross-referencing
from one package to another.
2. Previously you had to manually update the references in about a hundred
and fifty locations to make sure that the versions are bumped but after this
change this happens automatically as the newly introduced bundling process
and the usage of the REMOTE references instead of URL references.
3. The problem so far with the release process was that with the URL references
we dependended on the existence of a pushed git tag for a successful release build.
But we cannot git push the tag before having performed a successful release build,
so this was a chicken-egg problem that had to be somehow untangled from its
circular dependency hell and this change is what makes it happen by no longer
depending on the git tags having been pushed to the upstream repository.

Related to, but does not yet fix: https://github.com/hyperledger/cacti/issues/2175

Depends on #3288

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
fazzatti referenced this issue in fazzatti/cacti Jun 24, 2024
On a high level this is a find & replace operation where the occurrences of the
first bullet point were replaced with the second bullet point:
* `"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2`
* `"$ref": "../../../../..`

The firs bullet point above is called a URL reference while the second one is
called a REMOTE references (remote as in a different spec file on the file-system).

1. With this change, we unlock the release process being able to issue code that
is working on the latest OpenAPI specifications that we are cross-referencing
from one package to another.
2. Previously you had to manually update the references in about a hundred
and fifty locations to make sure that the versions are bumped but after this
change this happens automatically as the newly introduced bundling process
and the usage of the REMOTE references instead of URL references.
3. The problem so far with the release process was that with the URL references
we dependended on the existence of a pushed git tag for a successful release build.
But we cannot git push the tag before having performed a successful release build,
so this was a chicken-egg problem that had to be somehow untangled from its
circular dependency hell and this change is what makes it happen by no longer
depending on the git tags having been pushed to the upstream repository.

Related to, but does not yet fix: https://github.com/hyperledger/cacti/issues/2175

Depends on hyperledger-cacti#3288

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
sandeepnRES referenced this issue in sandeepnRES/cacti Jul 30, 2024
On a high level this is a find & replace operation where the occurrences of the
first bullet point were replaced with the second bullet point:
* `"$ref": "https://raw.githubusercontent.com/hyperledger/cactus/v2.0.0-alpha.2`
* `"$ref": "../../../../..`

The firs bullet point above is called a URL reference while the second one is
called a REMOTE references (remote as in a different spec file on the file-system).

1. With this change, we unlock the release process being able to issue code that
is working on the latest OpenAPI specifications that we are cross-referencing
from one package to another.
2. Previously you had to manually update the references in about a hundred
and fifty locations to make sure that the versions are bumped but after this
change this happens automatically as the newly introduced bundling process
and the usage of the REMOTE references instead of URL references.
3. The problem so far with the release process was that with the URL references
we dependended on the existence of a pushed git tag for a successful release build.
But we cannot git push the tag before having performed a successful release build,
so this was a chicken-egg problem that had to be somehow untangled from its
circular dependency hell and this change is what makes it happen by no longer
depending on the git tags having been pushed to the upstream repository.

Related to, but does not yet fix: https://github.com/hyperledger/cacti/issues/2175

Depends on hyperledger-cacti#3288

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file Developer_Experience documentation Improvements or additions to documentation P1 Priority 1: Highest SPIKE Exploratory work to better scope additional effort
Projects
None yet
1 participant