Updating workflow file on master and rerunning an action still shows old workflow file

The action where I noticed the behavior is this one: https://github.com/davidtvs/pytorch-lr-finder/runs/694266910?check_suite_focus=true

It was failing on the step “Run actions/checkout@v2 - Fetching the repository”. The workflow file when it failed was this one. I actually re-ran multiple times before making changes to the workflow and the action always failed at that step. I then pushed a fix to master updating the workflow to this and re-ran the action which then ran correctly.

Is there a way I can access the logs of the previous re-runs?

I will also try to replicate the issue again.

Hi @davidtvs ,

Thanks for your reply! The failed workflow yaml has same commit/tree ID with the fixed one, looks them are identical. Could you please let me know what did you fix?

And can you reproduce on your workflow now? the checkrun id is different between the failed workflow and re-run workflow, so you can record the id for comparison.

checkrunid.png

If it cannot be reproduced, i assume it could be a temporary problem.

Thanks

Oops, I copy and pasted the same link twice:

The old workflow: https://github.com/davidtvs/pytorch-lr-finder/blob/22b5f609324cdb6c6587cf52a8b0a4ca0e9216c8/.github/workflows/flake8_lint.yml#L14

The new workflow: https://github.com/davidtvs/pytorch-lr-finder/blob/master/.github/workflows/flake8_lint.yml#L14

I updated the previous post with the correct links.

I’ll try to reproduce this issue later today.

Seems like my post got deleted. Do you need me to post the steps to replicate again @weide-zhou?

Hi @davidtvs,

No, i have your steps which deleted by the forum update.
I have raised an internal ticket to confirm the logic, will update once there’s a response.

Thanks for your patience!

I have the same issue; changes to my workflow file are not honored at all.
Additionally, I cannot cancel the workflow! (See: Can't cancel github action workflow)

I am having the same issue here… It would be nice if the re-run all jobs button would provide the option to re-run using the latest workflow.

2 Likes

If I recall correctly they run based on what was in the the branch you branch from at the time the branch was created. (So if you create a feature branch from master 3 days ago, it’ll run the workflows from 3 days ago when you PR.) So if you update master and want it in your PR then you need to rebase and force push.

I have the same issue. Updated workflow is ignored (even on the branches that were created after the update)

having the same issue that updated file on the same branch is ignored during re-runs. any updates on this issue?

Same here. Would be nice to see some progress on this on this issue :upside_down_face:.

Same issue. The updated workflow isn’t being used by Github Actions.

Action uses this file ArrangePy/publish-to-test-pypi.yml at ee5b7e6957dd12779cb44b91c7ff5e9dc55e7d85 · prashantsengar/ArrangePy (github.com)

While it should be using the newer version.

Exactly. It’s very annoying that re-run does not use the updated workflow file. For example, if the workflow triggers on release, once has to create a new release just to debug the workflow. This is highly inconvenient.

If you want to be able to run your workflow manually, you just can add:

on:
  workflow_dispatch:

and then your normal triggers.
Then on the Actions tab, select the workflow and it’ll show a button to run it manually.

+1 for this feature.
I tried adding workflow_dispatch: to my workflow yml file, but alas, cannot find a button to manually run checks for a PR anywhere.
@ASarco Do you have any more details?
if I had updated my workflow yml, how to be able to run checks for a PR which will use the updated configuration?

Facing the same issue. Running with older workflow file.

Just run into this issue myself. Doing on on-release action, realized that I forgot to tell it to add some static files to the archives, updated the yaml, re-released, it’s still using the old yaml.

Anyone figure out a solution to this? Re-running the workflow manually as @ASarco suggested just simply re-runs it using the old workflow file, not the new one like we’re trying to accomplish.

We faced this issue as well. For us doing a phony force-push (e.g. extra white space in a commit msg) forced the reload of the workflow.
“Re-running a workflow uses the same GITHUB_SHA (commit SHA) and GITHUB_REF (Git ref) of the original event that triggered the workflow run. You can re-run a workflow for up to 30 days after the initial run.” (from Re-running workflows and jobs - GitHub Docs)
I guess force pushing changed the SHA in the event and forced the workflow to use newer code

This does not seem to work for me. Do you have any other suggestions? Maybe I am misunderstanding the commit with an extra white space here. Can you provide a bit more detail?