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: assets release using oclif #501

Merged
merged 6 commits into from Apr 12, 2023

Conversation

CyberHippo
Copy link
Contributor

Description

Update oclif dependencies to benefit from oclif/oclif#987 which is missing from souvikns-oclif leading to permissions errors.

Details

Related issue(s)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@CyberHippo CyberHippo changed the title fix: assets relases using oclif fix: assets release using oclif Mar 31, 2023
Signed-off-by: CyberHippo <hippolyte@vergnol.fr>
@derberg
Copy link
Member

derberg commented Apr 3, 2023

Thanks for the PR @CyberHippo. Can you please have a look at the conflicts you have there, and also failing tests.

Also, one more small stuff, please do not update CLI version in package files, these happen automatically on release

Signed-off-by: CyberHippo <hippolyte@vergnol.fr>
@CyberHippo
Copy link
Contributor Author

@derberg I fixed the conflicts and removed the version bump. The tests are passing locally. I did not upgrade @oclif/core to v2 since it was not necessary and above my Typescript skills.

@derberg
Copy link
Member

derberg commented Apr 4, 2023

Tests are failing https://github.com/asyncapi/cli/actions/runs/4607360398/jobs/8146614119

not because of tests but because there is an issue with npm install. I remember we had it in the past and it was fixed only because there were some other merges related to package-json that solved the problem. We do not know what fixed it.

My only idea is:

🤞🏼

@CyberHippo
Copy link
Contributor Author

@derberg I suspect that the tests are failing because I generated a package-lock.json using npm >= 7 which is now creating a v2 lockfile. The current Github Actions are using Node 14 as a runtime which ships npm < 7 and use v1 lockfiles.

# From the "PR testing - if Node project" workflow logs
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!

Since Node 14 will be EOL on the 2023-04-30 I added an additional commit to update the runtime of current Github Actions to Node 18. I think that this may be best for the stability of the workflows.

I could also regenerate a package-lock.json using npm < 7 which hopefully will fix the failing installation during the tests. Or regenerate the lock using the lock from the master branch as suggested. Let me know what you think is best.

I noticed in the "PR testing - if Node project" workflow logs that the previous stage Install dependencies is failing silently :

