Skip to content

asu: recover from upstream version metadata failures - #1675

Open
1715173329 wants to merge 1 commit into
openwrt:mainfrom
1715173329:fix/reload-ver
Open

1715173329 wants to merge 1 commit into
openwrt:mainfrom
1715173329:fix/reload-ver

Conversation

@1715173329

Copy link
Copy Markdown
Member

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.

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

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.08%. Comparing base (5e65dec) to head (7dbe6d2).
⚠️ Report is 424 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@efahl

efahl commented Oct 26, 2026

Copy link
Copy Markdown
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. 😀

@efahl efahl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've been running this on my home server for a day now, looks solid.

@aparcar Could we get this in before @hauke tags 24.10.9, see what shakes out for what should be a low volume update?

@1715173329

Copy link
Copy Markdown
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

No deployments
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