-
Notifications
You must be signed in to change notification settings - Fork 1
Make processing resilient to missing secondary services with B2 backup system #34
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: pcunning <171210+pcunning@users.noreply.github.com>
Co-authored-by: pcunning <171210+pcunning@users.noreply.github.com>
|
@copilot rebase then fix This skips the source that causes lots of issues downstream with processing. Instead use a env variable with a "backup_path" to upload the latest used file version to b2 under a hidden path. |
Co-authored-by: pcunning <171210+pcunning@users.noreply.github.com>
Co-authored-by: pcunning <171210+pcunning@users.noreply.github.com>
I've implemented the backup system as requested. The solution uses the Key changes in commit 8a8b48f:
This ensures resilient processing during service outages while maintaining current files when services are available. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot your approach here won't work because if we're missing one data source we will have a large issue downstream because we store the full hash or the generated data. Your approach would cause a lot of updates that shouldn't happen if one source was missing. Instead let's save the most recent copy of the downloaded data in b2 and use that copy if one of the secondary services (radioid, LOTW) is unavailable. If the ULS or b2 is unavailable we should fail. |
Co-authored-by: pcunning <171210+pcunning@users.noreply.github.com>
I've revised the backup system approach in commit f2f6fdd. The key changes:
This ensures that when BACKUP_PATH is set, we always have data for secondary services (either fresh or from backup), maintaining hash stability as you requested. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR addresses the issue where ARRL LOTW maintenance (and other secondary service outages) would cause the entire weekly processing to fail with fatal errors or generate inconsistent data hashes.
Problem
Previously, when secondary services like LOTW, RadioID, or GEO data were unavailable, the download functions would call
log.Fatalf(), causing the entire application to exit. Additionally, if processing continued without secondary data, it would cause hash changes for all callsigns, triggering unnecessary updates downstream in B2.Solution
Implemented a B2-backed backup system that:
Changes Made
lotw.Download(),radioid.Download(),geo.Download(), andised.Download()to return errors instead of callinglog.Fatalf()BackupDownloaderto automatically save and retrieve secondary data files from B2log.Fatalf()since it's essential for processingBACKUP_PATHenvironment variable to enable backup functionalityBehavior
Before: LOTW maintenance → entire processing fails OR inconsistent hashes causing mass updates
After: LOTW maintenance → uses backup copy → stable hashes → no unnecessary updates
Example output with backup system enabled:
Example output when primary fails but backup succeeds:
Configuration
Set the
BACKUP_PATHenvironment variable to enable the backup system:This ensures resilient processing during service outages while maintaining hash stability and preventing unnecessary downstream updates.
Fixes #32.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.