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

Add WithContext to the Client #175

Merged
merged 6 commits into from
Dec 18, 2024
Merged

Add WithContext to the Client #175

merged 6 commits into from
Dec 18, 2024

Conversation

falfaroc
Copy link
Collaborator

@falfaroc falfaroc commented Dec 18, 2024

Description

Add the ability to chain WithContext to Client api calls. This allows us to pass through the parent context that will be used to satisfy the timeouts of each http call.

Note: The context is not forced to be passed through on every call to limit the API changes throughout. It is up to the user to chain the context whenever it is needed.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1559

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 80% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Add unit tests with chaining the context and ensuring that we do not hit a context deadline in subsequent calls.
  • Adopted, where needed, the WithContext chaining in the PowerFlex driver where we were seeing a context deadline.

@falfaroc falfaroc merged commit 936b677 into main Dec 18, 2024
6 checks passed
@falfaroc falfaroc deleted the usr/falfaroc/add-with-context branch December 18, 2024 18:25
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