actions / stale

Marks issues and pull requests that have not had recent interaction
MIT License
1.34k stars 353 forks source link

Saved state not found #1124

Closed rcomer closed 6 months ago

rcomer commented 8 months ago

Description: Workflow ran out of operations on the first run but still started from the beginning on the second.

Action version: 9

Platform:

Runner type:

Repro steps:
Here is our workflow: Label inactive PRs.

This has run twice since updating to v9. On the first run, the output indicated state: persisting info about 203 issue(s). On the next run, The saved state was not found, the process starts from the first issue.

We have operations-per-run set low in order to work slowly through a large backlog of issues, but didn't want steps like removing the label after update or closing the issue to wait until we'd worked through the whole backlog. So when we updated to v9, we also added a second workflow using the action with days-before-stale=-1 and a much higher operations-per-run (see my PR here https://github.com/matplotlib/matplotlib/pull/27523). The two workflows run on alternate days. Perhaps using the second workflow is interfering with the state somehow? Though the state was also not found by the second workflow when it ran in between.

Expected behavior: Original workflow finds state and works from where it got to last time.

Actual behavior: Original workflow does not find state, starts from the beginning.

marko-zivic-93 commented 8 months ago

Hello @rcomer Thank you for creating this issue. We will investigate it and come back to you as soon as we have some feedback.

rcomer commented 8 months ago

I tried to reproduce the problem in a dummy repo and couldn't. Both workflows successfully interact with the cached state. Any suggestions for troubleshooting why Matplotlib's workflows are not finding the state?

For Matplotlib's use-case we would want the second workflow to ignore the cached state that the first one saved. Is that something that would be easy to implement? Or is there a better way to make sure the already-labelled issues get closed or their labels removed in a timely manner?

Thanks!

rcomer commented 8 months ago

Actually the second workflow did find the cache when it ran two days ago (and then deleted it because it worked through all the remaining issues). A new cache was then saved by the first workflow one day ago, and is still there, but was not found by the most recent run of the second workflow.

So I fear that whatever is going wrong here is not reproducible ☹️

anomiex commented 6 months ago

Possibly this is the same as #1136?

rcomer commented 6 months ago

We do indeed have many caches!

rcomer commented 6 months ago

I'm going to close this as a duplicate of #1136 which has debugging details. I will open a new feature request for our issue about using more than one workflow.

Edit: feature request now at #1137