oprypin / nightly.link

Downloads the latest "nightly" build/artifact from a continuous testing workflow
https://nightly.link/
GNU Affero General Public License v3.0
675 stars 22 forks source link

latest even if failing/cancelled? #14

Closed seanmacavaney closed 3 years ago

seanmacavaney commented 3 years ago

Handy tool! Is it possible to add an option for getting the latest artifacts, even if the run failed or was canceled (without knowing the ID ahead of time)?

Thanks, sean

oprypin commented 3 years ago

Can you describe the use case more? Also, don't cancelled runs have no artifacts by definition?

seanmacavaney commented 3 years ago

Sure! I have artifacts generated here for some tests here: https://github.com/allenai/ir_datasets/actions/runs/629644487. I want to make a public dashboard that gives the current status of each test, so it's important to be able to get the latest version when it fails (otherwise the dashboard would always show everything passing). I could modify the action so that it doesn't "fail" when a test fails, but I benefit from getting an automated email when something fails, and I'd rather not give that up. I could also interface directly with the Github API to accomplish this, but it would be way easier to have a static site that just fetches the artifacts using nightly.link.

The example above shows a case where the run was canceled, but some artifacts were still generated.

Thanks!

oprypin commented 3 years ago

Agh I'm torn. I don't mind adding this, and it's easy, but it really doesn't fit in with the feature set or the URLs. The closest idea I have is appending ?status=finished but it may confuse people because that'll be the only possible value.

seanmacavaney commented 3 years ago

Couldn't it be either ?status=finished or ?status=success (where success is the default and can be omitted)?

oprypin commented 3 years ago

That's what I'm saying, yes. Just not super happy with how it looks. But I'll probably do it.

seanmacavaney commented 3 years ago

Awesome- thanks!

oprypin commented 3 years ago

https://nightly.link/allenai/ir_datasets/workflows/verify_downloads/master?status=completed