Skip to content

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

Merged
pierreprinetti merged 1 commit intogophercloud:v1from
shiftstack:context-v1
Feb 2, 2024
Merged

[v1] Context-aware methods to ProviderClient and ServiceClient#2884
pierreprinetti merged 1 commit intogophercloud:v1from
shiftstack:context-v1

Conversation

@pierreprinetti
Copy link
Copy Markdown
Member

@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
Copy Markdown

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
Copy Markdown
Member 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
Copy Markdown
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
@pierreprinetti pierreprinetti deleted the context-v1 branch February 2, 2024 14:00
@pierreprinetti pierreprinetti added the v1 This PR targets v1 label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:minor Backwards-compatible change v1 This PR targets v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants