Skip to content
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

Allow skipping GCP availability zones validation. #150

Merged
merged 1 commit into from
Dec 21, 2023

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.

@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 New feature or request 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>
@wmudge wmudge merged commit 0bbdcef into cloudera-labs:devel Dec 21, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request validated
Development

Successfully merging this pull request may close these issues.

3 participants