-
Notifications
You must be signed in to change notification settings - Fork 378
Create binary for cumulus testing node #1128 #1158
Create binary for cumulus testing node #1128 #1158
Conversation
I changed the PR to not use the builder that is mentioned in the issue.
The CLI is copy pasted from the original collator in |
* add build-spec subcommand * reorder args
The cargo fmt job is failing. (: So I have a few questions:
|
I should have probably given a bit more context. We are planning to migrate the cumulus integration tests to zombienet. Zombienet requires the binary. @pepoviola is working on zombienet and agreed to help us migrate the integration tests once I implemented the binary for him. My original plan was to merge this and have a separate PR for the tests themselves. For a short period, the binary would be unused. We could also leave this PR open and have the test migration here, but this comes at the cost of maintaining this PR. The extra binary is to have a clear separation between the testing infrastructure and the prod binary. They are similar, but the testing binary offers access to the test runtime and the extra arguments you mentioned (we are free to add more specific scenarios easily to the test-collator). We intend to use this test binary for all zombienet tests in cumulus. At some point, we could probably even remove the builder pattern for the old integration tests and have this test-collator only. |
Hi, I already have a couple of integration test ready to add in this Thanks! |
* add migrated tests * rename test files * uncomment args and remove extra collator node
I see! I'd personally would probably prefer if we'd use the production binary for those tests that actually can just use the production binary since, you know, over time the behavior between the production binary and the test binary might go out of sync and then we might not be testing what is actually relevant. We could also consider (assuming the changes are unintrusive enough, and I don't know if they'd be) adding an extra cargo opt-in feature for those special test-only args that the tests need and just use the production binary for all of them? But I know practical logistics of the whole thing might make this infeasible and/or a bad idea (and I'm not the one implementing this) so I'll leave this decision to you. (: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It mostly looks fine to me. Obviously it's still incomplete, but since this is purely for tests I think it's fine to just merge it and iterate on it instead of just waiting until everything's ready and do one huge PR.
* add migrated tests * rename test files * uncomment args and remove extra collator node * fix identation
|
||
#[derive(Debug, Parser)] | ||
#[clap( | ||
propagate_version = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
propagate_version = true, | |
version, | |
propagate_version = true, |
Without this the application doesn't have the version
option, thus can't use the propagate_version
.
Indeed clap
panics if the binary is built without --release
flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I think this was also missing for our other binaries, added it there too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I experienced, other binaries (e.g. polkadot-collator
) doesn't have the same problem.
I think this is because they are using a custom build script to manually define a custom version string augmented with the commit hash:
cumulus/polkadot-parachains/build.rs
Line 20 in a5bfd11
generate_cargo_keys(); |
And
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, was not aware of that. I left it only for the test binary, should be fine now
I haven't got enough experience with zombienet testing to give a strong opinion WRT the final application of this PR... but once the missing "version" thing is fixed, from a formal pow it LGTM |
I'm fine to merge this first and then have the test enabled later |
In this PR I create a simple binary for a cumulus testing node. This is a draft until we have checked that this is a good fit for testing with zombienet.
Supported cli args: