Skip to content

Rely on linux-packages action for release artefacts - #107

Open
leynos wants to merge 1 commit into
mainfrom
codex/update-release-workflow-and-documentation-reb9nx
Open

Rely on linux-packages action for release artefacts#107
leynos wants to merge 1 commit into
mainfrom
codex/update-release-workflow-and-documentation-reb9nx

Conversation

@leynos

@leynos leynos commented Sep 28, 2025

Copy link
Copy Markdown
Owner

Summary

  • drop the bespoke nfpm packaging step so the release workflow relies entirely on the shared linux-packages action
  • update the packaging and design documentation to describe the streamlined action-driven workflow

Testing

  • make fmt
  • make lint
  • make test
  • make nixie
  • make markdownlint

https://chatgpt.com/codex/tasks/task_e_68d952556b888322813fde83e70b4217

Summary by Sourcery

Replace the GoReleaser-based packaging step with shared linux-packages composite actions in the GitHub release workflow, update tests to detect the new actions, add man pages and staging scripts for both binaries, and align documentation with the streamlined process

New Features:

  • Add man page files for comenq and comenqd along with build scripts to stage them

Enhancements:

  • Streamline the release process by replacing the bespoke nfpm step with the shared linux-packages composite actions

CI:

  • Revamp release workflow to use a matrix build-packages job with rust-build-release and a separate publish step via softprops/action-gh-release

Documentation:

  • Revise automated cross-platform packaging and design docs to reflect the new action-driven workflow

Tests:

  • Update tests and test-support code to assert usage of the new shared release actions instead of GoReleaser

@sourcery-ai

sourcery-ai Bot commented Sep 28, 2025

Copy link
Copy Markdown

Reviewer's Guide

This PR refactors the release pipeline to drop the bespoke nfpm and GoReleaser steps in favor of a shared composite action-driven workflow. The release job is restructured into a matrix-based build-packages job that uses rust-build-release (which in turn invokes the linux-packages helper) to compile, stage man pages, and package .deb/.rpm artefacts, followed by a dedicated release step via softprops/action-gh-release. Tests and docs are updated to reflect this streamlined process, and man pages plus staging build scripts are added to support the new flow.

Class diagram for new build.rs man page staging scripts

classDiagram
    class ComenqBuildScript {
      +main()
      +copy_man_page() std::io::Result
      -manifest_dir: PathBuf
      -source: PathBuf
      -out_dir: PathBuf
      -dest: PathBuf
    }
    class ComenqdBuildScript {
      +main()
      +copy_man_page() std::io::Result
      -manifest_dir: PathBuf
      -source: PathBuf
      -out_dir: PathBuf
      -dest: PathBuf
    }
    ComenqBuildScript <|-- ComenqdBuildScript
Loading

File-Level Changes

Change Details Files
Revamped GitHub release workflow to use shared composite actions
  • Replaced GoReleaser step with a matrix-based build-packages job
  • Extracted release version, cleaned dist, and invoked rust-build-release action
  • Switched packaging to emit .deb/.rpm via shared linux-packages helper
  • Added release job using softprops/action-gh-release to draft artifacts
.github/workflows/release.yml
Updated test harness to detect the new shared actions
  • Renamed detection function from uses_goreleaser to uses_shared_release_actions
  • Adjusted logic to assert presence of both rust-build-release and action-gh-release
  • Updated Cucumber step definitions and feature file to match new naming
test-support/src/workflow.rs
tests/steps/release_steps.rs
tests/features/release.feature
test-support/src/lib.rs
Rewrote documentation to describe composite action-based packaging
  • Replaced GoReleaser-centric instructions with composite action workflow details
  • Described matrix build, man page staging, and linux-packages helper invocation
  • Kept historical context but focused on streamlined action-driven process
docs/automated-cross-platform-packaging.md
docs/comenq-design.md
Added man pages and build scripts for staging
  • Introduced packaging/man/comenq.1 and comenqd.1 man pages
  • Created build.rs in crates/comenq and crates/comenqd to copy man pages into build output
packaging/man/comenq.1
packaging/man/comenqd.1
crates/comenq/build.rs
crates/comenqd/build.rs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Sep 28, 2025

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@leynos has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 25 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between b00add4 and 6c6369b.

