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

Continue on error #3

Open
ericcornelissen opened this issue Aug 24, 2020 · 0 comments
Open

Continue on error #3

ericcornelissen opened this issue Aug 24, 2020 · 0 comments

Comments

@ericcornelissen
Copy link

I just started using this Action and had a quick look at the source code to see how it works. Based on that (and not on my experience with the Action so far) I have one suggestion: instead of terminating the Action when there is an error or an unexpected error, continue when an error occurs and report all the errors that occurred when the Action finished.

I'm not a Go expert but I would suggested doing that by returning []error in forEachArtifact and appending any errors from iter (and possibly ListWorkflowRuns?) to a slice that is returned when the last page is reached.

I do think there should be a separate way to handle the error reported in #2 to ensure the Action stops as soon as the rate limit is reached.


As an aside, based on reading the code it seems that return-on-stop is never executed because iter only ever returns true if it also returns an error. This may be simplifed by returning just an error (instead of both a boolean and an error).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant