Skip to content

Conversation

iblancasa
Copy link
Contributor

Follow up for #42256.

Copy link
Contributor

github-actions bot commented Oct 6, 2025

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 6, 2025
@iblancasa iblancasa force-pushed the 42256 branch 7 times, most recently from d33d815 to 677e024 Compare October 6, 2025 14:34
@github-actions github-actions bot removed the Stale label Oct 7, 2025
Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

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

Sorry for the long delay with a review. The overall approach here looks okay to me.

@atoulme atoulme marked this pull request as draft October 8, 2025 06:24
@iblancasa iblancasa force-pushed the 42256 branch 4 times, most recently from 4f59c0b to 434411a Compare October 8, 2025 16:58
Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

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

Thanks again @iblancasa. Looking a bit more closely, I think we have some opportunities to simplify how we do this a little. Let me know what you think.

@iblancasa iblancasa force-pushed the 42256 branch 2 times, most recently from 9def875 to a4527ee Compare October 9, 2025 09:53
@iblancasa iblancasa marked this pull request as ready for review October 9, 2025 11:00

// Unmarshal a confmap.Conf into the config struct.
func (c *Config) Unmarshal(conf *confmap.Conf) error {
// Initialize with default values to enable unmarshaling into nested structs
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason we can't do this with the NewDefaultConfig function below?

Comment on lines +44 to +52

// HTTP contains the configuration for the v2 HTTP healthcheck server.
HTTP *healthcheck.HTTPConfig `mapstructure:"http"`

// GRPC contains the configuration for the v2 gRPC healthcheck server.
GRPC *healthcheck.GRPCConfig `mapstructure:"grpc"`

// ComponentHealth configuration shared between HTTP and gRPC v2 servers.
ComponentHealth *healthcheck.ComponentHealthConfig `mapstructure:"component_health"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason we can't just make this whole struct an alias to healthcheck.Config like in the v2 extension? That way the two would be in complete lockstep and we wouldn't need a translation layer when the feature gate is enabled.

// ComponentHealth configuration shared between HTTP and gRPC v2 servers.
ComponentHealth *healthcheck.ComponentHealthConfig `mapstructure:"component_health"`

hasV2Settings bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to track this based on the feature gate and whether the fields were set? We can use configoptional to track whether the user specified a value if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants