8000 refactor: reimplement download of latest versions by augustoccesar · Pull Request #248 · mentimeter/linkup · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor: reimplement download of latest versions #248

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

Merged

Conversation

augustoccesar
Copy link
Collaborator

The main reason that prompted this reimplementation was rate limits from GitHub. If we got rate-limited by GitHub, we should block checking again until the rate limit resets.
The time of when it will be reset is in the header x-ratelimit-reset.

Closes SHIP-2147

References:

@augustoccesar augustoccesar self-assigned this Jun 12, 2025
The main reason that prompted this reimplementation was rate limits from GitHub.
If we got rate-limited by GitHub, we should block checking again until the
rate limit resets.
The time of when it will be reset is in the header `x-ratelimit-reset`.

References:
- https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28#checking-the-status-of-your-rate-limit
@augustoccesar augustoccesar force-pushed the augustoccesar/avoid-trying-to-fetch-again-if-rate-limited branch from b084f55 to 938bb79 Compare June 12, 2025 14:14
@augustoccesar augustoccesar requested a review from Copilot June 16, 2025 10:51
Copilot

This comment was marked as outdated.

@augustoccesar augustoccesar requested a review from Copilot June 16, 2025 11:07
Copilot

This comment was marked as outdated.

@augustoccesar augustoccesar requested a review from Copilot June 16, 2025 11:22
Copilot

This comment was marked as outdated.

@augustoccesar augustoccesar requested a review from Copilot June 16, 2025 11:27
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the version checking and update mechanisms to address GitHub rate limit issues by implementing new API calls and error handling improvements. Key changes include:

  • Adding serialization support (Serialize/Deserialize) to VersionChannel and Version structures.
  • Renaming API calls from available_update to check_for_update and updating cache clearing logic.
  • Changing the download flow to use update.binary.download() with improved error context.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
linkup/src/versioning.rs Added Serialize and Deserialize derives to VersionChannel and Version for consistency.
linkup-cli/src/commands/update.rs Updated update logic to use new API methods and improved error context when downloading.
Comments suppressed due to low confidence (2)

linkup-cli/src/commands/update.rs:55

  • Ensure that the new update.binary.download() method returns a decompressed binary equivalent to the previous update.linkup.download_decompressed('linkup') method, to avoid any unintended behavior changes.
let new_linkup_path = update

linkup-cli/src/commands/update.rs:38

  • Verify that CachedReleases::clear() effectively clears the same cache as the previous clear_cache() implementation to ensure consistent update behavior.
release::CachedReleases::clear();

@augustoccesar augustoccesar marked this pull request as ready for review June 16, 2025 11:30
@augustoccesar augustoccesar requested a review from a team June 16, 2025 11:30
@augustoccesar augustoccesar merged commit aa2480f into next Jun 17, 2025
6 checks passed
@augustoccesar augustoccesar deleted the augustoccesar/avoid-trying-to-fetch-again-if-rate-limited branch June 17, 2025 12:21
augustoccesar added a commit that referenced this pull request Jun 18, 2025
Changelog:
- #241 
- #244
- #245 
- #246 
- #243 
- #248

---------

Co-authored-by: Oliver Stenbom <oliver@stenbom.eu>
augustoccesar added a commit that referenced this pull request Jun 18, 2025
Changelog:
- #241
- #244
- #245
- #246
- #243
- #248

---------

Co-authored-by: Oliver Stenbom <oliver@stenbom.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0