Rename examples, integration tests with vague names #1933
Labels
Client
This issue points to a problem in the data-plane of the library.
design-discussion
An area of design currently under discussion and open to team and community feedback.
EngSys
This issue is impacting the engineering system.
Per https://azure.github.io/azure-sdk/rust_introduction.html#rust-repo-samples-unique, examples (and integration tests; probably should update guidelines along with a mention in https://azure.github.io/azure-sdk/rust_implementation.html#rust-client-tests), examples should use unique names to avoid conflicts.
While testing #1926 I noticed several Event Hubs tests and the cosmos examples compiled to somewhat generic names. For Cosmos, at least, it's an example simply called
cosmos
which is probably fine, but Event Hubs had names likeconsumer
,producer
, andround_trip
. We should probably rename those to at least include the service directory e.g.,eventhubs_consumer
. As long as we don't add other crates that would have consumer client, this would suffice.I started https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/.5Bfeat.5D.20Preface.20integration.20tests.2C.20examples.20with.20crate.20name/near/484004070 to discuss proactive solutions, like prefacing all examples with a name e.g., the containing crate name, though I'm certainly open to other possibilities.
As noted in that thread, at the very least we could have some validation that makes sure examples, don't conflict with any others. We probably should for tests as well. While users don't typically refer to these by file name - just by test name therein - it's probably less of a problem, but I worry that either:
cargo
ends up rebuilding the binary each time depending on which crates' examples you build, which increases build time, orcargo
notices that the binary file time is > source file times and don't recompile, instead running the wrong binary!The text was updated successfully, but these errors were encountered: