-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
[AIRFLOW-6585] Fixed Timestamp bug in RefreshKubeConfigLoader #7153
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! Here are some useful points:
Apache Airflow is a community-driven project and together we are making it better 🚀. In case of doubts contact the developers at: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd still prefer to have a test for that one. This should b e rather easy to add such test.
There is already the tests/kubernetes/test_client.py with two tests and adding a test there would be just great (we need to improve coverage on Kubernetes part and even really small tests like that gradually added help a lot)
Would you be so nice to add it please?
Codecov Report
@@ Coverage Diff @@
## master #7153 +/- ##
========================================
Coverage ? 85.4%
========================================
Files ? 710
Lines ? 39484
Branches ? 0
========================================
Hits ? 33723
Misses ? 5761
Partials ? 0
Continue to review full report at Codecov.
|
Hi, thanks for your quick feedback. Added the test and amended the PR. |
Everything solved and build passes now. Best regards |
Change looks good now, but as this JIRA was already released we need a new JIRA please. (We use the Fix Version to know what to pull back to our releases, and as AIRFLOW-5117 is already released we would otherwise miss this change when building 1.10.8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please create new Jira ticket for this.
@ashb New JIRA created and linked to this PR. |
Why are these changes being made in this project and not in the Kubernetes library? I can't find the ticket in the library repository. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@@ -32,6 +32,15 @@ | |||
from kubernetes.config.kube_config import KUBE_CONFIG_DEFAULT_LOCATION, KubeConfigLoader | |||
|
|||
|
|||
def _parse_timestamp(ts_str: str) -> int: | |||
if ts_str[-1] == 'Z': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using pendulum (which we already use) might be a better fix than this.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still an issue with EKS and Airflow v1.10.10. This PR fixes it. Can we reopen this PR? |
@benjaminsky -> sure, would you mind picking this up? I think this one neds rebase and there is a change requested. Unnless (@Bruschkov wants to do it). |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi, this is still an issue on Airflow v1.10.12. Can we reopen the PR? |
JIRA
https://issues.apache.org/jira/browse/AIRFLOW-6585
Description
When using the KubernetesPodOperator on an aws kubernetes cluster, the aws-iam-authenticator is used to obtain kubernetes authentication tokens. The aws tokens contain ISO-8601 formatted timestamps, which couldn't be parsed in case of a "Z" (Zulu Time) timezone. This PR fixes this problem by converting the "Z" timezone into a regular "+0000" format.
Upon further review this is only a problem with python version <= 3.6. But that should not keep the issue from being fixed.