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

Add timeout on github client #1290

Merged
merged 2 commits into from
Jul 5, 2023
Merged

Add timeout on github client #1290

merged 2 commits into from
Jul 5, 2023

Conversation

neel-astro
Copy link
Contributor

@neel-astro neel-astro commented Jul 3, 2023

Description

As of now GitHub client does not have timeouts in any form, as a result whenever there is an issue on the GitHub end, Astro CLI ends up in a hang state. This PR introduces an aggressive timeout to the GitHub client because the use case for the API calls is not a blocker for any command execution, and it will ensure seamless UX even in case GitHub is experiencing an outage.

🎟 Issue(s)

Related #1291

🧪 Functional Testing

List the functional testing steps to confirm this feature or fix.

📸 Screenshots

Add screenshots to illustrate the validity of these changes.

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make lint before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Tested against Houston-API and Astronomer (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation

@codecov
Copy link

codecov bot commented Jul 3, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.19 ⚠️

Comparison is base (4fbffff) 87.31% compared to head (da3508a) 87.12%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1290      +/-   ##
==========================================
- Coverage   87.31%   87.12%   -0.19%     
==========================================
  Files         113      114       +1     
  Lines       13255    13289      +34     
==========================================
+ Hits        11573    11578       +5     
- Misses        992     1021      +29     
  Partials      690      690              
Impacted Files Coverage Δ
cmd/root.go 91.42% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@neel-astro neel-astro merged commit e672f4c into main Jul 5, 2023
@neel-astro neel-astro deleted the github-api-timeout branch July 5, 2023 15:53
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.

3 participants