test: allow deprecated OrganizationInput::domains in handwritten tests - #138
Merged
Merged
Conversation
The spec is about to mark the organization input's `domains` field as deprecated (workos/openapi-spec#103), which the Rust emitter renders as `#[deprecated]`. Struct literals must name every field, so the handwritten tests constructing OrganizationInput trip the deprecation lint, which clippy's -D warnings escalates to an error. Allowing the lint on the four affected test fns is inert until the deprecation lands, so this can merge ahead of the spec update.
Greptile SummaryAdds narrowly scoped deprecation-lint allowances to four handwritten tests that must construct
Confidence Score: 5/5The PR appears safe to merge because the changes only suppress an expected deprecation warning in the affected tests. The allowances are narrowly scoped to four test functions and do not alter runtime behavior, test inputs, or assertions. Important Files Changed
Reviews (1): Last reviewed commit: "test: allow deprecated OrganizationInput..." | Re-trigger Greptile |
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.
Why
workos/openapi-spec#103 marks the organization input's
domainsfielddeprecated: true, which the Rust emitter renders as#[deprecated]onOrganizationInput::domains. Rust struct literals must name every field, so the handwritten tests constructingOrganizationInput(domains: None) trip the deprecation lint at four sites, and clippy's-D warningsescalates that to a hard error — this is what's failing thesdk_build (rust)job on that spec PR.What
Adds
#[allow(deprecated)]to the four affected test fns:tests/request_options_and_errors_test.rs:idempotency_key_is_sent_as_headertests/retry_safety_test.rs:post_does_not_retry_without_idempotency_key,post_retries_with_idempotency_key,idempotent_strategy_overrides_explicit_keyVerification
cargo clippy --tests -- -D warningspasses on this branch as-is.#[deprecated]to the generateddomainsfield locally — clippy still passes with this change.Safe to merge ahead of the spec update:
allowof a lint with no violations is inert.