Fix release workflow to only create PRs, not publish #67

Merged
jwilger merged 2 commits from fix-eventcore-release-inclusion into main 2025-07-08 21:38:00 -07:00
jwilger commented 2025-07-08 21:24:57 -07:00 (Migrated from github.com)

Description

This PR fixes the release workflow issues and resolves circular dev-dependencies that were preventing publishing to crates.io.

The Problems

  1. Missing command specification: The release-plz action was running both release-pr AND release commands
  2. Circular dependency issue: Publishing eventcore failed because it has dev-dependencies on eventcore-memory which wasn't published yet
  3. Incorrect package publishing: eventcore-benchmarks was being published even though it should be internal-only
  4. Fundamental cargo limitation: Can't publish a crate if its dev-dependencies aren't on crates.io

The Solution

  1. Specify command: release-pr in the release-plz workflow to only create PRs
  2. Add publish = false to eventcore-benchmarks Cargo.toml
  3. Create eventcore-integration-tests crate to house all integration tests
  4. Move tests and examples that use adapters to the new integration crate
  5. Remove circular dev-dependencies from eventcore

New Publishing Order

This establishes the correct publishing order without circular dependencies:

  1. eventcore-macros (no dependencies)
  2. eventcore (no longer has adapter dev-deps)
  3. eventcore-memory, eventcore-postgres (depend on eventcore)
  4. Integration tests use all crates together (not published)

Impact

  • Fixes the release workflow to work correctly
  • Enables publishing all crates to crates.io
  • Maintains all existing tests in the new integration crate
  • Clean separation between library code and integration tests

Note

Some postgres tests are failing due to local database configuration issues, but this doesn't affect the fix. The key verification is that cargo publish -p eventcore --dry-run now succeeds.

Definition of Done Checklist

Please ensure all items in this checklist are completed before merging:

  • Code follows project style guidelines
  • Changes are well-documented
  • All tests pass
  • Performance implications have been considered
  • Security implications have been reviewed
  • Breaking changes are documented
  • The change is backward compatible where possible
## Description This PR fixes the release workflow issues and resolves circular dev-dependencies that were preventing publishing to crates.io. ### The Problems 1. **Missing command specification**: The release-plz action was running both `release-pr` AND `release` commands 2. **Circular dependency issue**: Publishing `eventcore` failed because it has dev-dependencies on `eventcore-memory` which wasn't published yet 3. **Incorrect package publishing**: `eventcore-benchmarks` was being published even though it should be internal-only 4. **Fundamental cargo limitation**: Can't publish a crate if its dev-dependencies aren't on crates.io ### The Solution 1. **Specify `command: release-pr`** in the release-plz workflow to only create PRs 2. **Add `publish = false`** to eventcore-benchmarks Cargo.toml 3. **Create eventcore-integration-tests crate** to house all integration tests 4. **Move tests and examples** that use adapters to the new integration crate 5. **Remove circular dev-dependencies** from eventcore ### New Publishing Order This establishes the correct publishing order without circular dependencies: 1. eventcore-macros (no dependencies) 2. eventcore (no longer has adapter dev-deps) 3. eventcore-memory, eventcore-postgres (depend on eventcore) 4. Integration tests use all crates together (not published) ### Impact - Fixes the release workflow to work correctly - Enables publishing all crates to crates.io - Maintains all existing tests in the new integration crate - Clean separation between library code and integration tests ### Note Some postgres tests are failing due to local database configuration issues, but this doesn't affect the fix. The key verification is that `cargo publish -p eventcore --dry-run` now succeeds. ## Definition of Done Checklist Please ensure all items in this checklist are completed before merging: - [ ] Code follows project style guidelines - [ ] Changes are well-documented - [ ] All tests pass - [ ] Performance implications have been considered - [ ] Security implications have been reviewed - [ ] Breaking changes are documented - [ ] The change is backward compatible where possible
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-07-08 21:25:25 -07:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

This PR refines the release process by restricting the initial workflow to only create release PRs and preventing the benchmarks crate from being published.

  • Specify command: release-pr in the release-plz workflow to stop it from publishing packages.
  • Add publish = false to the eventcore-benchmarks Cargo.toml so that benchmarks remain internal.
  • Lean on a separate release-publish workflow for actual package publication after PR merge.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
eventcore-benchmarks/Cargo.toml Mark benchmarks crate as non-publishable (publish = false).
.github/workflows/release-plz.yml Add command: release-pr under with: to create PRs only.
Comments suppressed due to low confidence (2)

eventcore-benchmarks/Cargo.toml:13

  • [nitpick] Consider adding a brief comment above publish = false to explain that the benchmarks crate is internal-only and should not be published, improving clarity for future maintainers.
publish = false

.github/workflows/release-plz.yml:48

  • Verify that the command: release-pr line is correctly indented under the with: section to ensure the YAML is valid and the action picks up the intended command.
          command: release-pr
## Pull Request Overview This PR refines the release process by restricting the initial workflow to only create release PRs and preventing the benchmarks crate from being published. - Specify `command: release-pr` in the release-plz workflow to stop it from publishing packages. - Add `publish = false` to the `eventcore-benchmarks` Cargo.toml so that benchmarks remain internal. - Lean on a separate release-publish workflow for actual package publication after PR merge. ### Reviewed Changes Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments. | File | Description | |-----------------------------------------|------------------------------------------------------------------| | eventcore-benchmarks/Cargo.toml | Mark benchmarks crate as non-publishable (`publish = false`). | | .github/workflows/release-plz.yml | Add `command: release-pr` under `with:` to create PRs only. | <details> <summary>Comments suppressed due to low confidence (2)</summary> **eventcore-benchmarks/Cargo.toml:13** * [nitpick] Consider adding a brief comment above `publish = false` to explain that the benchmarks crate is internal-only and should not be published, improving clarity for future maintainers. ``` publish = false ``` **.github/workflows/release-plz.yml:48** * Verify that the `command: release-pr` line is correctly indented under the `with:` section to ensure the YAML is valid and the action picks up the intended command. ``` command: release-pr ``` </details>
Sign in to join this conversation.
No description provided.