feat(devcontainer): bake SAP ADT SDK into image at /opt/openadt#28
Conversation
Codespaces and devcontainers get p2 plugins and libsapjco3.so at build time via @abapify/p2-cli; postCreate only merges config and optional SNC staging. Bootstrap and SetupPathLocator prefer image paths; release tooling reads parent pom version. Co-authored-by: Cursor <cursoragent@cursor.com>
📝 WalkthroughWalkthroughThis PR introduces SAP ADT SDK installation to the devcontainer image and refactors version management to use the root POM. The image now bakes p2 plugins and JCo libraries into ChangesSAP ADT SDK Devcontainer Integration
Release Version Management Refactoring
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review Summary by QodoBake SAP ADT SDK into devcontainer image and simplify bootstrap
WalkthroughsDescription• Bake SAP ADT SDK into devcontainer image at /opt/openadt using @abapify/p2-cli • Simplify postCreate bootstrap to prefer image SDK paths with optional --provision-p2-sdk • Extend SetupPathLocator with /opt/openadt paths and fix Windows PowerShell path resolution • Align release tooling to read version from parent pom.xml instead of CLI module • Update devcontainer documentation and add p2 plugin download capability Diagramflowchart LR
A["Dockerfile builds image"] -->|"@abapify/p2-cli download"| B["SAP ADT p2 plugins at /opt/openadt"]
B -->|"Extract libsapjco3.so"| C["JCo native library staged"]
D["postCreate bootstrap"] -->|"Check imageSdkReady()"| E{SDK in image?}
E -->|"Yes"| F["Use /opt/openadt paths"]
E -->|"No + --provision-p2-sdk"| G["Download p2 to workspace"]
F --> H["Write runtime.openadt.toml"]
G --> H
I["SetupPathLocator"] -->|"Search order"| J["Image SDK → Staged → User homes"]
File Changes1. apps/openadt-bootstrap/src/main/java/org/openadt/bootstrap/SetupPathLocator.java
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Summary
This PR introduces a devcontainer image with SAP ADT SDK baked into /opt/openadt, simplifying bootstrap for Codespaces. The overall approach is solid, but I've identified 4 critical defects that must be fixed before merge.
Critical Issues Found
- Security: Download without integrity verification - Dockerfile downloads from external URL without checksum validation (CWE-494)
- Logic: Shell glob pattern failure handling - Unquoted glob can cause silent failures in Dockerfile
- Logic: Missing directory existence check -
findLatestJcoPluginJarcrashes if directory doesn't exist - Logic: Missing directory check before readdirSync - Bootstrap can crash if image SDK path is invalid
All issues have been commented inline with specific fixes.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 4 |
| Duplication | -1 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Code Review
This pull request bakes the SAP ADT SDK into the devcontainer image, updates runtime path resolution, and refactors POM version management. The review feedback highlights several critical improvements: first, when updating the parent POM version, child POMs' parent blocks must also be updated to avoid Maven build failures; second, empty segments in the child process path resolution should be filtered out to prevent an untrusted search path vulnerability (CWE-426); and finally, the hardcoded /opt/openadt paths in SetupPathLocator.java should respect the OPENADT_SDK_ROOT environment variable.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: adcad990d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull Request Overview
The PR successfully implements the baking of the SAP ADT SDK into the devcontainer image and updates the bootstrap utility, aligning with the primary goals. While Codacy analysis indicates the changes are 'up to standards', the review highlights several implementation gaps and risks.
Several acceptance criteria related to logic for detecting image-baked SDKs, JCo fragment extraction, and host-to-container path mapping lack corresponding automated test scenarios. Furthermore, the versioning tools rely on fragile regular expressions that are sensitive to line endings and XML tag ordering. These issues should be addressed to ensure the robustness of the release pipeline and the bootstrap utility.
About this PR
- The complex logic introduced in
tools/devcontainer-bootstrap(specifically version comparison, jar extraction, and path mapping) lacks automated unit tests. Given the criticality of this utility for environment setup, consider adding coverage for these helper functions.
Test suggestions
- Verify SetupPathLocator correctly identifies staged p2 plugins in the .devcontainer directory.
- Verify the devcontainer-bootstrap logic for detecting a valid image-baked SDK (imageSdkReady).
- Verify the extraction of libsapjco3.so from a JCo fragment jar (stageJcoNativeFromFragment).
- Verify that the bootstrap utility correctly maps absolute host paths to container workspace paths.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify the devcontainer-bootstrap logic for detecting a valid image-baked SDK (imageSdkReady).
2. Verify the extraction of libsapjco3.so from a JCo fragment jar (stageJcoNativeFromFragment).
3. Verify that the bootstrap utility correctly maps absolute host paths to container workspace paths.
Low confidence findings
- The Dockerfile build depends on
tools.hana.ondemand.com. This external dependency makes the image build non-deterministic if the site is unavailable or changes its structure. Consider if these artifacts can be mirrored or cached.
TIP How was this review? Give us feedback
There was a problem hiding this comment.
Pull request overview
This PR makes the devcontainer (and release tooling) more “repo-root aware” and Codespaces-friendly by baking the SAP ADT SDK (Eclipse p2 plugins + Linux JCo native) into the devcontainer image under /opt/openadt, and updating bootstrap/runtime path discovery and release scripts accordingly.
Changes:
- Bake SAP ADT SDK artifacts into the devcontainer image at
/opt/openadtand prefer those paths during devcontainer bootstrap. - Update runtime path detection (including staged devcontainer p2 roots) and Windows runtime preparation path handling.
- Align release/version tooling to use the reactor root
pom.xmlas the version source.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/release-version/src/main.ts | Switch version read/write to reactor root pom.xml (openadt-parent). |
| tools/package-release/src/main.ts | Read version from reactor root pom.xml; simplify jar path construction. |
| tools/devcontainer-bootstrap/src/main.ts | Add image-SDK detection, optional p2 provisioning, and write runtime.openadt.toml including adt_plugins_dir. |
| packaging/windows/prepare-openadt-runtime.ps1 | Build CLI module from reactor root; fix paths for jar discovery/copy. |
| packaging/windows/launcher/OpenAdtLauncher.cs | Use an explicit System32\\WindowsPowerShell\\v1.0\\powershell.exe path for launcher execution. |
| package.json | Add @abapify/p2-cli dev dependency for p2 download in devcontainer workflows. |
| docs/usage.md | Document new devcontainer flow (image SDK vs workspace provisioning). |
| apps/openadt-cli/pom.xml | Bump maven-dependency-plugin version for CLI build. |
| apps/openadt-bootstrap/src/test/java/org/openadt/bootstrap/SetupPathLocatorTest.java | Extend test coverage for staged devcontainer p2 plugin roots. |
| apps/openadt-bootstrap/src/main/java/org/openadt/bootstrap/SetupRuntimePreparer.java | Fix PowerShell executable resolution and tighten PATH for runtime prepare. |
| apps/openadt-bootstrap/src/main/java/org/openadt/bootstrap/SetupPathLocator.java | Add /opt/openadt and staged p2 roots to runtime discovery. |
| .github/workflows/release.yml | Commit version updates from pom.xml (root) instead of module pom. |
| .devcontainer/Dockerfile | Download p2 plugins/JCo native into /opt/openadt during image build. |
| .devcontainer/devcontainer.json | Prefer /opt/openadt SDK env vars/LD_LIBRARY_PATH in devcontainer. |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tools/devcontainer-bootstrap/src/main.ts (1)
801-846:⚠️ Potential issue | 🟠 Major | ⚡ Quick winThe new P2-only bootstrap flow still hard-requires local archives.
With
--provision-p2-sdk --skip-if-missing, this code only skips when the directory is absent. IfsourceRootexists but does not contain the JCo/Crypto/SAPCAR archives, it still throws here, which breaks the documented "re-download p2 into the workspace" workflow.Suggested fix
const effectiveSourceRoot = existsSync(sourceRoot) ? sourceRoot : resolve( await promptValue("Enter source folder with SAP archives", sourceRoot), ); + + if ( + args.skipIfMissing && + !args.jcoArchive && + !args.cryptoArchive && + !args.sapcarPath && + !pickByPattern(effectiveSourceRoot, /^sapjco31.*\.zip$/i) && + !pickByPattern(effectiveSourceRoot, /^SAPCRYPTOLIB.*\.SAR$/i) && + !pickByPattern(effectiveSourceRoot, /^SAPCAR.*\.(EXE|exe)$/i) + ) { + await finalizeDevcontainer(root, containerWorkspace, args); + return; + } + const jcoArchive = await resolveInputFile(🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tools/devcontainer-bootstrap/src/main.ts` around lines 801 - 846, The code currently requires matching archives even when the directory exists; change the flow so missing archive files do not error out when the user passed skipIfMissing (and is provisioning P2): call resolveInputFile for jcoArchive/cryptoArchive/sapcar inside a try/catch and if resolveInputFile throws a "not found" error, and args.skipIfMissing (and args.provisionP2Sdk if applicable) is true, call finalizeDevcontainer(root, containerWorkspace, args) and return instead of re-throwing; otherwise re-throw the error. This touches resolveInputFile, jcoArchive/cryptoArchive/sapcar, effectiveSourceRoot, args.skipIfMissing, args.provisionP2Sdk and finalizeDevcontainer.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.devcontainer/devcontainer.json:
- Line 12: The LD_LIBRARY_PATH assignment in .devcontainer/devcontainer.json
currently replaces any existing value; update the remoteEnv entry for
"LD_LIBRARY_PATH" to preserve the inherited container image paths by prepending
the existing value (use the variable substitution token
${containerEnv:LD_LIBRARY_PATH}) and then append the explicit paths shown;
target the "LD_LIBRARY_PATH" key in remoteEnv so native libraries from the base
image remain on the search path.
In @.devcontainer/Dockerfile:
- Around line 68-72: The FRAG selection is architecture-agnostic and may pick
the wrong com.sap.conn.jco.linux.*.jar; update the logic that sets FRAG to pick
the fragment matching the container architecture (use uname -m or Docker build
ARG to derive an arch token and map it to the p2 filename suffix) so the ls
pattern filters by that token (instead of matching all linux fragments), then
continue extracting SO_PATH and writing libsapjco3.so into
${OPENADT_SDK_ROOT}/dist/jco as before (references: FRAG, SO_PATH,
${OPENADT_SDK_ROOT}/dist/p2/plugins, libsapjco3.so).
In @.github/workflows/release.yml:
- Line 61: The release workflow currently runs git add pom.xml packaging/ which
misses module POMs; update the git add invocation in
.github/workflows/release.yml (the step that creates the bump commit) to stage
all rewritten module POMs as well, e.g. include a recursive glob for module POMs
such as replacing the command with one that adds pom.xml, packaging/ and all
module POMs (e.g. add '**/pom.xml' or use git ls-files to collect and git add
all changed pom.xml files) so apps/openadt-*/pom.xml files are included in the
bump commit.
In
`@apps/openadt-bootstrap/src/main/java/org/openadt/bootstrap/SetupRuntimePreparer.java`:
- Around line 132-137: The code in SetupRuntimePreparer that calls
builder.environment().put("PATH", ...) replaces the entire inherited PATH, which
prevents mvnw.cmd (invoked by prepare-openadt-runtime.ps1) from finding
java.exe; change this to prepend the Windows PowerShell/System32 entries to the
existing PATH instead of overwriting it: read the current PATH from
builder.environment().get("PATH") (or System.getenv("PATH") if null), construct
a new value that adds systemRoot + "\\System32\\WindowsPowerShell\\v1.0;" +
systemRoot + "\\System32;" + systemRoot + ";" + existingPath, and put that back
into builder.environment().put("PATH", newPath) so mvnw.cmd/java.exe resolution
(or JAVA_HOME) is preserved.
In `@tools/devcontainer-bootstrap/src/main.ts`:
- Around line 475-478: The imageSdkReady() function currently only checks ADT
bundles and libsapjco3.so, so update it to also verify a resolvable JCo jar is
present before treating the SDK as ready: locate and confirm the presence of a
JCo JAR matching com.sap.conn.jco_*.jar (either in the ADT pluginsDir or the JCo
distribution path used by resolveDevcontainerRuntime/ imageSdkJcoDir()) or reuse
resolveDevcontainerRuntime()'s resolution logic to ensure the JCo jar path is
valid; return false if no resolvable JCo jar is found. Reference:
imageSdkReady() and resolveDevcontainerRuntime().
---
Outside diff comments:
In `@tools/devcontainer-bootstrap/src/main.ts`:
- Around line 801-846: The code currently requires matching archives even when
the directory exists; change the flow so missing archive files do not error out
when the user passed skipIfMissing (and is provisioning P2): call
resolveInputFile for jcoArchive/cryptoArchive/sapcar inside a try/catch and if
resolveInputFile throws a "not found" error, and args.skipIfMissing (and
args.provisionP2Sdk if applicable) is true, call finalizeDevcontainer(root,
containerWorkspace, args) and return instead of re-throwing; otherwise re-throw
the error. This touches resolveInputFile, jcoArchive/cryptoArchive/sapcar,
effectiveSourceRoot, args.skipIfMissing, args.provisionP2Sdk and
finalizeDevcontainer.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 45d9092e-67e8-4a9f-b1a2-c49ed03a3cb1
📒 Files selected for processing (14)
.devcontainer/Dockerfile.devcontainer/devcontainer.json.github/workflows/release.ymlapps/openadt-bootstrap/src/main/java/org/openadt/bootstrap/SetupPathLocator.javaapps/openadt-bootstrap/src/main/java/org/openadt/bootstrap/SetupRuntimePreparer.javaapps/openadt-bootstrap/src/test/java/org/openadt/bootstrap/SetupPathLocatorTest.javaapps/openadt-cli/pom.xmldocs/usage.mdpackage.jsonpackaging/windows/launcher/OpenAdtLauncher.cspackaging/windows/prepare-openadt-runtime.ps1tools/devcontainer-bootstrap/src/main.tstools/package-release/src/main.tstools/release-version/src/main.ts
…dependency-plugin conflict)
… release tooling)
There was a problem hiding this comment.
9 issues found across 14 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…t regex, env var trim) Agent-Logs-Url: https://github.com/abapify/openadt/sessions/2d88f6fd-0ff0-448f-bf05-eea888ad6ac2 Co-authored-by: ThePlenkov <6381507+ThePlenkov@users.noreply.github.com>
- Fix nx format:check failure in devcontainer-bootstrap/main.ts - Add deterministic sort() before JCo fragment jar selection to prevent nondeterministic picks when version regex doesn't match - Add try/catch around OPENADT_SDK_ROOT Path.of() to fall back to /opt/openadt on InvalidPathException
…ropping systemRootFull
fix: act on PR #28 — resolve merge conflict and address review comments
- imageSdkReady(): also require resolvable JCo jar before treating SDK as ready
- devcontainer.json: preserve inherited LD_LIBRARY_PATH with ${containerEnv:LD_LIBRARY_PATH}
- SetupRuntimePreparer.applyTrustedPath(): prepend trusted dirs to existing PATH instead of replacing it entirely, so mvnw can find java.exe on Windows
There was a problem hiding this comment.
Review thread replies (commit 45274cc)
imageSdkReady() missing JCo jar check
Fixed — added !!findLatestJcoPluginJar(pluginsDir) guard so SDK is only considered ready when ADT bundles + JCo jar + native are all present.
LD_LIBRARY_PATH replacing inherited value
Fixed — added ${containerEnv:LD_LIBRARY_PATH} suffix to preserve any paths set by the base image.
SetupRuntimePreparer.applyTrustedPath() replacing entire PATH
Fixed — now prepends trusted Windows/System32 paths to the existing inherited PATH instead of replacing it. This ensures mvnw.cmd can still find java.exe.
Dockerfile:67 — Download without integrity check
The p2 CLI downloads from tools.hana.ondemand.com (official SAP-hosted Eclipse update site). For a devcontainer image build this is acceptable risk; the URL is pinned and the site is SAP-operated. Adding checksum verification would require maintaining a separate checksum list for every p2 artifact.
main.ts:513 — JCo underscore jar naming (Qodo)
The underscore naming (com.sap.conn.jco_<ver>.jar) is the standard Eclipse p2 bundle convention, not a compliance violation. The runtime references the jar by its actual filesystem path in runtime.openadt.toml; JCo itself does not validate the jar filename — only the native library and class contents matter.
Dockerfile:73 — WORKDIR points to deleted dir
Already fixed — the Dockerfile has cd / before rm -rf (line 74) and WORKDIR / after cleanup (line 77).
findLatestJcoPluginJar directory check
Already has existsSync(pluginsDir) guard at line 501-503.
pathForChildProcess empty PATH segments
Already filters empty segments via .filter((entry) => entry.trim().length > 0) at line 577.
writeDevcontainerRuntime empty adt_plugins_dir
Already conditional — only emits adt_plugins_dir when runtime.adtPluginsDir is truthy (lines 746-748).
resolveDevcontainerRuntime workspace adtPluginsDir
Already conditional — sets adtPluginsDir only when hasRequiredAdtBundles(pluginsDir) (lines 726-728).
|
There was a problem hiding this comment.
♻️ Duplicate comments (1)
.devcontainer/Dockerfile (1)
68-70:⚠️ Potential issue | 🟠 Major | ⚡ Quick winSelect JCo fragment by architecture before extraction.
Current selection is architecture-agnostic and can pick the wrong Linux fragment when multiple arches are present in the p2 repo.
Proposed change
- && JARS=("${OPENADT_SDK_ROOT}/dist/p2/plugins"/com.sap.conn.jco.linux.*.jar) \ - && FRAG="$(printf '%s\n' "${JARS[@]}" | sort -V | tail -1)" \ - && test -f "${FRAG}" \ + && case "$(dpkg --print-architecture)" in \ + amd64) jco_pattern='com.sap.conn.jco.linux.x86_64*.jar' ;; \ + arm64) jco_pattern='com.sap.conn.jco.linux.aarch64*.jar' ;; \ + *) echo "Unsupported architecture: $(dpkg --print-architecture)" >&2; exit 1 ;; \ + esac \ + && JARS=("${OPENADT_SDK_ROOT}/dist/p2/plugins"/${jco_pattern}) \ + && FRAG="$(printf '%s\n' "${JARS[@]}" | sort -V | tail -1)" \ + && test -f "${FRAG}" \🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.devcontainer/Dockerfile around lines 68 - 70, The current JARS/FRAG selection is architecture-agnostic and may pick the wrong Linux JCo fragment; fix by selecting the fragment that matches the build image architecture. Introduce an ARCH variable (e.g., from `uname -m` or `dpkg --print-architecture`), map it to the p2 artifact name (e.g., x86_64 -> linux.x86_64, aarch64 -> linux.aarch64), then change the JARS glob in the Dockerfile to include that architecture segment (replace com.sap.conn.jco.linux.*.jar with com.sap.conn.jco.linux.${ARCH_PATTERN}.*.jar) so FRAG picks the correct file and the existing `test -f "${FRAG}"` remains valid.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In @.devcontainer/Dockerfile:
- Around line 68-70: The current JARS/FRAG selection is architecture-agnostic
and may pick the wrong Linux JCo fragment; fix by selecting the fragment that
matches the build image architecture. Introduce an ARCH variable (e.g., from
`uname -m` or `dpkg --print-architecture`), map it to the p2 artifact name
(e.g., x86_64 -> linux.x86_64, aarch64 -> linux.aarch64), then change the JARS
glob in the Dockerfile to include that architecture segment (replace
com.sap.conn.jco.linux.*.jar with com.sap.conn.jco.linux.${ARCH_PATTERN}.*.jar)
so FRAG picks the correct file and the existing `test -f "${FRAG}"` remains
valid.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ed256357-9621-4d88-83db-98709b000fff
📒 Files selected for processing (9)
.devcontainer/Dockerfile.devcontainer/devcontainer.json.github/workflows/release.ymlapps/openadt-bootstrap/src/main/java/org/openadt/bootstrap/SetupPathLocator.javaapps/openadt-bootstrap/src/main/java/org/openadt/bootstrap/SetupRuntimePreparer.javapackaging/windows/launcher/OpenAdtLauncher.cstools/devcontainer-bootstrap/src/main.tstools/package-release/src/main.tstools/release-version/src/main.ts
🚧 Files skipped from review as they are similar to previous changes (6)
- packaging/windows/launcher/OpenAdtLauncher.cs
- .devcontainer/devcontainer.json
- tools/package-release/src/main.ts
- apps/openadt-bootstrap/src/main/java/org/openadt/bootstrap/SetupRuntimePreparer.java
- tools/release-version/src/main.ts
- tools/devcontainer-bootstrap/src/main.ts
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name=".devcontainer/devcontainer.json">
<violation number="1" location=".devcontainer/devcontainer.json:12">
P2: Appending `${containerEnv:LD_LIBRARY_PATH}` without a default can yield a trailing `:` when unset, which adds the current working directory to `LD_LIBRARY_PATH` lookup. Provide a non-empty default to avoid zero-length path entries.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| "OPENADT_SDK_ROOT": "/opt/openadt", | ||
| "SECUDIR": "/workspaces/openadt/.devcontainer/sec", | ||
| "LD_LIBRARY_PATH": "/workspaces/openadt/.devcontainer/dist/jco:/workspaces/openadt/.devcontainer/dist/snc" | ||
| "LD_LIBRARY_PATH": "/opt/openadt/dist/jco:/workspaces/openadt/.devcontainer/dist/jco:/workspaces/openadt/.devcontainer/dist/snc:${containerEnv:LD_LIBRARY_PATH}" |
There was a problem hiding this comment.
P2: Appending ${containerEnv:LD_LIBRARY_PATH} without a default can yield a trailing : when unset, which adds the current working directory to LD_LIBRARY_PATH lookup. Provide a non-empty default to avoid zero-length path entries.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .devcontainer/devcontainer.json, line 12:
<comment>Appending `${containerEnv:LD_LIBRARY_PATH}` without a default can yield a trailing `:` when unset, which adds the current working directory to `LD_LIBRARY_PATH` lookup. Provide a non-empty default to avoid zero-length path entries.</comment>
<file context>
@@ -9,7 +9,7 @@
"OPENADT_SDK_ROOT": "/opt/openadt",
"SECUDIR": "/workspaces/openadt/.devcontainer/sec",
- "LD_LIBRARY_PATH": "/opt/openadt/dist/jco:/workspaces/openadt/.devcontainer/dist/jco:/workspaces/openadt/.devcontainer/dist/snc"
+ "LD_LIBRARY_PATH": "/opt/openadt/dist/jco:/workspaces/openadt/.devcontainer/dist/jco:/workspaces/openadt/.devcontainer/dist/snc:${containerEnv:LD_LIBRARY_PATH}"
},
"postCreateCommand": "bun install && bun run bootstrap:devcontainer -- --non-interactive --skip-if-missing --container-workspace /workspaces/openadt",
</file context>
| "LD_LIBRARY_PATH": "/opt/openadt/dist/jco:/workspaces/openadt/.devcontainer/dist/jco:/workspaces/openadt/.devcontainer/dist/snc:${containerEnv:LD_LIBRARY_PATH}" | |
| "LD_LIBRARY_PATH": "/opt/openadt/dist/jco:/workspaces/openadt/.devcontainer/dist/jco:/workspaces/openadt/.devcontainer/dist/snc:${containerEnv:LD_LIBRARY_PATH:/usr/local/lib:/usr/lib:/lib}" |
fix: act on PR #28 — resolve merge conflict and address review comments
- imageSdkReady(): also require resolvable JCo jar before treating SDK as ready
- devcontainer.json: preserve inherited LD_LIBRARY_PATH with ${containerEnv:LD_LIBRARY_PATH}
- SetupRuntimePreparer.applyTrustedPath(): prepend trusted dirs to existing PATH instead of replacing it entirely, so mvnw can find java.exe on Windows
feat(devcontainer): bake SAP ADT SDK into image at /opt/openadt



Summary
Test plan
untime.openadt.toml\ points at image paths.
Made with Cursor
Summary by cubic
Bake the SAP ADT SDK into the devcontainer image at /opt/openadt for zero host setup. Bootstrap prefers the image SDK, can optionally provision p2 for custom images, and improves PATH/LD_LIBRARY_PATH handling.
New Features
libsapjco3.sowith@abapify/p2-cliinto/opt/openadt/dist/p2and/opt/openadt/dist/jco; exportsOPENADT_SDK_ROOTand preserves containerLD_LIBRARY_PATHwhile prepending image JCo.adt_plugins_dir, supports--provision-p2-sdk/--skip-p2-sdk, and extracts Linux JCo native from the fragment; image SDK is “ready” only when required bundles and a resolvable JCo jar exist./opt/openadtand staged.devcontainer/dist/p2/pluginsandjco;devcontainer.jsonpoints envs at the image SDK; docs updated for the image-first flow.Bug Fixes
System32\WindowsPowerShell\v1.0\powershell.exe; prepend trusted dirs toPATH(don’t replace) somvnwfinds Java; robustSystemRootresolution.LD_LIBRARY_PATHnow preserves${containerEnv:LD_LIBRARY_PATH}.OPENADT_SDK_ROOTparsing with fallback to/opt/openadt; minor CI/format fixes and Dockerfile addswget.Written for commit 45274cc. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes
Chores
Documentation