[...]
npm http fetch GET 200 https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.9.tgz 2020ms
npm timing stage:rollbackFailedOptional Completed in 1ms
npm timing stage:runTopLevelLifecycles Completed in 10217ms
npm verb stack Error: Unsupported platform for @swc/core-android-arm-eabi@1.3.9: wanted {"name":"@swc/core-android-arm-eabi","version":"1.3.9","engines":{"node":">=10"},"cpu":["arm"],"os":["android"],"dependencies":{"@swc/wasm":"1.2.122"},"optionalDependencies":{},"peerDependenciesMeta":{},"devDependencies":{},"bundleDependencies":false,"peerDependencies":{},"deprecated":false,"_resolved":"https://registry.npmjs.org/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.3.9.tgz","_integrity":"sha512-+F+sU2l49Po4tJoNtIpFwt0k1sspymvPMM+DCpnkHF1idzRiOU5NGgVzmLDjoO9AnxHa7EBJ3itN+PP2Dd06+A==","_shasum":"6ab77525f2d22fcd321d0e29704d0820608b9e18","_shrinkwrap":null,"_id":"@swc/core-android-arm-eabi@1.3.9","_from":"@swc/core-android-arm-eabi@1.3.9","_requested":{"type":"version","registry":true,"raw":"@swc/core-android-arm-eabi@1.3.9","name":"@swc/core-android-arm-eabi","escapedName":"@swc%2fcore-android-arm-eabi","scope":"@swc","rawSpec":"1.3.9","saveSpec":null,"fetchSpec":"1.3.9"},"_spec":"@swc/core-android-arm-eabi@1.3.9","_where":"/home/runner/work/cli/cli/node_modules/@swc/core"} (current: {"os":"linux","cpu":"x64"})
npm verb stack     at checkPlatform (/opt/hostedtoolcache/node/14.21.3/x64/lib/node_modules/npm/node_modules/npm-install-checks/index.js:46:14)
npm verb stack     at thenWarnEngineIssues (/opt/hostedtoolcache/node/14.21.3/x64/lib/node_modules/npm/lib/install/validate-args.js:63:5)
npm verb stack     at /opt/hostedtoolcache/node/14.21.3/x64/lib/node_modules/npm/node_modules/iferr/iferr.js:3:64
npm verb stack     at checkEngine (/opt/hostedtoolcache/node/14.21.3/x64/lib/node_modules/npm/node_modules/npm-install-checks/index.js:25:10)
npm verb stack     at module.exports.isInstallable (/opt/hostedtoolcache/node/14.21.3/x64/lib/node_modules/npm/lib/install/validate-args.js:60:3)
npm verb stack     at resolveWithNewModule (/opt/hostedtoolcache/node/14.21.3/x64/lib/node_modules/npm/lib/install/deps.js:677:10)
npm verb stack     at /opt/hostedtoolcache/node/14.21.3/x64/lib/node_modules/npm/lib/install/deps.js:600:7
npm verb stack     at /opt/hostedtoolcache/node/14.21.3/x64/lib/node_modules/npm/node_modules/iferr/iferr.js:3:64
npm verb stack     at /opt/hostedtoolcache/node/14.21.3/x64/lib/node_modules/npm/node_modules/call-limit/call-limit.js:28:43
npm verb stack     at processTicksAndRejections (internal/process/task_queues.js:77:11)
npm verb pkgid @swc/core-android-arm-eabi@1.3.9
npm verb cwd /home/runner/work/cli/cli
npm verb Linux 5.15.0-1034-azure
npm verb argv "/opt/hostedtoolcache/node/14.21.3/x64/bin/node" "/opt/hostedtoolcache/node/14.21.3/x64/bin/npm" "install" "--loglevel" "verbose"
npm verb node v14.21.3
npm verb npm  v6.14.18
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for @swc/core-android-arm-eabi@1.3.9: wanted {"os":"android","arch":"arm"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    android
npm ERR! notsup Valid Arch:  arm
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64
npm verb exit [ 1, true ]
npm timing npm Completed in 11659ms

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-04-04T15_20_08_670Z-debug.log
Error: Process completed with exit code 1.

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately for majority of workflows you will have to revert your changes. Sorry about that. You can identify these by looking at the first line of the workflow

# This action is centrally managed in https://github.com/asyncapi/.github/

So for workflows like homebrew, or upload release, your changes are fine. For the rest, you need to revert as they need to come from our central repository. Have a look at asyncapi/.github#224 (review). We have over 50 repos here in AsyncAPI org so many workflows we maintain centrally and them bot push them out. Example: #490

Signed-off-by: CyberHippo <hippolyte@vergnol.fr>
@CyberHippo
Copy link
Contributor Author

@derberg My bad, I went too fast finding and replacing deprecated workflows. I reverted the changes to the centrally managed workflows. Should I wait for asyncapi/.github#226 to be merged since the failing workflow is centrally managed and keep the v2 lockfile ?

@derberg
Copy link
Member

derberg commented Apr 6, 2023

we might do the trick that you change here this one global pr testing workflow to enable this PR to be merge. And once my PR is merged, all will be set back to track

@derberg
Copy link
Member

derberg commented Apr 6, 2023

this is the most important PR we are waiting for asyncapi/.github#187

@sonarcloud
Copy link

sonarcloud bot commented Apr 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@CyberHippo
Copy link
Contributor Author

@derberg I just updated the global PR testing workflow to run on Node 18 again. Let's see if the installation error persists.

@CyberHippo CyberHippo requested a review from derberg April 6, 2023 14:43
Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Souvikns all good from my side to merge, but just want to make sure you are ok with switch away from souvikns-oclif

Copy link
Member

@Souvikns Souvikns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see changes were made to .github/workflows, won't they get replaced by https://github.com/asyncapi/.github

Copy link
Member

derberg commented Apr 11, 2023

@Souvikns yes they will, but it is not a problem as we are now doing some stuff with global workflows anyway, and these will "overwrite" but not change stuff. What I mean is that what @CyberHippo changed is be replaced by "the same" but coming from global, later in a week or two.

@derberg
Copy link
Member

derberg commented Apr 12, 2023

/rtm

@asyncapi-bot asyncapi-bot merged commit 9570c38 into asyncapi:master Apr 12, 2023
14 checks passed
@derberg
Copy link
Member

derberg commented Apr 12, 2023

@allcontributors please add @CyberHippo for code,infra

@allcontributors
Copy link
Contributor

@derberg

I've put up a pull request to add @CyberHippo! 🎉

@derberg
Copy link
Member

derberg commented Apr 12, 2023

not yet released because of #514

@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.37.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@derberg
Copy link
Member

derberg commented Apr 12, 2023

@CyberHippo I think it did not work in case of macos. So pipelines are now green but macos distro pipeline shows below when trying to upload to GH release:

🤔 Pattern 'dist/macos/asyncapi.pkg' does not match any files.
🤔 dist/macos/asyncapi.pkg not include valid file.

not sure if something changes with generated package name an scripts/releasePackagesRename.js no longer works 🤔

you mind having a look?

@derberg
Copy link
Member

derberg commented Apr 12, 2023

all the rest for linux is here https://github.com/asyncapi/cli/releases/tag/v0.37.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installation issues
4 participants