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

HeaderProvider reference is lost during ServiceOptions.toBuilder #2821

Open
burkedavison opened this issue May 24, 2024 · 2 comments
Open

HeaderProvider reference is lost during ServiceOptions.toBuilder #2821

burkedavison opened this issue May 24, 2024 · 2 comments
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@burkedavison
Copy link
Member

serviceOptions.toBuilder().build() should not cause field values to be unset.

@burkedavison burkedavison added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels May 24, 2024
@blakeli0
Copy link
Collaborator

Thanks Burke! How did you notice this issue?

@burkedavison
Copy link
Member Author

Working through specific requirements for GoogleCloudPlatform/spring-cloud-gcp#2906 by creating a test for it. I found I couldn't modify LoggingOptions via toBuilder without erasing its header provider.
https://github.com/GoogleCloudPlatform/spring-cloud-gcp/blob/d8d7168e57683adf76b1e56b1a3e7d87fb7d8bdf/spring-cloud-gcp-logging/src/main/java/com/google/cloud/spring/logging/LoggingAppender.java#L43

@blakeli0 blakeli0 added priority: p3 Desirable enhancement or fix. May not be included in next release. and removed priority: p2 Moderately-important priority. Fix may not be included in next release. labels Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p3 Desirable enhancement or fix. May not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants