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

BUG: This now fails where previously it was working. #16

Closed
ghost opened this issue Mar 9, 2021 · 11 comments · Fixed by #17 or cosmos/cosmos-sdk#8840
Closed

BUG: This now fails where previously it was working. #16

ghost opened this issue Mar 9, 2021 · 11 comments · Fixed by #17 or cosmos/cosmos-sdk#8840

Comments

@ghost
Copy link

ghost commented Mar 9, 2021

I don't know exactly why this action is failing now, but previously it was working fine.

image

Run rokroskar/workflow-run-cleanup-action@master
  env:
    GITHUB_TOKEN: ***
/usr/bin/docker run --name e4db028fbd88ac4bbd8b3c8c608f9df34f_c3ee20 --label 5588e4 --workdir /github/workspace --rm -e GITHUB_TOKEN -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/explorer-service/explorer-service":"/github/workspace" 5588e4:db028fbd88ac4bbd8b3c8c608f9df34f
+ set -e
+ '[' -z *** ']'
+ '[' -z provenance-io/explorer-service ']'
+ '[' -z 637474428 ']'
+ GITHUB_API=https://api.github.com
+ auth_header='Authorization: token ***'
+ accept_header='Accept: application/vnd.github.v3+json'
++ curl -s https://api.github.com/repos/provenance-io/explorer-service/actions/runs/637474428 -H 'Authorization: token ***' -H 'Accept: application/vnd.github.v3+json'
++ extractMetaInformation
++ jq '{ workflow_id: .workflow_id, branch: .head_branch, repo: .head_repository.full_name}'
++ convertToKeyValuePairs
++ jq -r 'to_entries | map("\(.key)=\(.value | tostring)") | .[]'
+ exportAll 'workflow_id=5730934
branch=crussell/25-fix-staking-validator-init
repo=provenance-io/explorer-service'
+ for var in $1
+ export workflow_id=5730934
+ workflow_id=5730934
+ for var in $1
+ export branch=crussell/25-fix-staking-validator-init
+ branch=crussell/25-fix-staking-validator-init
+ for var in $1
+ export repo=provenance-io/explorer-service
+ repo=provenance-io/explorer-service
+ echo 'workflow id: 5730934'
+ echo 'branch: crussell/25-fix-staking-validator-init'
+ echo 'repo: provenance-io/explorer-service'
++ curl -s https://api.github.com/repos/provenance-io/explorer-service/actions/workflows/5730934/runs -H 'Authorization: token ***' -H 'Accept: application/vnd.github.v3+json'
++ getRunningWorkflowIds
++ jq '.workflow_runs | .[] | select(.head_branch=="crussell/25-fix-staking-validator-init" and .head_repository.full_name=="provenance-io/explorer-service" and .status=="in_progress" or .status=="queued" or .status== "waiting") | .id '
++ grep -v 637474428
workflow id: 5730934
branch: crussell/25-fix-staking-validator-init
repo: provenance-io/explorer-service
+ run_ids=

Previously:

Run rokroskar/workflow-run-cleanup-action@master
/usr/bin/docker run --name e45b4722468f9945ddb3f6cea268b94141_7f5789 --label 5588e4 --workdir /github/workspace --rm -e GITHUB_TOKEN -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/explorer-service/explorer-service":"/github/workspace" 5588e4:5b4722468f9945ddb3f6cea268b94141
+ '[' -z Build ']'
+ '[' -z *** ']'
+ '[' -z provenance-io/explorer-service ']'
+ '[' -z crussell/14-update-tx-eps ']'
+ BRANCH=crussell/14-update-tx-eps
+ jq_run_ids='.workflow_runs | .[] | select(.head_branch=="crussell/14-update-tx-eps" and (.status=="in_progress" or .status=="queued" or .status=="waiting")) | .id'
+ GITHUB_API=https://api.github.com
+ auth_header='Authorization: token ***'
++ curl -s https://api.github.com/repos/provenance-io/explorer-service/actions/runs/635150519 -H 'Authorization: token ***'
++ jq -r .workflow_url
++ cut -d/ -f2-
+ workflow_url=/api.github.com/repos/provenance-io/explorer-service/actions/workflows/5730934
+ workflow_id=5730934
+ echo 'workflow id: 5730934'
workflow id: 5730934
++ curl -s https://api.github.com/repos/provenance-io/explorer-service/actions/workflows/5730934/runs++ jq -r '.workflow_runs | .[] | select(.head_branch=="crussell/14-update-tx-eps" and (.status=="in_progress" or .status=="queued" or .status=="waiting")) | .id'
++ sort -n
 -H 'Authorization: token ***'
