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

[v1] Context-aware methods to ProviderClient and ServiceClient #2884

Merged
merged 1 commit into from Feb 2, 2024

Conversation

pierreprinetti
Copy link
Contributor

@pierreprinetti pierreprinetti commented Feb 1, 2024

Provide new methods to leverage per-call context.Context.

Backports #2883

This patch, suitable to be merged to v1, vendors the context package from the v1.21 standard library, to make AfterFunc available.

@github-actions github-actions bot added the semver:minor Backwards-compatible change label Feb 1, 2024
@github-actions github-actions bot added semver:minor Backwards-compatible change and removed semver:minor Backwards-compatible change labels Feb 1, 2024
@github-actions github-actions bot added semver:minor Backwards-compatible change and removed semver:minor Backwards-compatible change labels Feb 1, 2024
@coveralls
Copy link

coveralls commented Feb 1, 2024

Coverage Status

coverage: 77.844% (-0.04%) from 77.885%
when pulling ef06ea2 on shiftstack:context-v1
into 51831d9 on gophercloud:v1.

@github-actions github-actions bot added semver:minor Backwards-compatible change and removed semver:minor Backwards-compatible change labels Feb 1, 2024
@github-actions github-actions bot added semver:minor Backwards-compatible change and removed semver:minor Backwards-compatible change labels Feb 1, 2024
EmilienM
EmilienM previously approved these changes Feb 1, 2024
@github-actions github-actions bot added semver:minor Backwards-compatible change and removed semver:minor Backwards-compatible change labels Feb 1, 2024
@github-actions github-actions bot added semver:minor Backwards-compatible change and removed semver:minor Backwards-compatible change labels Feb 1, 2024
@pierreprinetti
Copy link
Contributor Author

One last change: Moved the context-merging function to an internal package, so that it doesn't add to Gophercloud's API.

@pierreprinetti pierreprinetti force-pushed the context-v1 branch 2 times, most recently from 0984d6a to 276dd63 Compare February 1, 2024 14:07
@github-actions github-actions bot added semver:minor Backwards-compatible change and removed semver:minor Backwards-compatible change labels Feb 1, 2024
@github-actions github-actions bot added semver:minor Backwards-compatible change and removed semver:minor Backwards-compatible change labels Feb 1, 2024
EmilienM
EmilienM previously approved these changes Feb 1, 2024
)

func TestMerge(t *testing.T) {
t.Run("returns values from both parents", func(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's just add a test for values that take precedence, as in #2883.

Provide new methods to leverage per-call `context.Context`.

This patch, suitable to be merged to `v1`, vendors the context package
from the v1.21 standard library, to make `AfterFunc` available.
@github-actions github-actions bot added semver:minor Backwards-compatible change and removed semver:minor Backwards-compatible change labels Feb 2, 2024
@pierreprinetti pierreprinetti merged commit 2d6994b into gophercloud:v1 Feb 2, 2024
20 checks passed
@pierreprinetti pierreprinetti deleted the context-v1 branch February 2, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor Backwards-compatible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants