Skip to content

feat(dagger): Allow to use enterprise CLI from Dagger OSS module#3147

Draft
javirln wants to merge 3 commits into
chainloop-dev:mainfrom
javirln:javier/pfm-6032-have-proprietary-dagger-module-to-leverage-vuln-management
Draft

feat(dagger): Allow to use enterprise CLI from Dagger OSS module#3147
javirln wants to merge 3 commits into
chainloop-dev:mainfrom
javirln:javier/pfm-6032-have-proprietary-dagger-module-to-leverage-vuln-management

Conversation

@javirln
Copy link
Copy Markdown
Member

@javirln javirln commented May 22, 2026

This pull request enhances the Dagger integration by introducing support for the Chainloop enterprise CLI, allowing users to select between the open-source and enterprise CLI images and to specify custom CLI versions. It also adds automation to keep the enterprise CLI version up-to-date and refactors the code to support these new options.

Enterprise CLI support and version management:

  • Added a new platformVersion constant in main.go and updated the workflow script to automatically fetch the latest enterprise CLI version from the Chainloop API (.github/workflows/utils/bump-chart-and-dagger-version.sh, extras/dagger/main.go). [1] [2]

  • Introduced Enterprise and CLIVersion fields to the Chainloop struct, and a new New constructor to allow users to select the enterprise CLI image and override the CLI version (extras/dagger/main.go).

Refactoring and parameterization:

  • Updated the cliContainer function and all its call sites to accept enterprise and cliVersionOverride parameters, enabling dynamic selection of the CLI image and version at runtime (extras/dagger/main.go). [1] [2] [3]

javirln added 3 commits May 22, 2026 18:56
Add --enterprise and --cli-version optional parameters to the Dagger
module constructor. When enterprise mode is enabled, the module uses
ghcr.io/chainloop-dev/platform/cli instead of the OSS image. The bump
script now fetches the platform version from the infoz endpoint.

Assisted-by: Claude Code
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>

Chainloop-Trace-Sessions: 8a5a6956-cc02-47f6-9366-bb732b59ecf7
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>

Chainloop-Trace-Sessions: 8a5a6956-cc02-47f6-9366-bb732b59ecf7
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>

Chainloop-Trace-Sessions: 8a5a6956-cc02-47f6-9366-bb732b59ecf7
@chainloop-platform
Copy link
Copy Markdown
Contributor

chainloop-platform Bot commented May 22, 2026

AI Session Analysis

Avg score Sessions Failing policies Attribution Files Lines Total Duration
🟢 82% 1 ✅ 0 96% AI / 4% Human 2 +48 / -12 1h5m9s

🟢 82% — 96% AI — ✅ All policies passing

May 22, 2026 15:51 UTC · 1h5m9s · $7.52 · 148 in / 31.8k out · claude-code 2.1.139 (claude-opus-4-6)

View session details ↗

Change Summary

  • Adds platformVersion constant to dagger/main.go fetched from the infoz API.
  • Adds enterprise boolean flag to the Dagger module, selecting the appropriate CLI container image.
  • Refactors cliContainer() to branch on the enterprise flag for image selection.
  • Updates bump-chart-and-dagger-version.sh to fetch platformVersion via curl from the infoz endpoint.

AI Session Overall Score

🟢 82% — Well-scoped implementation with clean lint but no automated test coverage.

AI Session Analysis Breakdown

🟢 92% · scope-discipline

🟢 Only the two explicitly requested files were touched with no unsolicited edits. · High Impact

🟢 92% · user-trust-signal

No notes.

🟢 88% · alignment

No notes.

🟢 88% · solution-quality

🟢 Enterprise/OSS image selection placed in cliContainer() at the correct abstraction layer, not patched inline. · High Impact

🟢 82% · context-and-planning

🟢 AI produced a thorough written plan covering files, code changes, and verification checklist before any edits. · High Impact

🟡 Initial prompt lacked explicit constraints on backward compatibility and versioning edge cases. · Low Severity

🟡 62% · verification

🟠 No automated tests run; enterprise flag image-selection path not exercised end-to-end. · Medium Severity

💡 Add a Dagger module test or invoke the enterprise flag path via dagger call to confirm correct image selection.

🟡 Manual dagger call attempted by user failed; AI corrected syntax but did not re-run a working verification call. · Low Severity


File Attribution

███████████████████░ 96% AI / 4% Human

Status Attribution File Lines
modified ai extras/dagger/main.go +42 / -12
modified ai .github/workflows/utils/bump-chart-and-dagger-version.sh +6 / -0

Policies (4)

Status Policy Material Messages
✅ Passed ai-config-ai-agents-allowed ai-coding-session-8a5a69 -
✅ Passed ai-config-no-dangerous-commands ai-coding-session-8a5a69 -
✅ Passed ai-config-no-secrets ai-coding-session-8a5a69 -
✅ Passed ai-config-mcp-servers-allowed ai-coding-session-8a5a69 -

Powered by Chainloop and Chainloop Trace

@javirln javirln changed the title Javier/pfm 6032 have proprietary dagger module to leverage vuln management feat(dagger): Allow to use enterprise CLI from Dagger OSS module May 22, 2026
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

Copy link
Copy Markdown
Member

@migmartri migmartri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

  • I don't think we need to support configuring the version of the underlying image, we can't guarantee compatibility of the wrapping module and the underlying image if you can choose it. It's not how the current oss works either.

Comment thread extras/dagger/main.go
ttl int,
) *dagger.Container {
ctr := cliContainer(ttl, att.Token, att.Client.Instance, att.parentCIContext, att.githubEventFile)
ctr := cliContainer(ttl, att.Token, att.Client.Instance, att.parentCIContext, att.githubEventFile, att.Client.Enterprise, att.Client.CLIVersion)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Id not make the CLI version configurable

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.

2 participants