++ head -n-1
+ run_ids=
run ids: 
+ echo 'run ids: '
@ghost
Copy link
Author

ghost commented Mar 10, 2021

@thatdoogieguy
Copy link

thatdoogieguy commented Mar 10, 2021

I have experienced the same issue and i can't for the life of me figure out what is specifically causing this as we are having all CI builds fail currently. Seems to error internally without throwing any logs or other key information. @gando001

Seems to be an issue introduced with v.0.3.1 released three hours ago. @crussell-figure as an FYI we have specifically required v.0.3.0 and this has fixed the issue for the time being. Remember to check when it's fixed and this can be reverted to the "@master" selection

@alessio
Copy link

alessio commented Mar 10, 2021

Same issue here. I forked the repo as a temporary measure. An upstream urgent fix would be hugely appreciated.

alessio pushed a commit to cosmos/cosmos-sdk that referenced this issue Mar 10, 2021
Upstream's latest changes are causing mayhem in
the build pipelines. This change reverts upstream's
latest commit.

Upstream issue: rokroskar/workflow-run-cleanup-action#16
mustaphazorgati added a commit to mustaphazorgati/workflow-run-cleanup-action that referenced this issue Mar 10, 2021
mustaphazorgati added a commit to mustaphazorgati/workflow-run-cleanup-action that referenced this issue Mar 10, 2021
@mustaphazorgati
Copy link
Collaborator

mustaphazorgati commented Mar 10, 2021

Hey all!
I've figured out what the issue is: When there is no other workflow run to cancel the script failes. If any other workflow run is running the script is fine.
Reason:
We've introduced set -e #fail fast to the script and added a grep command to exclude the current workflow run from the cancellation. Unfortunately the grep command exits with status code 1 when there is no input (and due to set -e the script terminates).

@rokroskar: I've created two PRs which fix this issue(#17 / #18). I wasn't sure which way you like more. Personally I prefer #17.

@ahnpnl
Copy link

ahnpnl commented Mar 10, 2021

I hope it will be solved soon, currently our CI is also blocked by this

@mustaphazorgati
Copy link
Collaborator

I hope it will be solved soon, currently our CI is also blocked by this

Sorry for the inconvenience. I am expecting this to be fixed today.

@rokroskar
Copy link
Owner

Apologies for the delay with fixing it in master - in the meantime pin to v0.3.0

@mustaphazorgati
Copy link
Collaborator

Apologies for the delay with fixing it in master - in the meantime pin to v0.3.0

And apologies @rokroskar for your inconvenience.. I've caused this by accident. Hopefully this won't ruin our collab in the future ^^

@rokroskar
Copy link
Owner

Thanks @mustaphazorgati no need to apologize for introducing a bug! I should have tested the PR a bit more carefully (speaking of which, if someone wants to write tests for this action that would be great (see #19)!)

In any case, the fix is now merged and master should work again.

@ghost
Copy link
Author

ghost commented Mar 10, 2021

Thank you for addressing this.

@mustaphazorgati
Copy link
Collaborator

You're welcome @crussell-figure.
Thanks for reporting :)

daeMOn63 pushed a commit to fetchai/cosmos-sdk that referenced this issue Aug 19, 2021
Upstream's latest changes are causing mayhem in
the build pipelines. This change reverts upstream's
latest commit.

Upstream issue: rokroskar/workflow-run-cleanup-action#16
daeMOn63 pushed a commit to fetchai/cosmos-sdk that referenced this issue Aug 20, 2021
Upstream's latest changes are causing mayhem in
the build pipelines. This change reverts upstream's
latest commit.

Upstream issue: rokroskar/workflow-run-cleanup-action#16
daeMOn63 pushed a commit to fetchai/cosmos-sdk that referenced this issue Mar 1, 2022
Upstream's latest changes are causing mayhem in
the build pipelines. This change reverts upstream's
latest commit.

Upstream issue: rokroskar/workflow-run-cleanup-action#16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants