Skip to content

Conversation

ulladz
Copy link
Contributor

@ulladz ulladz commented Mar 14, 2025

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

Replace diskTypes.aggregatedList request with diskTypes.list in FetchAvailableDiskTypes

Which issue(s) this PR fixes:

This PR fixes an issue where, during outages in some zones, information about other available zonesis not retrieved.

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 14, 2025
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 14, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @Uladzislau97. 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. 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 area/cluster-autoscaler area/provider/gce size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 14, 2025
@ulladz
Copy link
Contributor Author

ulladz commented Mar 17, 2025

/uncc @jayantjain93
/uncc @yaroslava-serdiuk

@ulladz
Copy link
Contributor Author

ulladz commented Mar 17, 2025

/cc @pmendelski

@k8s-ci-robot
Copy link
Contributor

@Uladzislau97: GitHub didn't allow me to request PR reviews from the following users: pmendelski.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @pmendelski

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.

@ulladz ulladz marked this pull request as ready for review March 17, 2025 09:09
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 17, 2025
@ulladz
Copy link
Contributor Author

ulladz commented Mar 17, 2025

/cc @pmendelski

@k8s-ci-robot
Copy link
Contributor

@Uladzislau97: GitHub didn't allow me to request PR reviews from the following users: pmendelski.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @pmendelski

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.

@ulladz
Copy link
Contributor Author

ulladz commented Mar 17, 2025

/uncc @jayantjain93

@k8s-ci-robot k8s-ci-robot removed the request for review from jayantjain93 March 17, 2025 09:13
@ulladz
Copy link
Contributor Author

ulladz commented Mar 17, 2025

/cc @krzysied

@k8s-ci-robot k8s-ci-robot requested a review from krzysied March 17, 2025 09:26
@k8s-triage-robot
Copy link

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.

@ulladz
Copy link
Contributor Author

ulladz commented Mar 20, 2025

/uncc @krzysied
/uncc @towca
/cc @BigDarkClown
/cc @x13n

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 24, 2025
// By using the provided region, the filter effectively selects all matching zones within that region.
// For example, if region is "us-central1", the filter will match all zones in that region (e.g., "us-central1-a", "us-central1-b").
filter := fmt.Sprintf("zone eq .+%s.*", region)
req := client.gceService.DiskTypes.AggregatedList(client.projectId).Filter(filter).ReturnPartialSuccess(true)
Copy link
Member

Choose a reason for hiding this comment

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

How do we distinguish partial failure with information from region missing from a full success?

Copy link
Contributor Author

@ulladz ulladz Mar 26, 2025

Choose a reason for hiding this comment

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

Based on documentation we cannot get not full list of diskTypes for particular zone. It says "when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code." So if we didn't get warning code for the zone it means we got full list of diskTypes.

Copy link
Member

Choose a reason for hiding this comment

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

But you're not checking per-zone errors anywhere, so if a zonal API does go down, CA will think there are no disks in that zone.

Copy link
Contributor Author

@ulladz ulladz Mar 27, 2025

Choose a reason for hiding this comment

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

Currently CA will just get a mapping without requested zone and will throw error "no available disk types found for zone".

But we can send additional error from API to the CA to make it more clear why diskTypes request failed.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, let's be clear about the error returned. If one is interested in disks from a given region, the function fetching them should return an error upon failure to get a complete response for that region.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated FetchAvailableDiskTypes to call diskTypes.list.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 1, 2025
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 3, 2025
@x13n
Copy link
Member

x13n commented Apr 8, 2025

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Uladzislau97, x13n

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 Apr 8, 2025
@k8s-ci-robot k8s-ci-robot merged commit 4bc861d into kubernetes:master Apr 8, 2025
6 of 7 checks passed
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. area/cluster-autoscaler area/provider/gce cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants