Skip to content

[confighttp] Use configoptional.Optional for optional fields #13109

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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

mx-psi
Copy link
Member

@mx-psi mx-psi commented May 28, 2025

Description

Makes the following changes to confighttp:

  1. Uses configoptional.Optional in confighttp for all optional sections

This means a bunch of breaking changes. I think it is unfeasible to do this in two steps and I hereby promise that I will fix contrib tests and help anybody affected by this

Link to tracking issue

Fixes #9478

Copy link

codecov bot commented May 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.54%. Comparing base (e7b140f) to head (d2678d8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13109   +/-   ##
=======================================
  Coverage   91.54%   91.54%           
=======================================
  Files         522      522           
  Lines       28955    28955           
=======================================
  Hits        26508    26508           
  Misses       1931     1931           
  Partials      516      516           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mx-psi mx-psi marked this pull request as ready for review May 28, 2025 16:37
@mx-psi mx-psi requested a review from a team as a code owner May 28, 2025 16:37
@mx-psi
Copy link
Member Author

mx-psi commented May 29, 2025

I split off a couple of changes into separate PRs since those are clearer to me:

@mx-psi
Copy link
Member Author

mx-psi commented May 29, 2025

Also, since I guess it is clear that configoptional.Optional is a good fit for the OTLP receiver I will start with that one.

github-merge-queue bot pushed a commit that referenced this pull request Jun 10, 2025
…)(nil) (#13168)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Makes it so that unmarshaling into a `None[T]` is equivalent to
unmarshaling into a `(*T)(nil)`.
The goal is to be able to do #13109 without introducing any changes to
the behavior.

Needs #13161.

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Add a unit test to compare the behavior of unmarshaling into `(*T)(nil)`
with that of unmarshaling into `None[T]`

<!--Describe the documentation added.-->
#### Documentation

Amend docstrings

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: Evan Bradley <[email protected]>
@mx-psi mx-psi marked this pull request as ready for review June 18, 2025 07:44
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.

[confighttp] Review usage of 'pointer to type'
3 participants