Skip to content

Make HeartbeatProcess#tick! lease argument backward-compatible#405

Closed
acaron wants to merge 1 commit intomainfrom
fix-tick-backward-compat
Closed

Make HeartbeatProcess#tick! lease argument backward-compatible#405
acaron wants to merge 1 commit intomainfrom
fix-tick-backward-compat

Conversation

@acaron
Copy link
Copy Markdown
Member

@acaron acaron commented Apr 30, 2026

The lease parameter was added to HeartbeatProcess#tick! in v0.85.0, changing the signature from 1 argument to 2. Callers still using the old 1-argument signature crash with ArgumentError: wrong number of arguments (given 1, expected 2) when upgrading.

Make lease optional so both call sites work. When omitted, lease is excluded from the heartbeat payload entirely, matching the pre-v0.85.0 wire format.

Also cleans up instance_variable_set usage in the heartbeat tests by introducing a PipedHeartbeatProcess test subclass with proper constructor injection.

co-authored by AI

@acaron acaron force-pushed the fix-tick-backward-compat branch 6 times, most recently from 627b31a to 2d3b68d Compare April 30, 2026 15:46
The lease parameter was added to tick! in v0.85.0 but callers in the
monolith (MultiTick#heartbeat) still use the old 1-arg signature.
Make lease optional so existing callers work without changes.

Bump ci-queue to v0.94.0.
@acaron acaron force-pushed the fix-tick-backward-compat branch from 2d3b68d to c425a30 Compare April 30, 2026 15:46
end

def test_tick_does_not_allocate_tick_marker_string
@hp.instance_variable_set(:@pipe, FakePipe.new)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Adding PipedHeartbeatProcess to remove usage of instance_variable_set

Copy link
Copy Markdown
Contributor

@ianks ianks left a comment

Choose a reason for hiding this comment

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

Shouldn't we just fix the callsite? it doesn't make much sense to have a nilable lease

@acaron
Copy link
Copy Markdown
Member Author

acaron commented Apr 30, 2026

Closing in favour of fixing callsite by fetching lease

@acaron acaron closed this Apr 30, 2026
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.

2 participants