Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Conversation

@aleveille
Copy link

@aleveille aleveille commented Jun 13, 2019

RFC :)

We've seen a few pipelines fails because of rate-limit / network issue / don't trust the Internet.

For instance, we've had instances of pipelines fail because of rate-limiting it logged in the Concourse job's step logs: "Not found for ". Our developers were quite confused by this and we wanted to better handle some HTTP errors to give relevant feedback in the resource's logs.

Therefore, I've added some error handling and retry mechanism for curlgh. The main idea is to dump the HTTP response headers in /tmp/responseheaders and check whether we had a 200 OK back (or not - and then handle it).

Points of discussions:

  • Usage of 'echo "some log " >&2' as a mean to output logs (letting the user know what went wrong and if the script will retry)
  • Whether the retry on Rate-limit should be enabled/disabled through a configuration flag
  • Whether we should limit or let the user configure the maximum sleep time for X-RateLimit-Reset (eg: if the limit gets reset in 40 minutes, should the build really sleep for 40 minutes?)

@aleveille aleveille mentioned this pull request Jun 13, 2019
@aleveille
Copy link
Author

If #15 is merged first, I can rebase my PR on it to use the same retry_count and retry_timeout flags.

@aleveille aleveille closed this May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant