OCHA-DAP / hdx-signals

HDX Signals
https://un-ocha-centre-for-humanitarian.gitbook.io/hdx-signals/
GNU General Public License v3.0
6 stars 0 forks source link

retry GHA run on failure #263

Open zackarno opened 1 day ago

zackarno commented 1 day ago

@martinig94 and I were discussing that it would be nice if there was a way for a GHA to re-run 1 or 2x in case of failure. Sometimes certain API fails can call, but then when re-run they work.

Sleuthing around If found this a retry action that looks promising.

I tried adding it to the acled_conflict.yaml on the audience-analysis branch as I knew that would fail. I implemented it here:

2c7e1b0

and here is the GHA Run .. it looks like it kind of worked?

anyways i'll probably delete from this audience-analysis branch as it is out of scope, but would be nice if we had a sand-box to test this out

martinig94 commented 22 hours ago

hey Zack! That's cool and I agree that should be done in a separate branch. I think that the way to test it is to use some sort of mocking, so you can simulate the intended behaviour for the API calls (API not giving a response after the first call and then giving a positive one at the second)