Skip to content

test: allow deprecated OrganizationInput::domains in handwritten tests - #138

Merged
gjtorikian merged 1 commit into
mainfrom
fix/allow-deprecated-domains-in-tests
Aug 11, 2026
Merged

test: allow deprecated OrganizationInput::domains in handwritten tests#138
gjtorikian merged 1 commit into
mainfrom
fix/allow-deprecated-domains-in-tests

Conversation

@gjtorikian

Copy link
Copy Markdown
Contributor

Why

workos/openapi-spec#103 marks the organization input's domains field deprecated: true, which the Rust emitter renders as #[deprecated] on OrganizationInput::domains. Rust struct literals must name every field, so the handwritten tests constructing OrganizationInput (domains: None) trip the deprecation lint at four sites, and clippy's -D warnings escalates that to a hard error — this is what's failing the sdk_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_header
  • tests/retry_safety_test.rs: post_does_not_retry_without_idempotency_key, post_retries_with_idempotency_key, idempotent_strategy_overrides_explicit_key

Verification

  • cargo clippy --tests -- -D warnings passes on this branch as-is.
  • Simulated the incoming deprecation by adding #[deprecated] to the generated domains field locally — clippy still passes with this change.

Safe to merge ahead of the spec update: allow of a lint with no violations is inert.

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-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

Adds narrowly scoped deprecation-lint allowances to four handwritten tests that must construct OrganizationInput with its deprecated domains field.

  • Allows the deprecation lint in the request-options header test.
  • Allows the lint in three retry-safety tests.
  • Does not change production behavior or test semantics.

Confidence Score: 5/5

The 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

Filename Overview
tests/request_options_and_errors_test.rs Adds a function-scoped deprecation allowance to keep the idempotency-header test compatible with the upcoming generated field annotation.
tests/retry_safety_test.rs Adds function-scoped deprecation allowances to the three retry tests that construct the affected organization input.

Reviews (1): Last reviewed commit: "test: allow deprecated OrganizationInput..." | Re-trigger Greptile

@gjtorikian
gjtorikian merged commit 0e44b73 into main Aug 11, 2026
6 checks passed
@gjtorikian
gjtorikian deleted the fix/allow-deprecated-domains-in-tests branch August 11, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant