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

Rename examples, integration tests with vague names #1933

Open
heaths opened this issue Nov 22, 2024 · 0 comments
Open

Rename examples, integration tests with vague names #1933

heaths opened this issue Nov 22, 2024 · 0 comments
Assignees
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.

Comments

@heaths
Copy link
Member

heaths commented Nov 22, 2024

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 like consumer, producer, and round_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:

  1. cargo ends up rebuilding the binary each time depending on which crates' examples you build, which increases build time, or
  2. Worse, cargo notices that the binary file time is > source file times and don't recompile, instead running the wrong binary!
@heaths heaths added 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. labels Nov 22, 2024
@heaths heaths self-assigned this Nov 22, 2024
@github-project-automation github-project-automation bot moved this to Untriaged in Azure SDK Rust Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
Status: Untriaged
Development

No branches or pull requests

1 participant