Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: remove infinite loop in signer during tests #5259

Merged
merged 5 commits into from
Oct 2, 2024

Conversation

kantai
Copy link
Member

@kantai kantai commented Oct 1, 2024

Description

This PR removes an infinite loop in the signer when cfg!(test) is active. The rationale for this is that signer integration tests often stop the stacks-node threads (via panic, asserts, etc.) on failure before they stop the signer threads. I think this leads to a situation where a test failure loops indefinitely, which in the CI prevents logs from appearing, making diagnosing CI failures and flaky tests very difficult.

This PR also removes the first block push invocation -- if the first push in the loop succeeds, there's no need to repush.

@kantai kantai requested a review from a team as a code owner October 1, 2024 14:13
@jferrant jferrant self-requested a review October 1, 2024 14:33
Copy link
Collaborator

@jferrant jferrant left a comment

Choose a reason for hiding this comment

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

There is another infinite loop where post_block is called. If you could add that change there too, it would be great!
EDIT: my bad. I could swear there was one in broadcast_signed_block. But I think this was accidentally removed. I know its not part of this PR, but i wonder if it SHOULD infinitely loop in that case as well and then in testing (feel it was removed in a faulty merge), exit prematurely. What do you think?

@kantai kantai requested a review from a team as a code owner October 1, 2024 19:21
@jferrant jferrant requested a review from wileyj October 2, 2024 14:34
Copy link
Contributor

@wileyj wileyj left a comment

Choose a reason for hiding this comment

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

lgtm

@kantai kantai added this pull request to the merge queue Oct 2, 2024
Merged via the queue into develop with commit 3bd42e0 Oct 2, 2024
1 check passed
@blockstack-devops
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants