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

Runtime : health check rpc api #5185

Merged
merged 12 commits into from
Jul 4, 2024
Merged

Runtime : health check rpc api #5185

merged 12 commits into from
Jul 4, 2024

Conversation

k-anshul
Copy link
Member

@k-anshul k-anshul commented Jul 3, 2024

No description provided.

@k-anshul k-anshul self-assigned this Jul 3, 2024
proto/rill/runtime/v1/api.proto Outdated Show resolved Hide resolved
proto/rill/runtime/v1/api.proto Outdated Show resolved Hide resolved
proto/rill/runtime/v1/api.proto Outdated Show resolved Hide resolved
runtime/connection_cache.go Outdated Show resolved Hide resolved
runtime/drivers/duckdb/catalogv2.go Outdated Show resolved Hide resolved
runtime/drivers/registry.go Outdated Show resolved Hide resolved
runtime/drivers/repo.go Outdated Show resolved Hide resolved
@k-anshul k-anshul marked this pull request as ready for review July 4, 2024 07:27
runtime/drivers/admin/admin.go Outdated Show resolved Hide resolved
Comment on lines +116 to +119
// Ping implements drivers.Handle.
func (c *Connection) Ping(ctx context.Context) error {
return drivers.ErrNotImplemented
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we return nil from these instead when they are not implemented? Returning an error will make it seem like the ping failed (e.g. if we start using the pings elsewhere).

Copy link
Member Author

Choose a reason for hiding this comment

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

But if we return nil then it means HealthCheck is implemented and the connection is healthy which in this case is not.
Once we start using these Pings we should actually implement this.

runtime/drivers/duckdb/duckdb.go Outdated Show resolved Hide resolved
runtime/drivers/admin/admin.go Outdated Show resolved Hide resolved
for k := range c.singleflight {
e := c.entries[k]
if c.opts.OpenTimeout != 0 && e.status == entryStatusOpening && time.Since(e.since) > c.opts.OpenTimeout {
hangingConnErr = fmt.Errorf("a connection has been in opening state for too long")
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we also incorporate the connection driver name here like in the other error message?

Copy link
Member Author

Choose a reason for hiding this comment

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

The handle will not be populated if the connection is in entryStatusOpening state. I could not think of any other way to get the driver name.

runtime/registry.go Outdated Show resolved Hide resolved
proto/rill/runtime/v1/api.proto Show resolved Hide resolved
runtime/server/health.go Outdated Show resolved Hide resolved
@k-anshul k-anshul requested a review from begelundmuller July 4, 2024 11:51
runtime/server/health.go Outdated Show resolved Hide resolved
Co-authored-by: Benjamin Egelund-Müller <b@egelund-muller.com>
@k-anshul k-anshul merged commit 8afba37 into main Jul 4, 2024
7 checks passed
@k-anshul k-anshul deleted the health_check branch July 4, 2024 12: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.

2 participants