Skip to content

Conversation

@chusopr
Copy link
Contributor

@chusopr chusopr commented Sep 19, 2023

This PR adds a new property infra.gcp.check_availability_zones which would allow skipping the tasks that list GCP availability zones and check if the one we are trying to deploy to exists there.
This is being introduced because listing availability zones may be blocked by organization policies making this task fail.

Also, the original code was listing availability zones unconditionally but was checking if the chosen availability zone is present in that list only if an availability zone was provided (plat__gcp_availability_zones | length > 0). This PR also moves that condition to apply it to the the whole block and not only the last task so listing availability zones is also skipped when no availability zones were chosen.

This was tested by trying to deploy a cluster to an invalid availability zone with infra.gcp.check_availability_zones unset to confirm that it still fails while validating availability zones as before and also trying to deploy a cluster to an invalid availability zone with infra.gcp.check_availability_zones set to true which fails when it tries to deploy the environment to GCP as expected.

@github-actions github-actions bot added the validated The pull request has passed the prechecks label Sep 19, 2023
@wmudge wmudge added this to the Release 2.1.0 milestone Oct 5, 2023
@wmudge wmudge requested a review from a team November 2, 2023 18:41
@wmudge wmudge added the enhancement MINOR - New feature or enhancement in the CHANGELOG label Nov 2, 2023
@wmudge wmudge modified the milestones: Release 2.1.0, Release 2.2.0 Nov 2, 2023
@wmudge wmudge modified the milestones: Release 2.2.0, Release 2.3.0 Nov 20, 2023
@jimright jimright self-assigned this Dec 20, 2023
Copy link
Contributor

@jimright jimright left a comment

Choose a reason for hiding this comment

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

Looks good. Approved.

Signed-off-by: Jesus Perez Rey <jprey@bluemetrix.com>
@chusopr chusopr force-pushed the gcp-optional-zones-check branch from a1fe27e to 2634060 Compare December 21, 2023 15:35
@github-actions github-actions bot added validated The pull request has passed the prechecks and removed validated The pull request has passed the prechecks labels Dec 21, 2023
@wmudge wmudge merged commit 0bbdcef into cloudera-labs:devel Dec 21, 2023
wmudge pushed a commit to wmudge/cloudera.exe that referenced this pull request Aug 12, 2025
Signed-off-by: Jim Enright <jenright@cloudera.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement MINOR - New feature or enhancement in the CHANGELOG validated The pull request has passed the prechecks

Development

Successfully merging this pull request may close these issues.

3 participants