Switch integration tests to use the peer module#15222
Merged
Conversation
a345912 to
e9a31ff
Compare
lhoguin
commented
Jan 22, 2026
b1c2ca7 to
39c8d31
Compare
peer module
bb3c011 to
1f7cd41
Compare
566e542 to
7c7bad1
Compare
d665cfa to
4db08b3
Compare
We get better control over the nodes and avoid issues such as nodes still running after we Ctrl+C. This is also faster although we might not see a difference in CI. This is a first step to improving running RabbitMQ nodes concurrently.
We do not need to wait for the node to fail to self discover during boot because we will be setting up `meck` and cluster right after that.
While it is not very important since the command is not used often it is worth fixing.
We haven't needed it since 2019 and definitely don't with `peer`.
By using separate directories to generate intermediary files instead of generating them with the exact same filename.
SECONDARY_DIST_VSN takes a version of RabbitMQ to download and use for the SECONDARY_DIST environment. For example: SECONDARY_DIST_VSN=4.2.3 The dist environment is only setup once and is not downloaded again as long as it remains available (ie not deleted). By default the dist environments are in the secondary_dist/ folder at the root of the RabbitMQ repository. This location can be changed using the SECONDARY_DIST_DIR variable which must contain an absolute path to the directory. For example: SECONDARY_DIST_DIR=/home/`whoami`/rabbitmq/secondary_dist/ Combined we can run mixed version tests using a command like: SECONDARY_DIST_VSN=4.2.0 SECONDARY_DIST_DIR=/home/`whoami`/rabbitmq/secondary_dist/ make -C deps/rabbit ct Although SECONDARY_DIST_DIR is best exported from your own shell's rc file if you're going to use it, as this allows sharing the same secondary_dist/ directory across all RabbitMQ clones and worktrees.
19b47f8 to
79aabb6
Compare
peer modulepeer module
ansd
reviewed
Jan 29, 2026
dumbbell
requested changes
Jan 29, 2026
Collaborator
dumbbell
left a comment
There was a problem hiding this comment.
I tested it with mixed-version testing locally and it works great!
I don’t see log messages mentionning the start of nodes in the common_test HTML reports. Could you please add some messages back?
The console output is back to the default verbose one. That’s fine with me, if you prefer it. I just wanted to note it.
I also made two small comments on the code itself below.
Contributor
Author
|
@dumbbell Tweaked as you asked, also did a tiny refactoring to badmatch on peer:start error instead of error({...}) (same result but code is cleaner this way). Note that peer:start doesn't start rabbit so if that fails we really want to crash. Rabbit is started after that. |
Contributor
Author
|
Got OK from JSP in chat. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bulk of the PR is switching to
peerto start RabbitMQ nodes, which has a number of advantages including efficiency and better control over the nodes (they stop when CT stops). But the PR also contains general CI improvements like no longer skipping on ssl certificate generation failure or node start failure in init which was likely happening since we stopped using Concourse. See individual commits for details.