Skip to content

parse_rfc3339 calling .groups() on None #2418

Open
@NilsJPWerner

Description

@NilsJPWerner

What happened (please include outputs or screenshots):

When the KubernetesPodOperator in airflow runs it outputs this log without breaking.
{kube_config.py:520} ERROR - 'NoneType' object has no attribute 'groups'

I have traced it back to the parse_rfc3339 function that is not guarding against search returning None.
https://github.com/kubernetes-client/python/blob/master/kubernetes/base/config/kube_config.py#L515-L520
https://github.com/kubernetes-client/python/blob/master/kubernetes/base/config/dateutil.py#L50-L77

What you expected to happen:
parse_rfc3339 should guard against this better and/or have a better error message that shows the string the regex is running on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions