Fix dynamic DSP bundle version detection - #9
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new interactive bundle selection path can still exit immediately on common invalid inputs, and dsp version failures can currently terminate the script under set -euo pipefail before the intended validation/logging runs.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the local DSP stack bootstrap/validation script to automatically derive the bundle release and required DSP platform image tag from the selected bundle, reducing hard-coded version coupling and improving usability when a bundle path isn’t provided.
Changes:
- Infer bundle release from the bundle path (archive or directory) and derive
DSP_PLATFORM_IMAGE_TAGfrom the bundleddspCLI version output. - Add interactive bundle selection when no bundle is supplied and no default bundle directory is present.
- Export
DSP_IMAGEfor Docker Compose variable substitution and remove version-specific help examples.
File summaries
| File | Description |
|---|---|
| setup_and_validate.sh | Adds dynamic bundle/platform version detection, interactive bundle selection, and exports detected image for Compose. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The new platform-version detection path currently validates/uses an uninitialized normalized_bundle_platform_version, which will break version detection at runtime.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
| bundle_platform_version=$("$bundle_dir/dsp" version 2>&1 \ | ||
| | awk '$1 == "Version:" { print $2; exit }') | ||
| normalized_bundle_platform_version="${bundle_platform_version#v}" | ||
| if [[ "$normalized_bundle_platform_version" != "$normalized_expected_platform_version" ]]; then | ||
| log_fail "DSP bundle CLI version mismatch in $bundle_dir" | ||
| log_fail "Expected $DSP_PLATFORM_IMAGE_TAG from bundle $DSP_BUNDLE_RELEASE; got ${bundle_platform_version:-unknown}." | ||
| | awk '$1 == "Version:" { print $2; exit }' || true) | ||
| if [[ ! "$normalized_bundle_platform_version" =~ ^[0-9]+(\.[0-9]+){2}([._-][0-9A-Za-z.-]+)?$ ]]; then | ||
| log_fail "Could not detect a valid DSP platform version from $bundle_dir/dsp" |
Summary
Testing