firecow / gitlab-ci-local

Tired of pushing to test your .gitlab-ci.yml?
MIT License
2.03k stars 115 forks source link

4.48.0 regression test failure #1187

Closed chenrui333 closed 2 months ago

chenrui333 commented 2 months ago

👋 trying to build the latest release, but run into some regression test issue. The error log is as below:

error build log ``` $ /opt/homebrew/Cellar/gitlab-ci-local/4.48.0/bin/gitlab-ci-local --list Error: Cannot find module './schema.json' Require stack: - /opt/homebrew/Cellar/gitlab-ci-local/4.48.0/libexec/lib/node_modules/gitlab-ci-local/src/schema/index.js - /opt/homebrew/Cellar/gitlab-ci-local/4.48.0/libexec/lib/node_modules/gitlab-ci-local/src/validator.js - /opt/homebrew/Cellar/gitlab-ci-local/4.48.0/libexec/lib/node_modules/gitlab-ci-local/src/parser.js - /opt/homebrew/Cellar/gitlab-ci-local/4.48.0/libexec/lib/node_modules/gitlab-ci-local/src/index.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15) at Function.Module._load (node:internal/modules/cjs/loader:873:27) at Module.require (node:internal/modules/cjs/loader:1100:19) at require (node:internal/modules/cjs/helpers:119:18) at Object. (/opt/homebrew/Cellar/gitlab-ci-local/4.48.0/libexec/lib/node_modules/gitlab-ci-local/src/schema/index.ts:2:16) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) at Module.load (node:internal/modules/cjs/loader:1076:32) at Function.Module._load (node:internal/modules/cjs/loader:911:12) at Module.require (node:internal/modules/cjs/loader:1100:19) ```

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/8738385082/job/23977555195 relates to Homebrew/homebrew-core#169393

firecow commented 2 months ago

I think we failed to include schema.json into the binaries. 4.48.1 coming up.

firecow commented 2 months ago

https://github.com/firecow/gitlab-ci-local/releases/tag/4.48.1 @chenrui333 Try this. Reopen if this also fails.

chenrui333 commented 2 months ago

cool, cool, thanks!

chenrui333 commented 2 months ago

still does not work

==> /opt/homebrew/Cellar/gitlab-ci-local/4.48.1/bin/gitlab-ci-local --list
Error: Cannot find module './schema.json'
Require stack:
- /opt/homebrew/Cellar/gitlab-ci-local/4.48.1/libexec/lib/node_modules/gitlab-ci-local/src/schema/index.js
- /opt/homebrew/Cellar/gitlab-ci-local/4.48.1/libexec/lib/node_modules/gitlab-ci-local/src/validator.js
- /opt/homebrew/Cellar/gitlab-ci-local/4.48.1/libexec/lib/node_modules/gitlab-ci-local/src/parser.js
- /opt/homebrew/Cellar/gitlab-ci-local/4.48.1/libexec/lib/node_modules/gitlab-ci-local/src/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
    at Function.Module._load (node:internal/modules/cjs/loader:873:27)
    at Module.require (node:internal/modules/cjs/loader:1100:19)
    at require (node:internal/modules/cjs/helpers:119:18)
    at Object.<anonymous> (/opt/homebrew/Cellar/gitlab-ci-local/4.48.1/libexec/lib/node_modules/gitlab-ci-local/src/schema/index.ts:2:16)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at Module.require (node:internal/modules/cjs/loader:1100:19)

/opt/homebrew/Library/Homebrew/ignorable.rb:29:in `block in raise'
Minitest::Assertion: Expected: 0
  Actual: 1
chenrui333 commented 2 months ago

can you maybe try adding this in the package.json?

  "files": [
    "src/schema/schema.json"
  ],
tchernomax commented 2 months ago

@firecow I can confirm that 4.48.1 doesn't work.

pineapplehunter commented 2 months ago

Hi, I was having this issue. Adding this to package.json seems to work for me.

  "files":[
    "src/**/*.js",
    "src/**/*.json"
  ]

I was able to print the files included by running this command.

$ npm pack --dry-run --json | jq ".[].files[].path" -r
firecow commented 2 months ago

I'm releasing 4.48.2 now

chenrui333 commented 2 months ago

works for me per https://github.com/Homebrew/homebrew-core/pull/169824