return-dispatch icon indicating copy to clipboard operation
return-dispatch copied to clipboard

Error: getWorkflowId: An unexpected error has occurred: Unable to find ID for Workflow

Open sysadmin-exe opened this issue 3 years ago • 2 comments

Fetching Workflow ID for regression-test.yaml.yaml...
Error: getWorkflowId: An unexpected error has occurred: Unable to find ID for Workflow: regression-test.yaml.yaml
Error: Failed to complete: Unable to find ID for Workflow: regression-test.yaml.yaml
Warning: Does the token have the correct permissions?
Error: Unable to find ID for Workflow: regression-test.yaml.yaml

Please I need help. I am using this action in 2 jobs in one workflow. the first job in the workflow works but this error in the second one. I wonder what could be wrong because we are using the same git token

Here is what the workflow looks like

  ## QA 1 TEST
  QA-1-Test:
    runs-on: ubuntu-latest
    needs: onejobabove
    steps:
      - name: Get Token
        id: get_token
        uses: tibdex/github-app-token@v1
        with:
          app_id: ${{ secrets.APP}}
          private_key: ${{ secrets.APP}}
      - name: Wait for deployment to complete
        run : sleep 180
      - name: QA 1 Test
        uses: codex-/[email protected]
        id: qa_1_test
        with:
          token: ${{ steps.get_token.outputs.token }}
          ref: refs/heads/test-ghaction
          repo: repo
          owner: owner
          workflow: bat-1-test.yaml
          workflow_inputs: '{"test_environment":"qa"}'
          workflow_timeout_seconds: 300 # Default: 300
      - name: Await Run ID ${{ steps.qa_bat_test.outputs.run_id }}
        uses: Codex-/[email protected]
        with:
          token: ${{ steps.get_token.outputs.token }}
          repo: repo
          owner: owner
          run_id: ${{ steps.qa_1_test.outputs.run_id }}
          run_timeout_seconds: 900 # Optional
          poll_interval_ms: 5000 # Optional

  ## QA TEST 2
  QA-2-Test:
    continue-on-error: true
    runs-on: ubuntu-latest
    needs: onejobabove
    steps:
      - name: Get Token
        id: get_token
        uses: tibdex/github-app-token@v1
        with:
          app_id: ${{ secrets.APP}}
          private_key: ${{ secrets.APP}}
      - name: QA 2 Test
        uses: codex-/[email protected]
        id: qa_2_test
        with:
          token: ${{ steps.get_token.outputs.token }}
          ref: refs/heads/test-ghaction
          repo: repo
          owner: owner
          workflow: regression-test.yaml
          workflow_inputs: '{"test_environment":"qa"}'
          workflow_timeout_seconds: 300 # Default: 300
      - name: Await Run ID ${{ steps.qa_regression_test.outputs.run_id }}
        uses: Codex-/[email protected]
        with:
          token: ${{ steps.get_token.outputs.token }}
          repo: repo
          owner: owner
          run_id: ${{ steps.qa_2_test.outputs.run_id }}
          run_timeout_seconds: 1800 # Optional
          poll_interval_ms: 5000 # Optional

sysadmin-exe avatar Sep 14 '23 20:09 sysadmin-exe

Never mind. False Alarm. The additional workflow has never been run so before so that is why the workflow id was missing. I had to run the workflow manually. :)

sysadmin-exe avatar Sep 15 '23 15:09 sysadmin-exe

Odd, haven't seen that one before, good to know!

Codex- avatar Sep 19 '23 02:09 Codex-