Skip to content

Promote APIQuotaAdjusterSettings (Gemini/MCP-driven) #4812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

yuwenma
Copy link
Collaborator

@yuwenma yuwenma commented Jul 17, 2025

(This is the pure Gemni-cli/MCP generated PR)

This is the first resource in candidates.json (with apiVersion=true). It means it has full API coverage, and it is ready for Beta without additional API, controller or test changes.

Notes:

  • The cloudquota service contains another alpha API that is not ready to promote, this introduces two api imports (v1alpha1 and v1beta1) to controller and mapper, thus the imports are distinguished specifically.
  • make read-pr requires beta resource to has google reference doc. we should split the process, and improve according to Our docs should be more GitHub compatible #4791

@yuwenma yuwenma force-pushed the APIQuotaAdjusterSettings branch 2 times, most recently from 28f523e to 69ec05e Compare July 17, 2025 15:34

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

refv1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/refs/v1beta1"
"github.com/GoogleCloudPlatform/k8s-config-connector/pkg/apis/k8s/v1alpha1"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we already have conditions for both alpha and beta, they are the same

@@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package v1alpha1
package v1beta1
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is awesome - a simple file move!

@@ -124,8 +124,8 @@ func (a *apiQuotaAdjusterSettingsAdapter) Find(ctx context.Context) (bool, error
// Create is not supported for QuotaAdjusterSettings. This resource is managed by GCP implicitly.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We might want to say something like "this function should not be reachable, because Find always returns an object"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, updated.

@@ -27,7 +27,7 @@ import (

gcp "cloud.google.com/go/cloudquotas/apiv1beta"
pb "cloud.google.com/go/cloudquotas/apiv1beta/cloudquotaspb"
krm "github.com/GoogleCloudPlatform/k8s-config-connector/apis/cloudquota/v1alpha1"
cloudquotav1beta1 "github.com/GoogleCloudPlatform/k8s-config-connector/apis/cloudquota/v1beta1"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: so the reason we call it krm and not cloudquotav1alpha1 is because that way when we change the import we don't have to change the code.

Do you want to add a note to GEMINI.md for next time? :-)

@@ -173,6 +173,10 @@ issues for {{product_name_short}}.
<td><a href="/cloud-build/docs/">{{builder_name}}</a></td>
<td><a href="/config-connector/docs/reference/resource-docs/cloudbuild/cloudbuildworkerpool.md">CloudBuildWorkerPool</a></td>
</tr>
<tr>
<td><a href="/quotas/docs/">Cloud Quotas</a></td>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we care about alphabetical order here?

I do wonder if we could generate this file in future...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll leave this to the next PR. The reference generator really needs a big change.

Copy link
Collaborator

@justinsb justinsb left a comment

Choose a reason for hiding this comment

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

LGTM

/hold for nits , but I think it's good to go

Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

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

@justinsb
Copy link
Collaborator

Nice work!

make read-pr requires beta resource to has google reference doc. we should split the process, and improve according to #4791

💯

Copy link
Contributor

New changes are detected. LGTM label has been removed.

@google-oss-prow google-oss-prow bot removed the lgtm label Jul 17, 2025
@yuwenma yuwenma force-pushed the APIQuotaAdjusterSettings branch from 1e6f655 to fddef71 Compare July 17, 2025 19:44
@yuwenma yuwenma force-pushed the APIQuotaAdjusterSettings branch from 10282e7 to edda00c Compare July 17, 2025 20:23
@yuwenma yuwenma force-pushed the APIQuotaAdjusterSettings branch from edda00c to dc08715 Compare July 17, 2025 22:21
@yuwenma
Copy link
Collaborator Author

yuwenma commented Jul 17, 2025

/hold cancel

resolved comments. It also contains the bug fix in the doc generator #4815

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants