Skip to content
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

Re-raise redis.WatchErrors when they occur #2721

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

chrisguidry
Copy link
Contributor

Description

In #2668, we started to avoid having the redis.WatchError mark the span as
having failed, but we were inadvertently suppressing that exception from the
calling code. redis.WatchError is used for flow-of-control concurrency in
many applications, and applications depend on catching the error to handle
concurrent changes to keys during redis pipelines.

This re-raises the WatchError to keep the instrumentation transparent to the
application.

Fixes #2639

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Updated unit test

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

Copy link

linux-foundation-easycla bot commented Jul 17, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: chrisguidry / name: Chris Guidry (8bf9211)

@chrisguidry
Copy link
Contributor Author

@emdneto @xrmx @zhihali This is what I'm thinking for the follow-up to #2668, would love your feedback, thanks!

@chrisguidry
Copy link
Contributor Author

I also just signed the CLA

Copy link
Member

@emdneto emdneto left a comment

Choose a reason for hiding this comment

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

Thanks for working on this one. Could you please fix lint error and add changelog entry? You can find more guidance on the contributing guide here

Copy link
Contributor

@xrmx xrmx left a comment

Choose a reason for hiding this comment

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

With the s/reraisable/exception/ suggested by Emidio LGTM

@xrmx xrmx added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jul 18, 2024
In open-telemetry#2668, we started to avoid having the `redis.WatchError` mark the span as
having failed, but we were inadvertently suppressing that exception from the
calling code.  `redis.WatchError` is used for flow-of-control concurrency in
many applications, and applications depend on catching the error to handle
concurrent changes to keys during redis pipelines.

This re-raises the `WatchError` to keep the instrumentation transparent to the
application.

Fixes open-telemetry#2639
@chrisguidry
Copy link
Contributor Author

Thanks, folks!

Copy link
Contributor

@zhihali zhihali left a comment

Choose a reason for hiding this comment

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

The logic is make sense to me, nice catch!

@lzchen lzchen merged commit 0507300 into open-telemetry:main Jul 18, 2024
377 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

redis.exception.WatchError is not really an error
5 participants