tophat / semantic-release-firefox-add-on

🦊 A Semantic Release plugin to sign Firefox Add Ons using web-ext
Apache License 2.0
19 stars 3 forks source link

Weird behaviour in `github-actions` CI/CD pipeline #304

Closed bamdadfr closed 4 years ago

bamdadfr commented 4 years ago

#

Context

Hello guys, it's probably not the best place to paste this issue because related to github-actions.

Once posted, I'll probably have to migrate this post somewhere more meaningful.

Nevertheless, I'm having a problem with semantic-release-firefox-add-on@0.2.7 with this pipeline

What I expect

The addon to be signed.

What is happening

I'm having the following error:

[4:39:10 AM] [semantic-release] › ✖  An error occurred while running semantic-release: TypeError: defaultAddonSigner is not a function
    at signAddon (/opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release-firefox-add-on/src/publish.js:31:30)
    at /opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release-firefox-add-on/node_modules/web-ext/dist/web-ext.js:1:70282
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at publish (/opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release-firefox-add-on/src/publish.js:43:33)
    at validator (/opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release/lib/plugins/normalize.js:34:24)
    at /opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release/lib/plugins/pipeline.js:37:34
    at async Promise.all (index 0)
    at next (/opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release/node_modules/p-reduce/index.js:16:18) {
  pluginName: 'semantic-release-firefox-add-on'
}
TypeError: defaultAddonSigner is not a function
    at signAddon (/opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release-firefox-add-on/src/publish.js:31:30)
    at /opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release-firefox-add-on/node_modules/web-ext/dist/web-ext.js:1:70282
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at publish (/opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release-firefox-add-on/src/publish.js:43:33)
    at validator (/opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release/lib/plugins/normalize.js:34:24)
    at /opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release/lib/plugins/pipeline.js:37:34
    at async Promise.all (index 0)
    at next (/opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release/node_modules/p-reduce/index.js:16:18) {
  pluginName: 'semantic-release-firefox-add-on'
}

Very similar to this PR 94.

This PR fixed the problem in 0.2.5

Thoughts

This situation is strange...

My local dry-runs are fine and I suspect github-actions to be the culprit.

EDIT no

Could this be related to the version of node ?

github-actions supports up to v12 AFAIK. I'm running v15 in local dev environment.

EDIT no

I could cat the installed source of src/publish.js:5 installed via npm within the pipeline, to double-check the code...

But why would the npm i output semantic-release-firefox-add-on@0.2.7

Caching issues from github ?

Please see the logs of the following command:

npm install -g \
  semantic-release \
  @semantic-release/github \
  @semantic-release/git \
  @semantic-release/exec \
  @semantic-release/changelog \
  @semantic-release/npm \
  semantic-release-chrome \
  semantic-release-firefox-add-on \
  aggregate-error \
  sign-addon

output

npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated js-select@0.6.0: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated jetpack-id@1.0.0: Jetpack extensions are no longer supported by Firefox. Use web-ext instead to build a WebExtension.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
/opt/hostedtoolcache/node/12.19.0/x64/bin/semantic-release -> /opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release/bin/semantic-release.js

> dtrace-provider@0.8.8 install /opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release-firefox-add-on/node_modules/dtrace-provider
> node-gyp rebuild || node suppress-error.js

make: Entering directory '/opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release-firefox-add-on/node_modules/dtrace-provider/build'
  TOUCH Release/obj.target/DTraceProviderStub.stamp
make: Leaving directory '/opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release-firefox-add-on/node_modules/dtrace-provider/build'

> core-js@2.6.12 postinstall /opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release-firefox-add-on/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

> spawn-sync@1.0.15 postinstall /opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/semantic-release-firefox-add-on/node_modules/spawn-sync
> node postinstall

> core-js@3.6.5 postinstall /opt/hostedtoolcache/node/12.19.0/x64/lib/node_modules/sign-addon/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.2.1 (node_modules/semantic-release-firefox-add-on/node_modules/addons-linter/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.2.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/semantic-release-firefox-add-on/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/semantic-release-firefox-add-on/node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ @semantic-release/exec@5.0.0
+ semantic-release-firefox-add-on@0.2.7
+ sign-addon@3.1.0
+ @semantic-release/git@9.0.0
+ semantic-release@17.3.0
+ @semantic-release/npm@7.0.8
+ semantic-release-chrome@1.1.3
+ aggregate-error@3.1.0
+ @semantic-release/github@7.2.0
+ @semantic-release/changelog@5.0.1
added 1870 packages from 1354 contributors in 40.666s
bamdadfr commented 4 years ago

fixed by installing prior version semantic-release-firefox-add-on@0.2.6

iamogbz commented 3 years ago

Hmm, seems like this was introduced by a hidden major version bump of sign-addon when bumping web-ext to v5 https://github.com/tophat/semantic-release-firefox-add-on/compare/v0.2.6...v0.2.7 that was not caught by tests...

iamogbz commented 3 years ago

:tada: This issue has been resolved in version 0.2.8 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

bamdadfr commented 3 years ago

nice catch :+1: