Fix release workflow and circular dependencies #68

Merged
jwilger merged 2 commits from fix-eventcore-release-inclusion into main 2025-07-08 23:39:13 -07:00
jwilger commented 2025-07-08 23:29:04 -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. Release workflow was limited to only creating PRs: The workflow had command: release-pr which prevented automatic publishing when PRs are merged
  2. Circular dependency issue: Publishing eventcore failed because it has dev-dependencies on eventcore-memory and eventcore-postgres which aren't on crates.io yet
  3. Incorrect package configuration: eventcore-benchmarks was being published even though it should be internal-only
  4. Redundant workflow: Had separate release-publish.yml that duplicated release-plz functionality

The Solution

  1. Restore release-plz default behavior: Removed command: release-pr so it handles both PR creation and publishing
  2. Remove redundant workflow: Deleted release-publish.yml since release-plz handles everything
  3. Add publish = false to eventcore-benchmarks Cargo.toml
  4. Create eventcore-integration-tests crate to house all integration tests
  5. Move tests and examples that use adapters to the new integration crate
  6. Remove circular dev-dependencies from eventcore

How It Works Now

The release-plz workflow will:

  • Create/update a release PR when changes are pushed to main
  • Automatically publish to crates.io when that PR is merged
  • Handle dependency ordering automatically

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)

Verification

cargo publish -p eventcore --dry-run now succeeds, confirming the circular dependency is resolved.

Changes Summary

  • Fixed release-plz workflow to handle both operations
  • Removed redundant release-publish workflow
  • Added publish = false to benchmarks crate
  • Created new integration tests crate
  • Moved all adapter-dependent tests and examples
  • Removed circular dev-dependencies

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. **Release workflow was limited to only creating PRs**: The workflow had `command: release-pr` which prevented automatic publishing when PRs are merged 2. **Circular dependency issue**: Publishing `eventcore` failed because it has dev-dependencies on `eventcore-memory` and `eventcore-postgres` which aren't on crates.io yet 3. **Incorrect package configuration**: `eventcore-benchmarks` was being published even though it should be internal-only 4. **Redundant workflow**: Had separate release-publish.yml that duplicated release-plz functionality ### The Solution 1. **Restore release-plz default behavior**: Removed `command: release-pr` so it handles both PR creation and publishing 2. **Remove redundant workflow**: Deleted release-publish.yml since release-plz handles everything 3. **Add `publish = false`** to eventcore-benchmarks Cargo.toml 4. **Create eventcore-integration-tests crate** to house all integration tests 5. **Move tests and examples** that use adapters to the new integration crate 6. **Remove circular dev-dependencies** from eventcore ### How It Works Now The release-plz workflow will: - Create/update a release PR when changes are pushed to main - Automatically publish to crates.io when that PR is merged - Handle dependency ordering automatically ### 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) ### Verification `cargo publish -p eventcore --dry-run` now succeeds, confirming the circular dependency is resolved. ### Changes Summary - Fixed release-plz workflow to handle both operations - Removed redundant release-publish workflow - Added `publish = false` to benchmarks crate - Created new integration tests crate - Moved all adapter-dependent tests and examples - Removed circular dev-dependencies ## Definition of Done Checklist Please ensure all items in this checklist are completed before merging: - [x] Code follows project style guidelines - [x] Changes are well-documented - [x] All tests pass - [x] Performance implications have been considered - [x] Security implications have been reviewed - [x] Breaking changes are documented - [x] The change is backward compatible where possible
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-07-08 23:29:46 -07:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

This PR streamlines the release workflow and eliminates circular dev-dependencies to enable publishing to crates.io.

  • Restores full release-plz behavior and removes the redundant release-publish.yml
  • Marks internal-only crates (benchmarks, integration-tests) as publish = false and moves adapter tests into a new integration crate
  • Removes circular dev-dependencies from eventcore so it can be published independently

Reviewed Changes

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

Show a summary per file
File Description
eventcore/Cargo.toml Removed eventcore-memory and eventcore-postgres dev-deps to break circular references
eventcore-integration-tests/src/lib.rs Created a stub for the new integration-test crate
eventcore-integration-tests/Cargo.toml Configured integration tests crate with publish = false and dependencies
eventcore-benchmarks/Cargo.toml Added publish = false to prevent publishing internal benchmarks crate
Cargo.toml Added eventcore-integration-tests to the workspace members
.github/workflows/release-publish.yml Deleted redundant publish workflow
.github/workflows/release-plz.yml Updated comments to reflect both PR creation and publishing steps
Comments suppressed due to low confidence (1)

eventcore-integration-tests/src/lib.rs:7

  • The crate-level #![cfg(test)] attribute excludes all code from normal compilations, which may prevent the integration-test crate from being built or documented outside of test runs. Consider removing this attribute and applying #[cfg(test)] to specific test modules instead.
#![cfg(test)]
## Pull Request Overview This PR streamlines the release workflow and eliminates circular dev-dependencies to enable publishing to crates.io. - Restores full release-plz behavior and removes the redundant `release-publish.yml` - Marks internal-only crates (`benchmarks`, `integration-tests`) as `publish = false` and moves adapter tests into a new integration crate - Removes circular dev-dependencies from `eventcore` so it can be published independently ### Reviewed Changes Copilot reviewed 7 out of 38 changed files in this pull request and generated no comments. <details> <summary>Show a summary per file</summary> | File | Description | | ---------------------------------------------- | ---------------------------------------------------------------------- | | eventcore/Cargo.toml | Removed `eventcore-memory` and `eventcore-postgres` dev-deps to break circular references | | eventcore-integration-tests/src/lib.rs | Created a stub for the new integration-test crate | | eventcore-integration-tests/Cargo.toml | Configured integration tests crate with `publish = false` and dependencies | | eventcore-benchmarks/Cargo.toml | Added `publish = false` to prevent publishing internal benchmarks crate | | Cargo.toml | Added `eventcore-integration-tests` to the workspace members | | .github/workflows/release-publish.yml | Deleted redundant publish workflow | | .github/workflows/release-plz.yml | Updated comments to reflect both PR creation and publishing steps | </details> <details> <summary>Comments suppressed due to low confidence (1)</summary> **eventcore-integration-tests/src/lib.rs:7** * The crate-level `#![cfg(test)]` attribute excludes all code from normal compilations, which may prevent the integration-test crate from being built or documented outside of test runs. Consider removing this attribute and applying `#[cfg(test)]` to specific test modules instead. ``` #![cfg(test)] ``` </details>
Sign in to join this conversation.
No description provided.