Repository navigation
feat(alerts): require start_time/end_time on alert event list - #97
Merged
Merged
Conversation
Sync the vendored OpenAPI spec from flashduty-docs main (e6fe2537) and regenerate the typed layer. POST /alert-event/list now requires a search window: start_time and end_time are mandatory and the span must not exceed 31 days. The generated AlertEventGlobalListRequest.StartTime/EndTime change from *int64 (omitempty) to int64 and are always serialized. Other contract updates carried by the sync: - integrations: IntegrationDetail fields are now typed (string/int64/ Timestamp) instead of any, and list/info expose integration_key, settings, editable, creator/updater IDs and related fields; create gains integration_key and is_test, update gains is_test, and create returns an optional plugin test result. - dashboards: queries/resolve accepts max_data_points and preserve_builtin_variables; variable and Loki logs-query field docs. - incident feed: work item feed details carry structured assignees; IncidentFeedItem.DeletedAt is typed as milliseconds (TimestampMilli).
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.
Summary
Sync the vendored OpenAPI spec from flashduty-docs
main(e6fe2537) and regenerate.Alert event list now requires a time window
POST /alert-event/listrequiresstart_timeandend_time(Unix seconds); the span must not exceed 31 days.AlertEventGlobalListRequest.StartTime/EndTimechange from*int64(omitempty) toint64and are always serialized.Breaking for callers: replace
StartTime: flashduty.Int64(x)withStartTime: x.Other contract updates carried by the sync
IntegrationDetailfields are typed (string/int64/Timestamp) instead ofany; list/info exposeintegration_key,settings,editable,creator_id,updated_by,plugin_id,no_editable(andaccount_id,data_source_id,exclusive_data_source_idon list items). Create gainsintegration_keyandis_test; update gainsis_test; create/info can return an optional plugintestresult.queries/resolveacceptsmax_data_pointsandpreserve_builtin_variables; variable-name and Loki logs-query field descriptions updated.assignees(WorkItemAssignee) alongside the ID lists;IncidentFeedItem.DeletedAtis typedTimestampMilli(the value is milliseconds).Also in the next release
mainalready carries #96 (investigation targetpurpose, optionaldatasource_idon query targets), which is not yet tagged; it ships in the same release.Verification
main.go build ./...,go vet ./...,go test -race ./...,go vet -tags e2e ./e2e/...pass;make fmtleaves no diff.