Skip to content

CA-391381: Avoid errors for Partial Callables in observer.py #5638

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

Merged

Conversation

snwoods
Copy link
Contributor

@snwoods snwoods commented May 20, 2024

This unblocks the Storage: BST to use distributed tracing as the sr_uuid parameter is sometimes not given.

198342 is a passing suiterun with this change, compared to 198361 which errors as it does not have the change.

You can also compare 3967690 which was the initial job that found the issue, which now passes when rerun: 4003491

@snwoods snwoods requested review from mg12 and MarkSymsCtx May 20, 2024 09:16
Copy link
Contributor

@lindig lindig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to help the workflow but see comments by Pau.

Copy link
Collaborator

@bernhardkaindl bernhardkaindl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a suggestion to commit using a shorter variant of isinstance:

elif isinstance(wrapped, (types.FunctionType, types.MethodType)):

and if using type is preferable, it can also be shortened to

elif type(wrapped) in [types.FunctionType, types.MethodType]:

and added that https://sourcery.ai also says that the final else: pass is superflous, and hence, since the pass does nothing, the else: pass should be removable.

@snwoods snwoods force-pushed the private/stevenwo/CA-391381 branch from 3931c74 to aeae76f Compare May 22, 2024 20:07
This unblocks the Storage: BST to use distributed tracing as the sr_uuid
parameter is sometimes not given.

Signed-off-by: Steven Woods <steven.woods@citrix.com>
@snwoods snwoods force-pushed the private/stevenwo/CA-391381 branch from aeae76f to 84c8f1c Compare May 23, 2024 10:07
@bernhardkaindl bernhardkaindl merged commit cc4a203 into xapi-project:master May 24, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants