Repository navigation
asu: recover from upstream version metadata failures - #1675
Open
1715173329 wants to merge 1 commit into
Open
1715173329 wants to merge 1 commit into
1715173329 wants to merge 1 commit into
Conversation
Handle network errors and invalid version metadata without aborting app initialization. Keep the last successful version data when a refresh fails, and publish new data only after parsing and validation succeed. Return HTTP 503 when version information is unavailable and retry on subsequent requests so the service recovers when upstream is reachable. Cover startup failures, request recovery, and stale data preservation. A missing upcoming_version field makes the refresh fail and preserves previously loaded data. An empty string or null value is accepted and skipped when assembling the version lists. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1675 +/- ##
===========================================
+ Coverage 80.75% 93.08% +12.32%
===========================================
Files 15 21 +6
Lines 977 2241 +1264
===========================================
+ Hits 789 2086 +1297
+ Misses 188 155 -33 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
@1715173329, just so you know, I'm planning on testing this on my local server (had hoped to get to it last weekend), but I've been busy with other things. I definitely like the idea! Should help stop a lot of the complaining whenever we get a patch release building. 😀 |
Member
Author
|
Thanks for the test. I've also tested this patch on ImmortalWrt asu instances for a week and it looks good so far. |
This branch has not been deployed
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.
Handle network errors and invalid version metadata without aborting app initialization. Keep the last successful version data when a refresh fails, and publish new data only after parsing and validation succeed.
Return HTTP 503 when version information is unavailable and retry on subsequent requests so the service recovers when upstream is reachable. Cover startup failures, request recovery, and stale data preservation.
A missing upcoming_version field makes the refresh fail and preserves previously loaded data. An empty string or null value is accepted and skipped when assembling the version lists.