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

Fix flaky dependency version retrieval #344

Open
sophiewigmore opened this issue Jan 3, 2023 · 6 comments
Open

Fix flaky dependency version retrieval #344

sophiewigmore opened this issue Jan 3, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@sophiewigmore
Copy link
Member

Expected Behavior

Dependency workflow version retrieval should work seamlessly.

Current Behavior

The retrieval step fails every few days with a flake, see #336, and the passes again.
It would be great if we could figure out what the issue is and make that code more resilient so we have less toil associated with dependency workflow failures

@sophiewigmore sophiewigmore added bug Something isn't working dependencies labels Jan 3, 2023
@ryanmoran
Copy link
Member

This appears to be a common issue across almost all of the repos that retrieve from GitHub. We aren't using an API token when we make the request and so in some cases we get rate-limited.

@sophiewigmore
Copy link
Member Author

Some examples of errors I've seen:

  1. In Passenger:
    panic: json: cannot unmarshal object into Go value of type []github.GithubReleaseNamesDTO

  2. In ICU:
    2023/01/03 12:23:30 received a non 200 status code: status code 403 received

@robdimsdale
Copy link
Member

the second failure mode seems entirely consistent with rate-limiting. The first might be unrelated - just a bad response

@ryanmoran
Copy link
Member

I think the first case shows up in instances where we aren't checking the status code, so we don't error on a 403 and then try to unmarshal a JSON response that doesn't match our struct and error out.

@robdimsdale
Copy link
Member

Also related: paketo-buildpacks/github-config#653

That issue won't cover buildpack-specific dependency code, but it does cover the same types of failure modes in the common tooling.

@robdimsdale
Copy link
Member

Also joshuatcasey/libdependency#25 will fix this issue for buildpacks that use libdependency (e.g. passenger)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants