Skip to content

Add ProviderClient.DeepCopy, ServiceClient.DeepCopy - #3485

Draft
stephenfin wants to merge 1 commit into
gophercloud:mainfrom
shiftstack:client-deepcopy
Draft

stephenfin wants to merge 1 commit into
gophercloud:mainfrom
shiftstack:client-deepcopy

Conversation

@stephenfin

Copy link
Copy Markdown
Contributor

Signed-off-by: Stephen Finucane [email protected]

Fixes #1987

This is a first pass. I need to better understand what we should be copying and what we shouldn't.

@github-actions github-actions Bot added edit:gophercloud This PR updates common Gophercloud code semver:minor Backwards-compatible change backport-v2 This PR will be backported to v2 labels Aug 7, 2025
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 63.666% (-0.07%) from 63.738%
when pulling 33b8744 on shiftstack:client-deepcopy
into 2b8bb7a on gophercloud:main.

@stephenfin

Copy link
Copy Markdown
Contributor Author

CC @kayrus

@kayrus

kayrus commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

I have a gut feeling that this is not so easy. Especially with function pointers. I also assume that there should be mutexes.

@stephenfin

Copy link
Copy Markdown
Contributor Author

Yeah, I need to play around with it more. I am creating new mutexes as part of the copy, but I don't know about the function pointers. Let me mark this as draft while I investigate.

@stephenfin
stephenfin marked this pull request as draft August 10, 2025 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v2 This PR will be backported to v2 edit:gophercloud This PR updates common Gophercloud code semver:minor Backwards-compatible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Core: DeepCopy method for the provider client

3 participants