Skip to content

resource: document overflow-safe arithmetic for device request Count#140456

Open
suii2210 wants to merge 1 commit into
kubernetes:masterfrom
suii2210:dra-count-overflow-docs
Open

resource: document overflow-safe arithmetic for device request Count#140456
suii2210 wants to merge 1 commit into
kubernetes:masterfrom
suii2210:dra-count-overflow-docs

Conversation

@suii2210

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind documentation

What this PR does / why we need it:

Updates the GoDoc for ExactDeviceRequest.Count and DeviceSubRequest.Count across the internal and versioned resource APIs to clarify that:

  • consumers should treat Count as untrusted input,
  • aggregation and multiplication of Count values should use overflow-safe arithmetic, and
  • consumers should not rely on unschedulability to protect accounting code.

This is a documentation-only change and does not modify validation or runtime behavior.

Which issue(s) this PR is related to:

Fixes #140424

Special notes for your reviewer:

The same documentation update has been applied consistently across the internal API and all maintained versioned resource API types.

Does this PR introduce a user-facing change?

NONE

Signed-off-by: suii2210 <work8758@gmail.com>
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

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-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. kind/documentation Categorizes issue or PR as related to documentation. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 11, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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-sigs/prow repository.

@kubernetes-prow kubernetes-prow Bot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 11, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Hi @suii2210. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: suii2210
Once this PR has been reviewed and has the lgtm label, please assign deads2k for approval. For more information see the 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

@kubernetes-prow kubernetes-prow Bot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API wg/device-management Categorizes an issue or PR as relevant to WG Device Management. labels Jul 11, 2026
@kubernetes-prow kubernetes-prow Bot removed the do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jul 11, 2026
@kubernetes-prow kubernetes-prow Bot requested review from bart0sh and klueska July 11, 2026 18:21
@k8s-triage-robot

Copy link
Copy Markdown

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/documentation Categorizes issue or PR as related to documentation. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. wg/device-management Categorizes an issue or PR as relevant to WG Device Management.

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

DRA: define an upper bound or overflow-safety contract for device request count

2 participants