Skip to content

Fix dynamic DSP bundle version detection - #9

Open
damonbanks wants to merge 4 commits into
mainfrom
fix/dynamic-dsp-bundle-version
Open

Fix dynamic DSP bundle version detection#9
damonbanks wants to merge 4 commits into
mainfrom
fix/dynamic-dsp-bundle-version

Conversation

@damonbanks

Copy link
Copy Markdown
Contributor

Summary

  • infer the bundle release from the supplied archive or directory name
  • detect the required DSP platform image tag from the bundled CLI
  • prompt interactively for a bundle when one is not supplied
  • export the detected image to Docker Compose
  • remove stale version-specific examples from script help

Testing

  • bash -n setup_and_validate.sh
  • ./setup_and_validate.sh --skip-prereqs --bundle /Users/damon.banks/Downloads/virtru-dsp-bundle-2.0.6.7.tar.gz
  • Result: 21 passed, 0 failed; DSP v2.7.15 stack healthy

Copilot AI lite review requested due to automatic review settings September 3, 2026 21:25

Copilot AI 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.

🟡 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_TAG from the bundled dsp CLI version output.
  • Add interactive bundle selection when no bundle is supplied and no default bundle directory is present.
  • Export DSP_IMAGE for 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.

Comment thread setup_and_validate.sh Outdated
Comment thread setup_and_validate.sh
Comment thread setup_and_validate.sh
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 3, 2026 21:34
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>

Copilot AI 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.

🟡 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

Comment thread setup_and_validate.sh
Comment on lines 700 to +703
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"
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.

3 participants