fix(backup): resolve helper libraries from script dir when ODS_DIR lib is missing - #6080
Open
vaibhavsrv wants to merge 1 commit into
Open
vaibhavsrv wants to merge 1 commit into
vaibhavsrv wants to merge 1 commit into
Conversation
This was referenced Sep 20, 2026
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.
Why this matters
In
ods-backup.sh, shared rsync and path utilities are sourced directly from$ODS_DIR/lib/rsync.shand$ODS_DIR/lib/backup-paths.sh. When an operator runsods-backup.shagainst a custom target installation directory (or a minimal fixture directory lacking a checked-outlib/directory), sourcing fails immediately with:ods-backup.sh: line 32: /path/.../lib/rsync.sh: No such file or directoryThis crashes the backup utility before arguments can be inspected or preflight disk checks can run.
This change adds a fallback: when
$ODS_DIR/lib/rsync.shis absent, the script resolves its helper libraries from$SCRIPT_DIR/lib/(the directory whereods-backup.shitself resides). Existing in-tree installations and backup retention policies remain unaffected.Validation
ODS_DIRto a directory lackinglib/and invokingods-backup.shaborted withNo such file or directory.ods/tests/test_backup_script_lib_fallback.pyverifies thatods-backup.shseamlessly resolves helper libraries fromSCRIPT_DIR/liband executes with exit code 0.test_backup_script_lib_fallback.pypasses cleanly (exit code 0). Wired into Linux CI workflow under Legacy Update Fallback Backup Round Trip.Overlap check
ods-backup.sh.Risk / AI disclosure
AI-assisted investigation, implementation, and test regressions. This introduces fallback library resolution when running against non-standard
ODS_DIRpaths. Independent human review and platform/runtime qualification remain gates. No running configuration, deployment or upstream merge changed.Follow-up integration evidence
Composed with #5871, #5951, #5952, #5953, #6076, #6077, #6078, and #6079 at HEAD without conflicts. Production and test diffs passed together; backup and restore suites remain intact.
Backlog composition was local-only (production/test diffs, excluding workflow/Makefile wiring); it is not an upstream merge or independent human approval. Declared live-review gates remain open.