linear-b / gitstream-github-action

/:\ gitStream - Workflow GitHub Action
Apache License 2.0
3 stars 8 forks source link

Gitstream github action is failing #55

Closed SallyBlichG closed 9 months ago

SallyBlichG commented 9 months ago

Hey,

We've been using the Gitstream GitHub Action, and recently, it's been failing consistently in every run. Initially, we were on version 1.0.3, and despite upgrading to v1.0.13, the issue persists.

The error:

Status: Downloaded newer image for gitstream/rules-engine:latest
docker.io/gitstream/rules-engine:latest

> gitstream-rules-engine@1.0.0 start
> node src/app.js

/node_modules/@linearb/gitstream-core/dist/gitstream-core.cjs.development.js:25
var fetch = _interopDefault(require('node-fetch'));
                            ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /node_modules/node-fetch/src/index.js from /node_modules/@linearb/gitstream-core/dist/gitstream-core.cjs.development.js not supported.
Instead change the require of index.js in /node_modules/@linearb/gitstream-core/dist/gitstream-core.cjs.development.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/node_modules/@linearb/gitstream-core/dist/gitstream-core.cjs.development.js:25:29)
    at Object.<anonymous> (/node_modules/@linearb/gitstream-core/dist/index.js:7:20)
    at async Promise.all (index 0) {
  code: 'ERR_REQUIRE_ESM'
}
Error: Process completed with exit code 1.

Our action setup mirrors the documentation:

jobs:
  gitStream:
    timeout-minutes: 5
    runs-on: ubuntu-latest
    name: gitStream workflow automation
    steps:
      - name: Evaluate Rules
        uses: linear-b/gitstream-github-action@v1.0.13
        id: rules-engine
        with:
          full_repository: ${{ github.event.inputs.full_repository }}
          head_ref: ${{ github.event.inputs.head_ref }}
          base_ref: ${{ github.event.inputs.base_ref }}
          client_payload: ${{ github.event.inputs.client_payload }}
          installation_id: ${{ github.event.inputs.installation_id }}
          resolver_url: ${{ github.event.inputs.resolver_url }}
          resolver_token: ${{ github.event.inputs.resolver_token }}
vim-zz commented 9 months ago

Hi @SallyBlichG quick feedback, you should use linear-b/gitstream-github-action@v1 and not specify the full version, once you chaneg that please try again and let me know if it works

SallyBlichG commented 9 months ago

@vim-zz Thanks for the answer. I changed it to v1 but I see the same error. I see a new docker image has been published, with the tag latest, I guess the issue is there: docker.io/gitstream/rules-engine:latest

vim-zz commented 9 months ago

The issue was resolved, it was caused due to wrong tag being released, once we noticed that (thanks you for opening this issue) the tag was updated. The issue should now be resolved.