Merged
Conversation
This was using the caller's host ID, which might not be the same as the instance's host ID.
Adds new 'instance status monitoring' functionality to periodically query and store instance status. Currently, this only includes the status info that will be returned by the API. But, it's extensible to other information, such as metrics, in future PRs. PLAT-33
5fbf489 to
2f5af04
Compare
Adds instance data to the update and get database endpoints. Also renames `inspect-database` to `get-database`. PLAT-33
2f5af04 to
8aecc3d
Compare
The stored entries are returned in reverse order, so the last entry is at the beginning of the slice and not the end. PLAT-33
77f9877 to
dee4288
Compare
This field was just missing from the `taskToAPI` conversion function. PLAT-33
tsivaprasad
requested changes
Jun 5, 2025
server/internal/workflows/activities/create_pgbackrest_backup.go
Outdated
Show resolved
Hide resolved
server/internal/workflows/activities/create_pgbackrest_backup.go
Outdated
Show resolved
Hide resolved
tsivaprasad
approved these changes
Jun 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces an extensible monitoring mechanism, uses it to monitor instance status, and returns that status in the API. The instance status is continuously refreshed and stored every 15 seconds for the lifetime of the instance. I've implemented an instance monitor resource in our resource model so that the monitors can be created and torn down alongside the instances. The API returns a full instance status in the newly-implemented
get-databaseendpoint and theupdate-databaseendpoint1. Thelist-databasesendpoint returns an abbreviated view of the instance status.Example API responses
Abbreviated view in
list-databasesFull view in
get-databaseExample showing a downed instance
PLAT-33
Footnotes
The
create-databaseresponse has theinstancesfield, but the instances are created after this call has returned. ↩