Skip to content

Conversation

@Rishit-dagli
Copy link
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

As discussed in #1826 the following error appears when when using list_event_for_all_namespaces:

from kubernetes import config, client

config.load_kube_config()
api = client.EventsV1beta1Api()
print(api.list_event_for_all_namespaces())

The error:

...
ValueError: Invalid value for `event_time`, must not be `None`

This could easily be validated by targeting a minikube cluster using minikube start, which is also on what I tested the changes this PR makes. The API supports using None for the event_time. This PR removes the check to do so. I tested this out locally for minikube clusters and the tests pass as well.

Which issue(s) this PR fixes:

Fixes #1826

Does this PR introduce a user-facing change?

None

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 14, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Rishit-dagli
To complete the pull request process, please assign roycaihw after the PR has been reviewed.
You can assign the PR to them by writing /assign @roycaihw in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from roycaihw and yliaog June 14, 2022 06:46
@Rishit-dagli
Copy link
Contributor Author

On reading, I believe this change would be better suited to the OpenAPI specification since this is anyways being generated.

@roycaihw @yliaog Could you shed some light on contributing to the specification?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ValueError when using list_event_for_all_namespaces

2 participants