Skip to content

fix(backup): resolve helper libraries from script dir when ODS_DIR lib is missing - #6080

Open
vaibhavsrv wants to merge 1 commit into
Osmantic:public-betafrom
vaibhavsrv:fix/backup-script-dir-lib-fallback
Open

vaibhavsrv wants to merge 1 commit into
Osmantic:public-betafrom
vaibhavsrv:fix/backup-script-dir-lib-fallback

Conversation

@vaibhavsrv

Copy link
Copy Markdown
Contributor

Why this matters

In ods-backup.sh, shared rsync and path utilities are sourced directly from $ODS_DIR/lib/rsync.sh and $ODS_DIR/lib/backup-paths.sh. When an operator runs ods-backup.sh against a custom target installation directory (or a minimal fixture directory lacking a checked-out lib/ directory), sourcing fails immediately with:
ods-backup.sh: line 32: /path/.../lib/rsync.sh: No such file or directory
This 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.sh is absent, the script resolves its helper libraries from $SCRIPT_DIR/lib/ (the directory where ods-backup.sh itself resides). Existing in-tree installations and backup retention policies remain unaffected.

Validation

  • Baseline reproduction: Setting ODS_DIR to a directory lacking lib/ and invoking ods-backup.sh aborted with No such file or directory.
  • Post-fix verification: Running ods/tests/test_backup_script_lib_fallback.py verifies that ods-backup.sh seamlessly resolves helper libraries from SCRIPT_DIR/lib and executes with exit code 0.
  • Telemetry: Backup test suite passes: test_backup_script_lib_fallback.py passes cleanly (exit code 0). Wired into Linux CI workflow under Legacy Update Fallback Backup Round Trip.

Overlap check

Risk / AI disclosure

AI-assisted investigation, implementation, and test regressions. This introduces fallback library resolution when running against non-standard ODS_DIR paths. 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.

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.

1 participant