Ignore clippy::style lint group#4341
Open
heaths wants to merge 1 commit intoAzure:mainfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates public Rust API surfaces in azure_identity and typespec_client_core to address APIView concerns, adds matching changelog entries, and relaxes the workspace-wide Clippy style lint group. It mainly replaces derived Debug implementations with manual ones and marks several public enums as #[non_exhaustive], with the downstream OpenTelemetry bridge adjusted to compile against those API changes.
Changes:
azure_identity: several public credential/option types now use manualDebugimplementations, andUserAssignedIdis now#[non_exhaustive].typespec_client_core/azure_core: tracing enumsAttributeArray,AttributeValue,SpanStatus, andSpanKindare now#[non_exhaustive], with changelog entries mirrored through re-exports.- Workspace lint config now allows the Clippy
stylegroup, andazure_core_opentelemetryadds fallback match arms for the newly non-exhaustive tracing enums.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
sdk/identity/azure_identity/src/workload_identity_credential.rs |
Replaced derived Debug with manual redacted formatting for workload identity types. |
sdk/identity/azure_identity/src/virtual_machine_managed_identity_credential.rs |
Replaced derived Debug with manual formatting for VM managed identity credential. |
sdk/identity/azure_identity/src/managed_identity_credential.rs |
Marked UserAssignedId non-exhaustive and replaced derived Debug on managed identity types. |
sdk/identity/azure_identity/src/imds_managed_identity_credential.rs |
Replaced derived Debug with manual formatting exposing only endpoint metadata. |
sdk/identity/azure_identity/src/developer_tools_credential.rs |
Replaced derived Debug with manual formatting for developer tools credential/options. |
sdk/identity/azure_identity/src/client_secret_credential.rs |
Replaced derived Debug with manual formatting for client secret credential and options. |
sdk/identity/azure_identity/src/client_certificate_credential.rs |
Replaced derived Debug with manual formatting for client certificate credential and options. |
sdk/identity/azure_identity/src/client_assertion_credential.rs |
Replaced derived Debug with manual formatting and simplified trait bound spelling. |
sdk/identity/azure_identity/src/azure_pipelines_credential.rs |
Replaced derived Debug with manual formatting for Azure Pipelines credential/options. |
sdk/identity/azure_identity/src/azure_developer_cli_credential.rs |
Replaced derived Debug with manual formatting for Azure Developer CLI credential/options. |
sdk/identity/azure_identity/src/azure_cli_credential.rs |
Replaced derived Debug with manual formatting for Azure CLI credential/options. |
sdk/identity/azure_identity/src/app_service_managed_identity_credential.rs |
Replaced derived Debug with manual formatting for App Service managed identity credential. |
sdk/identity/azure_identity/CHANGELOG.md |
Documented the breaking UserAssignedId non-exhaustive change. |
sdk/core/typespec_client_core/src/tracing/mod.rs |
Marked tracing status/kind enums non-exhaustive and simplified one type reference. |
sdk/core/typespec_client_core/src/tracing/attributes.rs |
Marked tracing attribute enums non-exhaustive. |
sdk/core/typespec_client_core/CHANGELOG.md |
Documented the tracing enum breaking changes. |
sdk/core/azure_core/CHANGELOG.md |
Mirrored the tracing enum breaking changes for the re-exported API surface. |
sdk/core/azure_core_opentelemetry/src/span.rs |
Added wildcard match arms so the OpenTelemetry span bridge compiles with non-exhaustive tracing enums. |
sdk/core/azure_core_opentelemetry/src/attributes.rs |
Added wildcard match arms so attribute conversion compiles with non-exhaustive tracing enums. |
Cargo.toml |
Allowed the workspace-wide Clippy style lint group. |
| azure_core::tracing::SpanKind::Client => opentelemetry::trace::SpanKind::Client, | ||
| azure_core::tracing::SpanKind::Producer => opentelemetry::trace::SpanKind::Producer, | ||
| azure_core::tracing::SpanKind::Consumer => opentelemetry::trace::SpanKind::Consumer, | ||
| _ => unimplemented!("unsupported value"), |
| let otel_status = match status { | ||
| SpanStatus::Unset => opentelemetry::trace::Status::Unset, | ||
| SpanStatus::Error { description } => opentelemetry::trace::Status::error(description), | ||
| _ => unimplemented!("unsupported value"), |
| AzureAttributeValue::Array(arr) => { | ||
| opentelemetry::Value::Array(opentelemetry::Array::from(AttributeArray(arr))) | ||
| } | ||
| _ => unimplemented!("unsupported value"), |
| values.into_iter().map(|s| s.into()).collect(); | ||
| string_values.into() | ||
| } | ||
| _ => unimplemented!("unsupported value"), |
| /// Note that OpenTelemetry defines an `Ok` status but that status is reserved for application and service developers, | ||
| /// so libraries should never set it. | ||
| #[derive(Debug, PartialEq)] | ||
| #[non_exhaustive] |
We've had a number of toolchain updates - especially nightly - that have blocked PRs from merging due to stylistic clippy lints, as well as some other lints that are worth considering. We should be more thoughtful about when and how we update long-term, but for now we can at least reduce the noise.
3252d84 to
fc5fb43
Compare
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.
We've had a number of toolchain updates - especially nightly - that have blocked PRs from merging
due to stylistic clippy lints, as well as some other lints that are worth considering.