Skip to content

Conversation

melancholiai
Copy link
Collaborator

Question Answer
Bug fix
New feature
Breaking change
Deprecations
Documentation
Tests added
Chore

Deprecations: k8s cronjob is no longer supported.

Comment on lines +24 to +28
export interface IMdrClient {
getStatus: () => Promise<EnrollmentStatus>;
postEnrollment: (enrollment: EnrollmentRequestBody) => Promise<void>;
}

Choose a reason for hiding this comment

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

Just use MdrClient class as a type. No need for separate interface

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Using interfaces as a type-safe option isn't redundant.
I find the explicit interface more readable, documented, type-safe, and less error-prone in future development.
InstanceType<typeof MdrClient> isn't as elaborate as a full interface.

return (server: http.Server): http.Server => {
return createTerminus(server, {
// eslint-disable-next-line @typescript-eslint/naming-convention
healthChecks: { '/liveness': stubHealthcheck },

Choose a reason for hiding this comment

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

Out of scope for this PR but, can we think of a real healthcheck?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is possible to check connectivity with the configured database, the problem is code-wise, we don't use a pg client but wrap the execution with osm2pgsql.
To have a proper healthcheck, we also need a pg client which takes and manages database connections, those are already a limited resource.
So today, if for any reason, the connection has gone bad, we will be notified once there is a job to be executed and the connection is off.

@melancholiai melancholiai merged commit a927a00 into master Aug 14, 2025
9 checks passed
@melancholiai melancholiai deleted the mdr-integ branch August 14, 2025 07:38
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