📒 Files selected for processing (11)
  • .github/workflows/release.yml (1 hunks)
  • crates/comenq/build.rs (1 hunks)
  • crates/comenqd/build.rs (1 hunks)
  • docs/automated-cross-platform-packaging.md (1 hunks)
  • docs/comenq-design.md (1 hunks)
  • packaging/man/comenq.1 (1 hunks)
  • packaging/man/comenqd.1 (1 hunks)
  • test-support/src/lib.rs (1 hunks)
  • test-support/src/workflow.rs (2 hunks)
  • tests/features/release.feature (1 hunks)
  • tests/steps/release_steps.rs (2 hunks)
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/update-release-workflow-and-documentation-reb9nx

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Pin the shared composite action to a version tag or release rather than a raw commit SHA to make upgrades and readability easier.
  • The two crate-specific build.rs files for staging man pages are identical – consider extracting that logic into a shared utility or build script to avoid duplication.
  • Add tests for uses_shared_release_actions that cover multiple matrix jobs and different job names to ensure both the build and publish steps are always detected.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Pin the shared composite action to a version tag or release rather than a raw commit SHA to make upgrades and readability easier.
- The two crate-specific build.rs files for staging man pages are identical – consider extracting that logic into a shared utility or build script to avoid duplication.
- Add tests for uses_shared_release_actions that cover multiple matrix jobs and different job names to ensure both the build and publish steps are always detected.

## Individual Comments

### Comment 1
<location> `crates/comenqd/build.rs:6` </location>
<code_context>
+
+fn main() {
+    if let Err(error) = copy_man_page() {
+        panic!("failed to stage man page: {error}");
+    }
+}
</code_context>

<issue_to_address>
**suggestion:** Consider using a more descriptive error message for failed man page staging.

Including the source and destination paths in the panic message will make it easier to identify the cause of the failure.
</issue_to_address>

### Comment 2
<location> `docs/automated-cross-platform-packaging.md:8` </location>
<code_context>
-declaratively defines the build, packaging, and release steps. This file will
-be used by a GitHub Actions workflow that triggers on new git tags.
+daemon for Linux (Fedora, Ubuntu). macOS packaging remains on hold, so the
+workflow focuses on Linux targets only. The current implementation replaces the
+earlier GoReleaser flow with composite actions hosted in
+`leynos/shared-actions`. These actions orchestrate the Rust build, stage the
</code_context>

<issue_to_address>
**issue (review_instructions):** This paragraph exceeds the 80 column wrapping limit for prose.

Please wrap all paragraphs and bullet points to a maximum of 80 columns for improved readability and to comply with documentation standards.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 3
<location> `docs/automated-cross-platform-packaging.md:22` </location>
<code_context>
+matching man page. The downstream `linux-packages` composite action, executed
+by `rust-build-release`, generates the `nfpm` manifest and packages the staged
+artefacts in one pass. This keeps the workflow lean—only the shared action ever
+executes `nfpm`—and ensures the generated `.deb` and `.rpm` files are ready to
+upload. Finally, `softprops/action-gh-release` publishes the generated packages
+to a draft GitHub Release, preserving the previous workflow's release review
</code_context>

<issue_to_address>
**issue (review_instructions):** This line is part of a paragraph that exceeds the 80 column limit.

Please ensure that all prose is wrapped to 80 columns. This helps maintain consistency and readability in documentation.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 4
<location> `docs/comenq-design.md:803` </location>
<code_context>
-triggers on version tags to run GoReleaser. It builds Linux packages and
-uploads them to a draft release. Mac support is currently deferred, so the
-workflow targets Linux only.
+To simplify installation, the project now relies on the composite actions
+published in `leynos/shared-actions`. The release workflow iterates over the
+`comenq` client and `comenqd` daemon for both the x86_64 and aarch64 GNU/Linux
</code_context>

<issue_to_address>
**issue (review_instructions):** This paragraph is not wrapped to 80 columns as required.

Please wrap this and all other paragraphs to 80 columns to comply with documentation formatting standards.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</issue_to_address>

### Comment 5
<location> `docs/comenq-design.md:811` </location>
<code_context>
+script copies from `packaging/man`. Packaging responsibility sits entirely with
+the shared `linux-packages` helper invoked by `rust-build-release`; it
+generates the transient `nfpm` manifest and emits `.deb` and `.rpm` artefacts
+for every matrix entry. The workflow uploads those artefacts to a draft GitHub
+Release via `softprops/action-gh-release`, preserving the manual review gate
+that existed in the GoReleaser-based flow. macOS support remains deferred, so
</code_context>

<issue_to_address>
**issue (review_instructions):** This line is part of a paragraph that exceeds the 80 column wrapping limit.

Please ensure all prose is wrapped to 80 columns for consistency and readability.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*.md`

**Instructions:**
Paragraphs and bullets must be wrapped to 80 columns

</details>
</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.

Comment thread crates/comenqd/build.rs

fn main() {
if let Err(error) = copy_man_page() {
panic!("failed to stage man page: {error}");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion: Consider using a more descriptive error message for failed man page staging.

Including the source and destination paths in the panic message will make it easier to identify the cause of the failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant