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

[No Ticket] resilience against api errors when retrieving endpoint version #1051

Merged
merged 2 commits into from
Sep 20, 2022

Conversation

meghfossa
Copy link
Contributor

@meghfossa meghfossa commented Sep 19, 2022

Overview

This PR,

  • wraps getEndpointVersion with recover

Acceptance criteria

  • API Error due to getEndpointVersion does not cause a fatal issue

Testing plan

This is hard to test, as this error seems to occur intermittently.
To test this PR, I intentionally modified the endpoint to include additional s and ran ./fossa analyze (it should succeed)

endpointAppManifest :: Url scheme -> Url scheme
endpointAppManifest baseurl = baseurl /: "rest" /: "applinks" /: "*" /: "manifests" -- note the additional `s`

Risks

N/A

References

N/A

Checklist

  • I added tests for this PR's change (or explained in the PR description why tests don't make sense).
  • If this PR introduced a user-visible change, I added documentation into docs/.
  • If this change is externally visible, I updated Changelog.md. If this PR did not mark a release, I added my changes into an # Unreleased section at the top.
  • If I made changes to .fossa.yml or fossa-deps.{json.yml}, I updated docs/references/files/*.schema.json. You may also need to update these if you have added/removed new dependency type (e.g. pip) or analysis target type (e.g. poetry).

version <- getEndpointVersion
-- Using 'recovery' as API corresponding to 'getEndpointVersion',
-- seems to be not stable and we sometimes see TimeoutError in telemetry
version <- recover getEndpointVersion
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refer to datadog / events cmd+f "ConnectionTimeout"

@meghfossa meghfossa marked this pull request as ready for review September 19, 2022 23:53
@meghfossa meghfossa requested a review from a team as a code owner September 19, 2022 23:53
@meghfossa meghfossa enabled auto-merge (squash) September 20, 2022 01:25
@meghfossa meghfossa merged commit 22aa195 into master Sep 20, 2022
@meghfossa meghfossa deleted the feat/remove-endpoint-version branch September 20, 2022 02:00
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants