Skip to content

feat(alerts): require start_time/end_time on alert event list - #97

Merged
ysyneu merged 1 commit into
mainfrom
feat/alert-event-list-required-window
Oct 12, 2026
Merged

ysyneu merged 1 commit into
mainfrom
feat/alert-event-list-required-window

Conversation

@ysyneu

@ysyneu ysyneu commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Sync the vendored OpenAPI spec from flashduty-docs main (e6fe2537) and regenerate.

Alert event list now requires a time window

POST /alert-event/list requires start_time and end_time (Unix seconds); the span must not exceed 31 days.
AlertEventGlobalListRequest.StartTime / EndTime change from *int64 (omitempty) to int64 and are always serialized.

Breaking for callers: replace StartTime: flashduty.Int64(x) with StartTime: x.

Other contract updates carried by the sync

  • Integrations: IntegrationDetail fields are typed (string / int64 / Timestamp) instead of any; list/info expose integration_key, settings, editable, creator_id, updated_by, plugin_id, no_editable (and account_id, data_source_id, exclusive_data_source_id on list items). Create gains integration_key and is_test; update gains is_test; create/info can return an optional plugin test result.
  • Dashboards: queries/resolve accepts max_data_points and preserve_builtin_variables; variable-name and Loki logs-query field descriptions updated.
  • Incident feed: work item created / assignees-changed details carry structured assignees (WorkItemAssignee) alongside the ID lists; IncidentFeedItem.DeletedAt is typed TimestampMilli (the value is milliseconds).

Also in the next release

main already carries #96 (investigation target purpose, optional datasource_id on query targets), which is not yet tagged; it ships in the same release.

Verification

  • Synced spec files are byte-identical to flashduty-docs main.
  • go build ./..., go vet ./..., go test -race ./..., go vet -tags e2e ./e2e/... pass; make fmt leaves no diff.

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).
@ysyneu
ysyneu merged commit 6f4c5fd into main Oct 12, 2026
4 checks passed
@ysyneu
ysyneu deleted the feat/alert-event-list-required-window branch October 12, 2026 08:36
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.

1 participant