-
Notifications
You must be signed in to change notification settings - Fork 0
fix: add workaround for missing PowerShell adapter manifest #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe Dockerfile adds idempotent logic that detects DSC version and conditionally downloads Changes
Sequence Diagram(s)sequenceDiagram
participant Builder as Docker build
participant FS as Container filesystem (/opt/microsoft/dsc)
participant Upstream as Upstream DSC repo (GitHub)
Builder->>FS: run check for PowerShell_adapter.dsc.resource.json
alt file exists
FS-->>Builder: file found -> skip download
else file missing
Builder->>Upstream: curl raw manifest (using DSC_VERSION)
Upstream-->>Builder: manifest content
Builder->>FS: write manifest to /opt/microsoft/dsc
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. No actionable comments were generated in the recent review. 🎉 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@Dockerfile`:
- Around line 105-111: The Dockerfile uses ENV DSC_VERSION and sudo in the
build-stage curl block which causes CI lint failures and needlessly exposes a
build-only variable; change ENV DSC_VERSION to an ARG (used only at build time)
and remove the unnecessary sudo from the curl/if block that writes to
"${DSC_DIR}/PowerShell_adapter.dsc.resource.json" (you are still root until USER
developer). Also address the potential version drift between Install-DscExe
-IncludePrerelease (which installs the latest prerelease) and the hardcoded
DSC_VERSION by either deriving DSC_VERSION dynamically from the installed DSC at
build time or adding a clear comment that DSC_VERSION must be manually kept in
sync with the version installed by Install-DscExe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@Dockerfile`:
- Around line 105-111: Replace the curl call with wget to match the rest of the
Dockerfile: use DSC_DIR and DSC_VERSION (computed from dsc --version) and
download the same URL into "${DSC_DIR}/PowerShell_adapter.dsc.resource.json"
with wget flags that quiet output and write to that path (e.g., --quiet and
-O/--output-document), preserving redirect behavior; keep the surrounding
conditional that checks for the file and the DSC_VERSION extraction logic intact
so only the downloader changes.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
This change is