Skip to content
This repository has been archived by the owner on Mar 13, 2022. It is now read-only.

dynamic client: restore discovery client exception handling #215

Merged

Conversation

roycaihw
Copy link
Member

@roycaihw roycaihw commented Oct 14, 2020

fixes the flake in kubernetes-client/python#1281.

With #187, the meta_request now raises NotFoundError instead of ResourceNotFoundError if discovery doc is not ready.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: roycaihw

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

The pull request process is described 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 added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 14, 2020
@codecov-io
Copy link

codecov-io commented Oct 14, 2020

Codecov Report

Merging #215 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #215   +/-   ##
=======================================
  Coverage   92.29%   92.29%           
=======================================
  Files          13       13           
  Lines        1635     1635           
=======================================
  Hits         1509     1509           
  Misses        126      126           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a5e529d...acdd058. Read the comment docs.

@roycaihw
Copy link
Member Author

@roycaihw
Copy link
Member Author

/cc @fabianvf

The test still fails. I cannot tell if this behavior change was intended. @fabianvf Do you remember?

-                    try:
-                        resourcePart.resources = self.get_resources_for_api_version(prefix,
-                            group, part, resourcePart.preferred)
-                    except NotFoundError:
-                        raise ResourceNotFoundError
+                    resourcePart.resources = self.get_resources_for_api_version(
+                        prefix, group, part, resourcePart.preferred)

@fabianvf
Copy link
Contributor

@roycaihw not sure why I would have dropped that exception, probably was an issue pulling the PR from the openshift repo

@yliaog
Copy link
Contributor

yliaog commented Oct 14, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 14, 2020
@k8s-ci-robot k8s-ci-robot merged commit 2da2b98 into kubernetes-client:master Oct 14, 2020
@roycaihw roycaihw deleted the fix/dynamic-e2e-exception branch October 14, 2020 22:55
@roycaihw roycaihw changed the title dynamic-e2e: fix the error expectation in the discovery retry logic dynamic client: restore discovery client exception handling Oct 14, 2020
@roycaihw
Copy link
Member Author

@fabianvf Got it, thanks. I restored the exception and now the test passes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged. 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.

None yet

5 participants