Skip to content

Include idempotency token by default#678

Open
gustavodiaz7722 wants to merge 1 commit intoaws-controllers-k8s:mainfrom
gustavodiaz7722:opt-out-token
Open

Include idempotency token by default#678
gustavodiaz7722 wants to merge 1 commit intoaws-controllers-k8s:mainfrom
gustavodiaz7722:opt-out-token

Conversation

@gustavodiaz7722
Copy link
Contributor

Make ignore_idempotency_token opt-out instead of opt-in

Idempotency token fields (e.g. ClientToken) are SDK implementation details auto-filled by middleware. Previously, each controller had to explicitly set ignore_idempotency_token: true to exclude them from CRDs.

This PR flips the default: idempotency token fields are now excluded automatically. Controllers that need to keep them can set include_idempotency_token: true.

Changes

  • Renamed IgnoreIdempotencyToken to IncludeIdempotencyToken in ResourceConfig
  • Inverted filtering logic in model.go
  • Updated affected tests (EC2, MQ, EMRContainers, EMR Serverless)
  • Added opt-in validation test

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ack-prow ack-prow bot requested review from knottnt and michaelhtm March 16, 2026 21:37
@ack-prow
Copy link

ack-prow bot commented Mar 16, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gustavodiaz7722
Once this PR has been reviewed and has the lgtm label, please assign a-hilaly for approval by writing /assign @a-hilaly in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-prow
Copy link

ack-prow bot commented Mar 16, 2026

@gustavodiaz7722: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
s3-controller-test 10a20c7 link true /test s3-controller-test

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Comment on lines +124 to +125
// exposed in the CRD. Set this to true only if you need to expose
// idempotency token fields in the CRD.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p: It would be good to include an example of when this would be needed or clarify that this is intended to avoid breaking CRD changes in resources that already have it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants