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

Workflow ID detection is broken in v4.1.2 #174

Open
korniychuk opened this issue Nov 8, 2024 · 2 comments
Open

Workflow ID detection is broken in v4.1.2 #174

korniychuk opened this issue Nov 8, 2024 · 2 comments

Comments

@korniychuk
Copy link
Contributor

korniychuk commented Nov 8, 2024

Hi dear NX team 👐

In the newest release (v4.1.2), the nx-set-shas action started to fail due to an error fetching workflow_id via the GH API.

  • I restarted WF ~10 times, and it failed with the same error.
  • Rollback to v4.1.1 temporarily fixed the issue.
  • I assume something is changed in the oktokit new version.

Step configuration to reproduce

      - name: Derive appropriate SHAs for base and head for `nx affected` commands
        uses: nrwl/nx-set-shas@v4
        with:
          main-branch-name: ${{ github.base_ref }}
          last-successful-event: schedule # for 'master' workflow (only 1 can be specified. workflow_dispatch - skipped)

Error screenshots

Image
Image


Thanks! 🙏

@korniychuk
Copy link
Contributor Author

korniychuk commented Nov 8, 2024

UPDATE: We have NodeJS version v18.10.0 (we're going to upgrade soon); maybe it'll work on v20.

(I've just read your disclaimer)

NOTE: The v4 does no longer support deprecated Node versions. The supported version is Node v18+.

@rafaellucio
Copy link

I have de same problem, and I pass workflow-id in environment and not works too

Download action repository 'nrwl/nx-set-shas@v4' (SHA:e2e6dc8bce4b0387a05eb687735c39c41580b792)
Download action repository 'gang-of-front/action-nx-affected-list@main' (SHA:a5f7a1b25c7977f8a7[4](https://github.com/Creditas/benefits-lead-form/actions/runs/11802818118/job/32879336627#step:4:4)7a683265861d0cdb295e7)
Run ./.github/actions/affected
  with:
  env:
    PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
    NPM_CONFIG_USERCONFIG: /home/runner/work/_temp/.npmrc
    NODE_AUTH_TOKEN: ***
Run nrwl/nx-set-shas@v4
Run node "$GITHUB_ACTION_PATH/dist/index.js" "$gh_token" "$main_branch_name" "$error_on_no_successful_workflow" "$last_successful_event" "$working_directory" "$working_id" "$fallback_sha"
  node "$GITHUB_ACTION_PATH/dist/index.js" "$gh_token" "$main_branch_name" "$error_on_no_successful_workflow" "$last_successful_event" "$working_directory" "$working_id" "$fallback_sha"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin
    NPM_CONFIG_USERCONFIG: /home/runner/work/_temp/.npmrc
    NODE_AUTH_TOKEN: ***
    gh_token: ***
    main_branch_name: master
    error_on_no_successful_workflow: false
    last_successful_event: pull_request
    working_directory: .
    working_id: 
    fallback_sha: 

Workflow Id not provided. Using workflow 'undefined'
Error: Process completed with exit code 1.
runs:
  using: "composite"
  steps:
    - name: Derive appropriate SHAs for base and head for `nx affected` commands
      id: setSHAs
      uses: nrwl/nx-set-shas@v4
      with:
        main-branch-name: "master"
        last-successful-event: "pull_request"
        workflow-id: ${{ github.run_id }}

Image

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

No branches or pull requests

2 participants