Skip to content

Commit 20ad342

Browse files
authored
Merge branch 'main' into iennae-patch-2
2 parents d8bb57f + 4425271 commit 20ad342

9 files changed

Lines changed: 12 additions & 38 deletions

File tree

bigquery-datatransfer/snippets/manage_transfer_configs.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,6 @@
1313
# limitations under the License.
1414

1515

16-
def list_configs(override_values={}):
17-
# [START bigquerydatatransfer_list_configs]
18-
from google.cloud import bigquery_datatransfer
19-
20-
transfer_client = bigquery_datatransfer.DataTransferServiceClient()
21-
22-
project_id = "my-project"
23-
# [END bigquerydatatransfer_list_configs]
24-
# To facilitate testing, we replace values with alternatives
25-
# provided by the testing harness.
26-
project_id = override_values.get("project_id", project_id)
27-
# [START bigquerydatatransfer_list_configs]
28-
parent = transfer_client.common_project_path(project_id)
29-
30-
configs = transfer_client.list_transfer_configs(parent=parent)
31-
print("Got the following configs:")
32-
for config in configs:
33-
print(f"\tID: {config.name}, Schedule: {config.schedule}")
34-
# [END bigquerydatatransfer_list_configs]
35-
36-
3716
def update_config(override_values={}):
3817
# [START bigquerydatatransfer_update_config]
3918
from google.cloud import bigquery_datatransfer

bigquery-datatransfer/snippets/manage_transfer_configs_test.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@
1515
from . import manage_transfer_configs
1616

1717

18-
def test_list_configs(capsys, project_id, transfer_config_name):
19-
manage_transfer_configs.list_configs({"project_id": project_id})
20-
out, _ = capsys.readouterr()
21-
assert "Got the following configs:" in out
22-
assert transfer_config_name in out
23-
24-
2518
def test_update_config(capsys, transfer_config_name):
2619
manage_transfer_configs.update_config(
2720
{

composer/airflow_1_samples/gke_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
# project-id as the gcr.io images and the service account that Composer
9393
# uses has permission to access the Google Container Registry
9494
# (the default service account has permission)
95-
image="gcr.io/gcp-runtimes/ubuntu_18_0_4",
95+
image="marketplace.gcr.io/google/ubuntu2204",
9696
)
9797
# [END composer_gkeoperator_minconfig_airflow_1]
9898

composer/airflow_1_samples/kubernetes_pod_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
# project-id as the gcr.io images and the service account that Composer
9494
# uses has permission to access the Google Container Registry
9595
# (the default service account has permission)
96-
image="gcr.io/gcp-runtimes/ubuntu_18_0_4",
96+
image="marketplace.gcr.io/google/ubuntu2204",
9797
)
9898
# [END composer_kubernetespodoperator_minconfig_airflow_1]
9999
# [START composer_kubernetespodoperator_templateconfig_airflow_1]

composer/airflow_1_samples/noxfile_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# You can opt out from the test for specific Python versions.
3333
# Skipping for Python 3.9 due to numpy compilation failure.
3434
# Skipping 3.6 and 3.7, they are more out of date
35-
"ignored_versions": ["2.7", "3.6", "3.7", "3.9", "3.10", "3.11", "3.12", "3.13"],
35+
"ignored_versions": ["2.7", "3.6", "3.7", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"],
3636
# Old samples are opted out of enforcing Python type hints
3737
# All new samples should feature them
3838
"enforce_type_hints": False,

composer/workflows/gke_operator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
with models.DAG(
3131
"example_gcp_gke",
32-
schedule_interval=None, # Override to match your needs
32+
schedule=None, # Override to match your needs
3333
start_date=days_ago(1),
3434
tags=["example"],
3535
) as dag:
@@ -86,7 +86,7 @@
8686
# project-id as the gcr.io images and the service account that Composer
8787
# uses has permission to access the Google Container Registry
8888
# (the default service account has permission)
89-
image="gcr.io/gcp-runtimes/ubuntu_18_0_4",
89+
image="marketplace.gcr.io/google/ubuntu2204",
9090
)
9191
# [END composer_gkeoperator_minconfig]
9292

composer/workflows/kubernetes_pod_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
# project-id as the gcr.io images and the service account that Composer
9797
# uses has permission to access the Google Container Registry
9898
# (the default service account has permission)
99-
image="gcr.io/gcp-runtimes/ubuntu_18_0_4",
99+
image="marketplace.gcr.io/google/ubuntu2204",
100100
)
101101
# [END composer_kubernetespodoperator_minconfig]
102102
# [START composer_kubernetespodoperator_templateconfig]

composer/workflows/kubernetes_pod_operator_c2.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
import datetime
1818

1919
from airflow import models
20-
from airflow.kubernetes.secret import Secret
20+
2121
from airflow.providers.cncf.kubernetes.operators.pod import (
2222
KubernetesPodOperator,
2323
)
24+
from airflow.providers.cncf.kubernetes.secret import Secret
2425
from kubernetes.client import models as k8s_models
2526

2627
# A Secret is an object that contains a small amount of sensitive data such as
@@ -60,7 +61,7 @@
6061
# required to debug.
6162
with models.DAG(
6263
dag_id="composer_sample_kubernetes_pod",
63-
schedule_interval=datetime.timedelta(days=1),
64+
schedule=datetime.timedelta(days=1),
6465
start_date=YESTERDAY,
6566
) as dag:
6667
# Only name, image, and task_id are required to create a
@@ -88,7 +89,7 @@
8889
# project-id as the gcr.io images and the service account that Composer
8990
# uses has permission to access the Google Container Registry
9091
# (the default service account has permission)
91-
image="gcr.io/gcp-runtimes/ubuntu_20_0_4",
92+
image="marketplace.gcr.io/google/ubuntu2204",
9293
# Specifies path to kubernetes config. The config_file is templated.
9394
config_file="/home/airflow/composer_kube_config",
9495
# Identifier of connection that should be used
@@ -130,7 +131,7 @@
130131
task_id="ex-kube-secrets",
131132
name="ex-kube-secrets",
132133
namespace="composer-user-workloads",
133-
image="gcr.io/gcp-runtimes/ubuntu_20_0_4",
134+
image="marketplace.gcr.io/google/ubuntu2204",
134135
startup_timeout_seconds=300,
135136
# The secrets to pass to Pod, the Pod will fail to create if the
136137
# secrets you specify in a Secret object do not exist in Kubernetes.

composer/workflows/noxfile_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"3.10",
4040
"3.12",
4141
"3.13",
42+
"3.14",
4243
],
4344
# Old samples are opted out of enforcing Python type hints
4445
# All new samples should feature them

0 commit comments

Comments
 (0)