-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
146 additions
and
78 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Contributing to Azure Rust SDK | ||
|
||
If you would like to become an active contributor to this project please | ||
follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](https://azure.github.io/azure-sdk/general_introduction.html). | ||
|
||
## Building and Testing | ||
|
||
This project uses the [mock_transport_framework](https://github.com/Azure/azure-sdk-for-rust/blob/main/docs/mock_transport.md) | ||
from the unofficial azure Rust SDKs. The main idea is to record interactions with external services (Kusto) locally, and replay | ||
the responses in CI/CD and for normal testing. This is particularly useful for end to end tests. | ||
|
||
To execute tests against recorded responses run: | ||
|
||
```bash | ||
cargo test --features=mock_transport_framework | ||
``` | ||
|
||
> Using `cargo test` will also work, but omit all tests requiring the mock_transport_framework | ||
To record new transactions, first place a `.env` file (omitted by `.gitignore`) in the repository root | ||
|
||
```toml | ||
AZURE_CLIENT_ID="..." | ||
AZURE_CLIENT_SECRET="..." | ||
AZURE_TENANT_ID="..." | ||
KUSTO_SERVICE_URL="..." | ||
KUSTO_DATABASE="..." | ||
``` | ||
|
||
> The provided service principal needs to be able to `create` and `drop` tables in the specified database | ||
Then execute tests in `RECORD` mode: | ||
|
||
```bash | ||
TESTING_MODE=RECORD cargo test --features=mock_transport_framework | ||
``` | ||
|
||
> While all credentials and identifiable urls are stripped from recordings, the used database name, the query | ||
> and responses are committed to source control. So make sure no sensitive data is contained therein. Care | ||
> should also be taken to reduce the information about DB internals returned from a query - especially | ||
> when using control commands. | ||
## Style | ||
|
||
We use `fmt` and `clippy` for formatting and linting: | ||
|
||
```bash | ||
cargo fmt | ||
cargo clippy | ||
``` | ||
|
||
## PRs | ||
|
||
We welcome contributions. In order to make the PR process efficient, please follow the below checklist: | ||
|
||
- **There is an issue open concerning the code added** - (either bug or enhancement). | ||
Preferably there is an agreed upon approach in the issue. | ||
- **PR comment explains the changes done** - (This should be a TL;DR; as the rest of it should be documented in the related issue). | ||
- **PR is concise** - try and avoid make drastic changes in a single PR. Split it into multiple changes if possible. If you feel a major change is needed, it is ok, but make sure commit history is clear and one of the maintainers can comfortably review both the code and the logic behind the change. | ||
- **Please provide any related information needed to understand the change** - docs, guidelines, use-case, best practices and so on. Opinions are accepted, but have to be backed up. | ||
- **Checks should pass** - these including linting with cargo fmt and clippy and running tests. | ||
|
||
## Code of Conduct | ||
|
||
This project's code of conduct can be found in the | ||
[CODE_OF_CONDUCT.md file](https://github.com/Azure/azure-sdk-for-rust/blob/master/CODE_OF_CONDUCT.md) | ||
(v1.4.0 of the http://contributor-covenant.org/ CoC). |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,31 @@ | ||
# Microsoft Azure Kusto (Azure Data Explorer) SDK for Rust | ||
# Microsoft Azure Kusto (Azure Data Explorer) SDK for Rust | ||
|
||
[![Rust Build, Test, and Lint](https://github.com/Azure/azure-kusto-rust/actions/workflows/build.yml/badge.svg)](https://github.com/Azure/azure-kusto-rust/actions/workflows/build.yml) | ||
[![codecov](https://codecov.io/gh/Azure/azure-kusto-rust/branch/main/graph/badge.svg?token=0MDnbSizwx)](https://codecov.io/gh/Azure/azure-kusto-rust) | ||
|
||
*This repo is still in the early stages of development, and doesn't yet have an official release - use with caution.* | ||
|
||
_This repo is still in the early stages of development, and doesn't yet have an official release - use with caution._ | ||
|
||
## Best Practices | ||
|
||
See the SDK [best practices guide](https://docs.microsoft.com/azure/data-explorer/kusto/api/netfx/kusto-ingest-best-practices), which though written for the .NET SDK, applies similarly here. | ||
|
||
## Need Support? | ||
|
||
- **Have a feature request for SDKs?** Please post it on [User Voice](https://feedback.azure.com/forums/915733-azure-data-explorer) to help us prioritize | ||
- **Have a technical question?** Ask on [Stack Overflow with tag "azure-data-explorer"](https://stackoverflow.com/questions/tagged/azure-data-explorer) | ||
- **Need Support?** Every customer with an active Azure subscription has access to [support](https://docs.microsoft.com/en-us/azure/azure-supportability/how-to-create-azure-support-request) with guaranteed response time. Consider submitting a ticket and get assistance from Microsoft support team | ||
- **Need Support?** Every customer with an active Azure subscription has access to [support](https://docs.microsoft.com/en-us/azure/azure-supportability/how-to-create-azure-support-request) with guaranteed response time. Consider submitting a ticket and get assistance from Microsoft support team | ||
- **Found a bug?** Please help us fix it by thoroughly documenting it and [filing an issue](https://github.com/Azure/azure-kusto-python/issues/new). | ||
|
||
## Looking for SDKs for other languages/platforms? | ||
|
||
- [Node](https://github.com/azure/azure-kusto-node) | ||
- [Java](https://github.com/azure/azure-kusto-java) | ||
- [.NET](https://docs.microsoft.com/en-us/azure/kusto/api/netfx/about-the-sdk) | ||
- [Go](https://github.com/Azure/azure-kusto-go) | ||
|
||
## Contributing | ||
|
||
This project welcomes contributions and suggestions. Most contributions require you to agree to a | ||
This project welcomes contributions and suggestions. Most contributions require you to agree to a | ||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us | ||
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. | ||
|
||
|
@@ -34,10 +37,12 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope | |
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or | ||
contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | ||
|
||
If you would like to become an active contributor to this project please follow the instructions provided in [Contributing.md](CONTRIBUTING.md). | ||
|
||
## Trademarks | ||
|
||
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft | ||
trademarks or logos is subject to and must follow | ||
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft | ||
trademarks or logos is subject to and must follow | ||
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). | ||
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. | ||
Any use of third-party trademarks or logos are subject to those third-party's policies. |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.