AlejandroMorgante commented on code in PR #72577:
URL: https://github.com/apache/airflow/pull/72577#discussion_r4087146982
##########
providers/google/tests/system/google/cloud/kubernetes_engine/example_kubernetes_engine.py:
##########
@@ -49,11 +59,60 @@
CLUSTER_NAME_BASE = f"cluster-{DAG_ID}".replace("_", "-")
CLUSTER_NAME_FULL = CLUSTER_NAME_BASE + f"-{ENV_ID}".replace("_", "-")
CLUSTER_NAME = CLUSTER_NAME_BASE if len(CLUSTER_NAME_FULL) >= 33 else
CLUSTER_NAME_FULL
+EXEC_POD_NAME = "existing-pod"
+EXEC_CONTAINER_NAME = "main"
+EXPECTED_EXEC_OUTPUT = "command executed in existing GKE Pod"
# [START howto_operator_gcp_gke_create_cluster_definition]
CLUSTER = {"name": CLUSTER_NAME, "initial_node_count": 1, "autopilot":
{"enabled": True}}
# [END howto_operator_gcp_gke_create_cluster_definition]
+EXEC_POD = f"""
+apiVersion: v1
+kind: Pod
+metadata:
+ name: {EXEC_POD_NAME}
+ namespace: default
+spec:
+ restartPolicy: Never
+ containers:
+ - name: {EXEC_CONTAINER_NAME}
+ image: busybox:1.38.0
+ command: ["sleep", "3600"]
+"""
+
+
[email protected](poke_interval=10, timeout=300, mode="reschedule")
+def wait_for_running_exec_pod() -> bool:
Review Comment:
Good point, thanks! This follows the existing Kubernetes PodExec system
test, including the utils import. Since this is a style nit, I’d leave an API
cleanup for a separate PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]