You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/04/20 16:59:10 UTC
[GitHub] [airflow] mik-laj commented on issue #8009: Airflow kubernetes cli command for generating pod templates
mik-laj commented on issue #8009:
URL: https://github.com/apache/airflow/pull/8009#issuecomment-616683762
@Javier162380 There seems to be a serialization error not related to this patch. I have prepared a small change that bypasses this problem.
```
curl https://termbin.com/9q5d | git am
```
```diff
From a9c150fe70b57e013d4bb106638caaf92a2e214b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kamil=20Bregu=C5=82a?= <ka...@polidea.com>
Date: Mon, 20 Apr 2020 18:55:28 +0200
Subject: Fix serialization
---
airflow/example_dags/example_kubernetes_pod_operator.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/airflow/example_dags/example_kubernetes_pod_operator.py b/airflow/example_dags/example_kubernetes_pod_operator.py
index f3b18cc13..74a7c4cab 100644
--- a/airflow/example_dags/example_kubernetes_pod_operator.py
+++ b/airflow/example_dags/example_kubernetes_pod_operator.py
@@ -20,8 +20,9 @@ import datetime
from airflow import models
from airflow.kubernetes import secret
from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator
+from airflow.utils.dates import days_ago
-YESTERDAY = datetime.datetime.now() - datetime.timedelta(days=1)
+YESTERDAY = days_ago(1)
secret_env = [secret.Secret(
deploy_type='env',
deploy_target='SQL_CONN',
--
2.20.1
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org