Skip to content

Commit

Permalink
Fix tests on development branch (#263)
Browse files Browse the repository at this point in the history
* apply pathways fixes

Signed-off-by: Piotr Pawłowski <ppawl@google.com>

---------

Signed-off-by: Piotr Pawłowski <ppawl@google.com>
  • Loading branch information
pawloch00 committed Jan 10, 2025
1 parent ea2bbab commit 10816ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ env:
ZONE: us-central2-a
REGION: us-central2
STORAGE_NAME: test-storage
CLUSTER_ARGUMENTS: "--network=${{secrets.NETWORK_NAME}} --maintenance-window=23:50"

jobs:
run-unit-tests:
Expand Down Expand Up @@ -150,7 +151,7 @@ jobs:
run: |
python3 xpk.py cluster create-pathways --cluster $TPU_CLUSTER_NAME --tpu-type=v4-8 --num-slices=2 \
--zone=us-central2-b --default-pool-cpu-machine-type=n1-standard-16 --default-pool-cpu-num-nodes=16 \
--reservation='${{ secrets.GCP_TPU_V4_RESERVATION }}' --enable-workload-identity --enable-gcsfuse-csi-driver
--reservation='${{ secrets.GCP_TPU_V4_RESERVATION }}' --enable-workload-identity --enable-gcsfuse-csi-driver --custom-cluster-arguments="${CLUSTER_ARGUMENTS}"\
- name: Authenticate Docker
run: gcloud auth configure-docker --quiet
- name: Create auto-mount Storage instance
Expand Down
7 changes: 0 additions & 7 deletions src/xpk/commands/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
set_jobset_on_cluster,
set_up_cluster_network_for_gpu,
setup_k8s_env,
update_cluster_with_clouddns_if_necessary,
update_cluster_with_gcsfuse_driver_if_necessary,
update_cluster_with_workload_identity_if_necessary,
zone_to_region,
Expand Down Expand Up @@ -132,12 +131,6 @@ def cluster_create(args) -> None:
xpk_exit(update_cluster_command_code)

# Update Pathways clusters with CloudDNS if not enabled already.
if args.enable_pathways:
update_cluster_command_code = update_cluster_with_clouddns_if_necessary(
args
)
if update_cluster_command_code != 0:
xpk_exit(update_cluster_command_code)

get_cluster_credentials(args)

Expand Down
9 changes: 3 additions & 6 deletions src/xpk/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1150,17 +1150,14 @@ def is_cluster_using_clouddns(args) -> bool:
command = (
f'gcloud container clusters describe {args.cluster}'
f' --project={args.project} --region={zone_to_region(args.zone)}'
' 2> /dev/null | grep "clusterDns: CLOUD_DNS" | wc -l'
' 2> /dev/null | grep "clusterDns: CLOUD_DNS"'
)
return_code, cloud_dns_matches = run_command_for_value(
return_code, _ = run_command_for_value(
command,
'Check if Cloud DNS is enabled in cluster describe.',
args,
)
if return_code != 0:
xpk_exit(return_code)
cloud_dns_matches = int(cloud_dns_matches)
if cloud_dns_matches > 0:
if return_code == 0:
xpk_print('Cloud DNS is enabled on the cluster, no update needed.')
return True
return False
Expand Down

0 comments on commit 10816ca

Please sign in to comment.