Skip to content

Conversation

@johlju
Copy link
Member

@johlju johlju commented Feb 8, 2026

This change is Reviewable

@coderabbitai
Copy link

coderabbitai bot commented Feb 8, 2026

Walkthrough

The Dockerfile adds idempotent logic that detects DSC version and conditionally downloads PowerShell_adapter.dsc.resource.json into DSC v3 install locations if the manifest is missing, skipping WindowsPowerShell_adapter.

Changes

Cohort / File(s) Summary
DSCv3 Adapter Manifest Workaround
Dockerfile
Adds DSC_VERSION detection (dsc --version) and conditional RUN blocks that check for PowerShell_adapter.dsc.resource.json in /opt/microsoft/dsc and fetch it from the upstream PowerShell DSC repository only when absent; explicitly excludes WindowsPowerShell_adapter.

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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is minimal but related to the changeset, containing only a Reviewable embed without additional context. Add meaningful description explaining the purpose, motivation, or impact of the workaround for better context.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a workaround for a missing PowerShell adapter manifest in a Dockerfile.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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.

Copy link

@coderabbitai coderabbitai bot left a 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.

@johlju
Copy link
Member Author

johlju commented Feb 8, 2026

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Feb 8, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@johlju johlju merged commit 48f98f6 into main Feb 8, 2026
2 checks passed
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