Skip to content

Latest commit

 

History

History
229 lines (174 loc) · 5.07 KB

File metadata and controls

229 lines (174 loc) · 5.07 KB

async-nats Upgrade Checklist

Use this checklist when upgrading from async-nats 0.35 to 0.46.

Pre-Upgrade

  • Read UPGRADE_ASSESSMENT.md
  • Ensure all tests pass on current version (0.35)
    just test-full
  • Create a backup branch (skipped - working directly on upgrade)
    git checkout -b backup/pre-nats-upgrade
    git push origin backup/pre-nats-upgrade
    git checkout main  # or your working branch

Upgrade Process

1. Update Dependencies

  • Update Cargo.toml:

    [workspace.dependencies]
    async-nats = { version = "0.46", features = ["service"] }
  • Update lock file:

    cargo update -p async-nats
  • Verify the update:

    cargo tree | grep async-nats
    # Should show: async-nats v0.46.0

2. Check Compilation

  • Check for compilation errors:

    cargo check --workspace
  • If errors occur, likely causes:

    • Import path changes (update use statements)
    • Missing feature flags (add to Cargo.toml)
    • Type changes (review error messages)

3. Run Tests

  • Start NATS server:

    just nats-up
  • Run all workspace tests:

    cargo test --workspace
  • Run integration tests specifically:

    cargo test -p jsonrpc-nats --test integration_test -- --nocapture
  • Run clippy for warnings:

    cargo clippy --workspace --all-targets
  • Stop NATS server:

    just nats-down

4. Manual Testing

  • Test pingpong example server (requires live NATS):

    # Terminal 1
    cargo run -p pingpong -- server
  • Test pingpong example client (requires live NATS):

    # Terminal 2
    cargo run -p pingpong -- client ping "hello" 3
    cargo run -p pingpong -- client count
    cargo run -p pingpong -- client simple
  • Verify all client commands work correctly

5. Review Changes

  • Check for deprecation warnings:

    cargo build --workspace 2>&1 | grep -i deprecat
  • Review any new warnings:

    cargo build --workspace 2>&1 | grep -i warning
  • Check dependency tree for any conflicts:

    cargo tree | grep -i conflict

Post-Upgrade

Documentation

  • Update README.md if it mentions async-nats version
  • Update any internal documentation
  • Note any API changes in CHANGELOG.md

Version Control

  • Review all changes:

  • Commit the upgrade:

    git add Cargo.toml Cargo.lock
    git commit -m "Upgrade async-nats from 0.35 to 0.46
    
    - Updated dependency to latest version
    - All tests passing
    - No breaking changes affecting our usage"
  • Tag the upgrade (optional):

    git tag -a nats-0.46-upgrade -m "Upgraded to async-nats 0.46"
    git push origin nats-0.46-upgrade

Rollback (If Needed)

If issues are discovered:

  • Revert Cargo.toml changes:

    git checkout HEAD -- Cargo.toml Cargo.lock
    cargo check --workspace
  • Or revert to backup branch:

    git checkout backup/pre-nats-upgrade
  • Document the issue for later investigation

Verification Checklist

After upgrade, verify these critical paths:

  • Client can connect to NATS server
  • Client can publish messages
  • Client can subscribe and receive messages
  • Server can create endpoints
  • Server can handle RPC requests
  • Request/Response pattern works
  • Error handling works correctly
  • All examples run without errors (requires live NATS server)
  • No performance degradation (if applicable)

Notes

Common Issues:

  1. Feature Flag Missing

    • Error: "the following required features are not enabled..."
    • Fix: Add missing feature to Cargo.toml features list
  2. Import Path Changed

    • Error: "cannot find ... in crate async_nats"
    • Fix: Update use statements to new paths
  3. Type Changes

    • Error: "expected ..., found ..."
    • Fix: Consult CHANGELOG for type changes

Getting Help:

Sign-off

  • All tests pass
  • No new warnings
  • Examples work correctly (requires live NATS server)
  • Code review completed (if applicable)
  • Ready for deployment

Upgraded by: GitHub Copilot Date: February 9, 2026 Version: async-nats 0.35 → 0.46 Test results: ☑ Pass ☐ Fail Notes:

✅ All unit tests passed (3/3)
✅ All clippy checks passed (0 warnings)
✅ Release build successful (132 crates compiled)
✅ Created comprehensive integration test suite (8 tests)
✅ No breaking changes affecting our codebase
✅ API compatibility verified through integration tests
Note: Manual example testing requires live NATS server
---

**Quick Commands Reference:**

```bash
# Full test suite with NATS setup/teardown
just test-full

# Update and test
cargo update -p async-nats && cargo test --workspace

# Check everything
just clean && just build && just clippy && just test