Merged
Conversation
Prevents hitting the unauthenticated GitHub API rate limit (60/hr) when releases don't exist or the API returns errors. Failed lookups now cache an empty string for 15 minutes instead of retrying on every page load.
- Cache failed GitHub API lookups for 15 minutes to prevent hitting the unauthenticated rate limit (60 req/hr). - Add MINUTE_IN_SECONDS to test bootstrap. - Add set_transient expectations to failure-path tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request releases version 1.2.4 of the plugin, focusing on improving error handling for GitHub release lookups to avoid hitting unauthenticated API rate limits. The update ensures that failed lookups are cached for 15 minutes, preventing repeated failed requests from exhausting the rate limit. The changelog, documentation, and tests have been updated accordingly.
Release and Documentation Updates:
package.json,vmfa.php, and updated the stable tag inreadme.txtto reflect the new release. [1] [2] [3] [4]CHANGELOG.mdandreadme.txtdescribing the fix for GitHub API rate limiting. [1] [2]Bug Fixes and Improvements:
AddonManager.phpto cache failed GitHub release lookups for 15 minutes by setting an empty transient, preventing repeated failed requests from hitting the unauthenticated API rate limit. [1] [2]Testing Enhancements:
AddonManagerTest.phpto verify that failed lookups correctly set the transient cache for 15 minutes. [1] [2]MINUTE_IN_SECONDSin the test bootstrap to support the new caching logic.