Skip to content

Conversation

@arkadeepsen
Copy link
Contributor

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
This PR updates the godoc of CapacityReservationGroupID of AzureMachineSpec. The updated godoc contains the explanation of what the requirements are for the CapacityReservationGroupID.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #4829

Special notes for your reviewer:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels May 10, 2024
@k8s-ci-robot k8s-ci-robot requested review from Jont828 and marosset May 10, 2024 12:12
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 10, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @arkadeepsen. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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. Regular contributors should join the org to skip this step.

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.

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 10, 2024
@mboersma
Copy link
Contributor

mboersma commented May 10, 2024

Thanks @arkadeepsen!

The azuremachine_types.go file is used in generating the CRDs. So you need to run make generate and commit those changes or this will fail the make verify-gen check.

@arkadeepsen arkadeepsen force-pushed the capacity-reservation branch from f882282 to de135dc Compare May 10, 2024 16:55
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 10, 2024
@mboersma
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 10, 2024
@arkadeepsen
Copy link
Contributor Author

Thanks @arkadeepsen!

The azuremachine_types.go file is used in generating the CRDs. So you need to run make generate and commit those changes or this will fail the make verify-gen check.

@mboersma my bad. Thanks for pointing that out. I have run make generate and pushed the changes.

@codecov
Copy link

codecov bot commented May 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.02%. Comparing base (43e72a9) to head (de135dc).
Report is 20 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4830      +/-   ##
==========================================
+ Coverage   62.01%   62.02%   +0.01%     
==========================================
  Files         201      201              
  Lines       16858    16858              
==========================================
+ Hits        10455    10457       +2     
+ Misses       5620     5618       -2     
  Partials      783      783              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@willie-yao willie-yao left a comment

Choose a reason for hiding this comment

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

I see the validation is already being done in ValidateCapacityReservationGroupID. I think the clarity helps but other fields that have similar requirements do not include this information in the godoc. @jackfrancis @mboersma what's your take on this? Was just wondering for the sake of consistency, otherwise lgtm.

@arkadeepsen
Copy link
Contributor Author

I see the validation is already being done in ValidateCapacityReservationGroupID. I think the clarity helps but other fields that have similar requirements do not include this information in the godoc. @jackfrancis @mboersma what's your take on this? Was just wondering for the sake of consistency, otherwise lgtm.

Providing a context as to why the change in the godoc is introduced. In OpenShift specific APIs, we try to provide information in the godoc which will be beneficial for the user to create/update a CR. Though, as pointed out, the information is provided when the validation fails, it's good to have the information available beforehand.
P.S. I made the change to the godoc specific to CapacityReservationGroupID as I had worked on the PR which adds the field.

@mboersma
Copy link
Contributor

@willie-yao it's a good point–we could argue it should be documented similarly for many other fields. I just assumed this change in particular would be (would have been) helpful for the requestor and perhaps others, and wasn't bothered by the inconsistency. But we should hear from other maintainers.

Copy link
Contributor

@willie-yao willie-yao left a comment

Choose a reason for hiding this comment

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

In OpenShift specific APIs, we try to provide information in the godoc which will be beneficial for the user to create/update a CR

Sounds good, it definitely doesn't hurt. I'll wait for another opinion from the team before lgtm but I'm good with this change!

Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

/lgtm

Plus 1 for additional context to help users coming up with the correct input

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 14, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: f1440a9f88f5752096ad2940d2f4763c8c17d6ac

@mboersma
Copy link
Contributor

/assign @willie-yao for approval

@k8s-ci-robot
Copy link
Contributor

@mboersma: GitHub didn't allow me to assign the following users: for, approval.

Note that only kubernetes-sigs members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @willie-yao for approval

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.

Copy link
Contributor

@willie-yao willie-yao left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: willie-yao

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 14, 2024
@k8s-ci-robot k8s-ci-robot merged commit d475986 into kubernetes-sigs:main May 14, 2024
@k8s-ci-robot k8s-ci-robot added this to the v1.15 milestone May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

In the godoc of CapacityReservationGroupID of AzureMachineSpec include an explanation of what are the requirements for the ID

5 participants