-
Notifications
You must be signed in to change notification settings - Fork 8
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
V1 Breaks Functionality #35
Comments
Hi @p0fi, Thanks for raising this issue. |
Unfortunately, I can't provide you with a link as those are company internal jobs. But the name of the job is As I said, if I pin the version to |
Hello, @Tiryoh I met the same error when using And I found that this error happens randomly. Sometimes it happened in I cannot publish the repo I'm working now, but I can provide its debug logging messages when rerunning it. Can you see what might be the cause of this error? Click to expand the log with debug logging##[debug]Evaluating condition for step: 'Get the Current Job's ID'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Get the Current Job's ID
##[debug]Loading inputs
##[debug]Evaluating: steps.ggat.outputs.token
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating steps:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'ggat'
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'outputs'
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: format('{0} / {1}', inputs.CALLER_JOB, github.job)
##[debug]Evaluating format:
##[debug]..Evaluating String:
##[debug]..=> '{0} / {1}'
##[debug]..Evaluating Index:
##[debug]....Evaluating inputs:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'CALLER_JOB'
##[debug]..=> 'schedule (3.9)'
##[debug]..Evaluating Index:
##[debug]....Evaluating github:
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'job'
##[debug]..=> 'sphinx-update'
##[debug]=> 'schedule (3.9) / sphinx-update'
##[debug]Result: 'schedule (3.9) / sphinx-update'
##[debug]Loading env
Run Tiryoh/gha-jobid-action@v1
##[debug]Evaluating: inputs.github_token
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'github_token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: inputs.repository
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'repository'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.run_id
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'run_id'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.job_name
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'job_name'
##[debug]=> 'schedule (3.9) / sphinx-update'
##[debug]Result: 'schedule (3.9) / sphinx-update'
##[debug]Evaluating: inputs.per_page
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'per_page'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: github.api_url
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'api_url'
##[debug]=> 'https://api.github.com'
##[debug]Result: 'https://api.github.com'
##[debug]Evaluating condition for step: 'run'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: run
##[debug]Loading inputs
##[debug]Loading env
Run GITHUB_API="/repos/${INPUT_REPOSITORY:-${GITHUB_REPOSITORY}}/actions/runs/${INPUT_RUN_ID:-${GITHUB_RUN_ID}}/jobs"
GITHUB_API="/repos/${INPUT_REPOSITORY:-${GITHUB_REPOSITORY}}/actions/runs/${INPUT_RUN_ID:-${GITHUB_RUN_ID}}/jobs"
JOBINFO="$(curl --get -Ss -H "Authorization: ***" -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: [2](https://github.com/hwhsu1231/cmake-docs-l10n-draft1/actions/runs/8184410347/job/22379643251#step:16:2)022-11-28" "${GITHUB_BASEURL}${GITHUB_API}?per_page=${INPUT_PER_PAGE:-[3](https://github.com/hwhsu1231/cmake-docs-l10n-draft1/actions/runs/8184410347/job/22379643251#step:16:3)0}")"
echo "${JOBINFO}" | grep "Resource not accessible by integration" && exit 1
eval "$(echo ${JOBINFO} | jq -r --arg job_name "${INPUT_JOB_NAME}" '.jobs | map(select(.name == $job_name)) | .[0] | @sh "job_id=\(.id) html_url=\(.html_url)"')"
echo ${job_id} | grep "null" > /dev/null && echo "parse error, job_id is ${job_id}. job name might be wrong. See https://github.com/Tiryoh/gha-jobid-action" && exit 1
echo "job_id=${job_id}" >> $GITHUB_OUTPUT
echo "html_url=${html_url}" >> $GITHUB_OUTPUT
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
INPUT_GITHUB_TOKEN: ***
INPUT_REPOSITORY:
INPUT_RUN_ID:
INPUT_JOB_NAME: schedule (3.9) / sphinx-update
INPUT_PER_PAGE:
GITHUB_BASEURL: https://api.github.com
##[debug]/usr/bin/bash --noprofile --norc -e -o pipefail /home/runner/work/_temp/23dee120-e867-[4](https://github.com/hwhsu1231/cmake-docs-l10n-draft1/actions/runs/8184410347/job/22379643251#step:16:4)831-8c[6](https://github.com/hwhsu1231/cmake-docs-l10n-draft1/actions/runs/8184410347/job/22379643251#step:16:6)a-14bef83a[7](https://github.com/hwhsu1231/cmake-docs-l10n-draft1/actions/runs/8184410347/job/22379643251#step:16:7)cfb.sh
parse error, job_id is null. job name might be wrong. See https://github.com/Tiryoh/gha-jobid-action
Error: Process completed with exit code 1.
##[debug]Finished: run
##[debug]Evaluating: steps.request.outputs.job_id
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating steps:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'request'
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'outputs'
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'job_id'
##[debug]=> null
##[debug]Result: null
##[debug]Evaluating: steps.request.outputs.html_url
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating steps:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'request'
##[debug]....=> Object
##[debug]....Evaluating String:
##[debug]....=> 'outputs'
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'html_url'
##[debug]=> null
##[debug]Result: null
##[debug]Finishing: Get the Current Job's ID |
This sounds a lot like #1. Note that when making the request to the GitHub REST API, only the first page ( So please make sure that adding the |
After setting - name: Get the Current Job's ID
uses: Tiryoh/gha-jobid-action@v1
id: gcji
with:
github_token: ${{ steps.ggat.outputs.token }}
job_name: '${{ inputs.CALLER_JOB }} / ${{ github.job }}'
per_page: 100 |
@hwhsu1231 Thanks for pointing this out I'll update the error message to check the |
@p0fi There are 2 fixes after v1.0.0 release. Could you try v1 again?
|
Our problem is fixed with that release! Thanks! |
@p0fi Great! Thanks for your feedback😆 |
Sadly I have to reopen the issue, as it appears that it is still not fixed in my particular case. My test initially worked but our regular deploy now failed again because of the action not being able to get the job ID. It seems that there is a difference in the context if the job in question is triggered via a direct push or via a |
Can you check that the |
It is correct, it does work with version |
@p0fi Any updates? |
I thought I had this problem - a workflow called via both
I originally had the following:
That added extra quotes, which broke |
Hi sorry for the delay, I just tested it with version 1.4 and it still breaks. I'm getting the following error this time...
|
📖 Description
After the update from version
0.1.2
to1.0.0
the action does not work anymore. The action fails with the messageThe job name is correct and working without any changes if I use version
0.1.2
of this action.The text was updated successfully, but these errors were encountered: