Skip to content

Unify release process of CLI and DMR#682

Merged
ericcurtin merged 4 commits intomainfrom
release-notes-for-cli
Feb 17, 2026
Merged

Unify release process of CLI and DMR#682
ericcurtin merged 4 commits intomainfrom
release-notes-for-cli

Conversation

@ilopezluna
Copy link
Contributor

@ilopezluna ilopezluna commented Feb 16, 2026

This pull request makes significant changes to the CI/CD workflows and Go module structure, primarily simplifying build and release processes and removing the separate CLI module. The most impactful changes are the removal of the cmd/cli Go module, the deletion of the dedicated CLI build workflow, and enhancements to the release workflow, including new triggers for downstream packaging and improved tagging/version output.

Go module and build simplification:

  • Removed the cmd/cli/go.mod file, consolidating dependencies into the root module and eliminating the separate CLI module.
  • Deleted the .github/workflows/cli-build.yml workflow, removing the dedicated CLI build process.
  • Simplified the Makefile linting commands to only run golangci-lint on the root module, no longer running it separately for cmd/cli.
  • Updated CI workflow (.github/workflows/ci.yml) to remove go mod tidy and checks for the cmd/cli module and workspace files, reflecting the module consolidation.

Release workflow enhancements:

  • Renamed and generalized the release workflow name and run-name in .github/workflows/release.yml, removing references to "model-runner images for CE".
  • Improved tag and version handling in the release workflow, now outputting both release_tag and version, and using them for downstream steps. [1] [2] [3] [4]
  • Removed filtering of CLI tags when determining the latest tag, since CLI tags are no longer relevant.
  • Added race detection to Go tests in the release workflow for better test coverage.

Downstream workflow triggers and instructions:

  • Added new jobs to the release workflow to trigger the model-cli-release workflow in a private repo and the Docker CE packaging workflow, including instructions for manual release steps in the Docker release repo.
  • Updated the GitHub release job to depend on the new downstream workflow triggers and to use the new version output.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ilopezluna, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant improvement to the release management process for the Docker Model CLI by automating the creation of release notes. It sets up a dedicated GitHub Actions workflow that leverages an AI agent to compile and format changes from merged pull requests, ensuring consistent and comprehensive release documentation with minimal manual effort.

Highlights

  • New GitHub Actions Workflow: A new GitHub Actions workflow has been introduced to automate the generation of release notes for the Docker Model CLI.
  • Automated Release Notes Generation: The workflow defines an AI agent responsible for gathering merged pull requests between specified tags, categorizing them into various types (Features, Bug Fixes, Performance, etc.), and formatting them into a release-notes.md file.
  • Structured Release Notes: The agent follows a predefined template for release notes, including categories, PR titles, numbers, authors, and a full changelog comparison link.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .github/agents/cli-release-notes-generator.yaml
    • Added a new agent configuration file for automated release note generation.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/cli-release.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request adds a new agent configuration for docker/model-runner to automate the generation of release notes for the CLI. The agent definition is well-structured with clear instructions for the language model. My review focuses on improving the security and robustness of the agent by suggesting more restrictive permissions and clarifying some of the instructions to ensure predictable behavior. Overall, this is a great addition for automating release management.

@ilopezluna ilopezluna marked this pull request as ready for review February 16, 2026 15:57
@ilopezluna ilopezluna requested a review from a team February 16, 2026 15:57
Copy link
Contributor

@sourcery-ai sourcery-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.

Hey - I've found 2 issues, and left some high level feedback:

  • In trigger-model-cli-release, passing the full release-notes.md content via gh workflow run ... -f changelog="${{ steps.notes.outputs.changelog }}" is likely to break on newlines/quotes and may exceed the argument size; consider using --raw-field or a file-based/artefact-based mechanism for the changelog input in the target workflow instead of inlining the entire markdown.
  • The cli-release-notes-generator.yaml instructions embed GitHub-style expressions like ${{ inputs.release_tag }} inside a static config file, which won’t be interpolated by Actions; if you intend those values to be dynamic, they should be supplied via the workflow inputs/env to cagent-action rather than embedded as literal strings.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `trigger-model-cli-release`, passing the full `release-notes.md` content via `gh workflow run ... -f changelog="${{ steps.notes.outputs.changelog }}"` is likely to break on newlines/quotes and may exceed the argument size; consider using `--raw-field` or a file-based/artefact-based mechanism for the changelog input in the target workflow instead of inlining the entire markdown.
- The `cli-release-notes-generator.yaml` instructions embed GitHub-style expressions like `${{ inputs.release_tag }}` inside a static config file, which won’t be interpolated by Actions; if you intend those values to be dynamic, they should be supplied via the workflow inputs/env to `cagent-action` rather than embedded as literal strings.

## Individual Comments

### Comment 1
<location> `.github/workflows/cli-release.yml:229-233` </location>
<code_context>
+          echo "🚀 Triggering model-cli-release workflow"
+          echo "   ref: $RELEASE_TAG"
+          echo "   release_tag: v$VERSION"
+          gh workflow run release.yml \
+            --repo docker/model-cli-release \
+            -f ref="$RELEASE_TAG" \
+            -f release_tag="v$VERSION" \
+            -f changelog="${{ steps.notes.outputs.changelog }}"
+          echo "✅ model-cli-release workflow triggered"
+
</code_context>

<issue_to_address>
**issue (bug_risk):** Passing multiline release notes via a single `-f changelog="..."` argument to `gh workflow run` is fragile.

Because `changelog` is multiline and injected directly into a double-quoted shell argument, any quotes, backslashes, or large content in the release notes can break or truncate this `gh workflow run` invocation. Consider a safer approach like writing the changelog to a temp file and using `-f changelog=@file` (where supported), or base64-encoding and decoding in the called workflow. At minimum, escape double quotes and backslashes before writing to `$GITHUB_OUTPUT` or before invoking `gh`.
</issue_to_address>

### Comment 2
<location> `.github/workflows/cli-release.yml:57-58` </location>
<code_context>
+          LATEST_TAG=$(git tag --list 'cmd/cli/v*' --sort=-v:refname | head -1)
+          echo "Latest existing CLI tag: ${LATEST_TAG:-<none>}"
+
+          if [ -n "$EXPLICIT_TAG" ]; then
+            # Validate explicit tag format (accept with or without v prefix)
+            if ! echo "$EXPLICIT_TAG" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
+              echo "::error::Invalid release tag format: '$EXPLICIT_TAG'. Expected format: v<MAJOR>.<MINOR>.<PATCH> (e.g., v1.2.3)"
</code_context>

<issue_to_address>
**suggestion:** Explicit tag validation comment and implementation are inconsistent about allowing a missing `v` prefix.

The implementation only allows tags starting with `v` (`^v[0-9]+\.[0-9]+\.[0-9]+$`), while the comment claims tags without `v` are also valid. Either update the regex/logic to support both forms (e.g. `^v?[0-9]+\.[0-9]+\.[0-9]+$` and strip an optional `v`), or change the comment and error message to state that the `v` prefix is required.

Suggested implementation:

```
          if [ -n "$EXPLICIT_TAG" ]; then
            # Validate explicit tag format (accept with or without v prefix)
            if ! echo "$EXPLICIT_TAG" | grep -qE '^v?[0-9]+\.[0-9]+\.[0-9]+$'; then
              echo "::error::Invalid release tag format: '$EXPLICIT_TAG'. Expected format: <MAJOR>.<MINOR>.<PATCH> or v<MAJOR>.<MINOR>.<PATCH> (e.g., 1.2.3 or v1.2.3)"

```

```
            VERSION="${EXPLICIT_TAG#v}"
            RELEASE_TAG="cmd/cli/v$VERSION"

```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ericcurtin
Copy link
Contributor

ericcurtin commented Feb 16, 2026

Can we just do releases for https://github.com/docker/model-runner as a monolith? Keeping it simple, test, release everything as one.

@doringeman
Copy link
Contributor

Doubling down on @ericcurtin's comment, WDYT if we also remove the CLI's go.mod?

@ilopezluna ilopezluna changed the title feat: add GitHub Actions workflow for model-cli release management Unify release process of CLI and DMR Feb 16, 2026
@ilopezluna
Copy link
Contributor Author

@ericcurtin @doringeman I have updated the PR to only have one go.mod file and one release workflow. So CLI and DMR will be released together (will share same version). I also removed the workflow to build and test the cli, now its redundant. Let me know what do you think 🙏

@doringeman
Copy link
Contributor

Mind that we'll also need to update https://github.com/docker/packaging/actions/workflows/release-model.yml, https://github.com/docker/release-repo/actions/workflows/plugin.yml, and even docs.
I can review this tomorrow morning.

doringeman added a commit to doringeman/packaging that referenced this pull request Feb 17, 2026
See docker/model-runner#682.

Signed-off-by: Dorin Geman <dorin.geman@docker.com>
Copy link
Contributor

@doringeman doringeman left a comment

Choose a reason for hiding this comment

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

Let's try it!

@ericcurtin ericcurtin merged commit 8c176d9 into main Feb 17, 2026
19 of 20 checks passed
@ericcurtin ericcurtin deleted the release-notes-for-cli branch February 17, 2026 14:03
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