Repository navigation
fix(incidentio): map the status categories the API returns - #9375
Open
ShivamSharma43 wants to merge 1 commit into
Open
ShivamSharma43 wants to merge 1 commit into
ShivamSharma43 wants to merge 1 commit into
Conversation
mapStatusCategory matched triage, declared, active, paused, post-incident, closed and resolved. The incident.io API returns triage, declined, merged, canceled, live, learning, closed and paused; active and post-incident are only the app's names for live and learning. Declined, merged and canceled incidents fell through to IN_PROGRESS and stayed open, and live and learning logged an unknown category warning. Map triage, live, learning and paused to IN_PROGRESS and closed, declined, merged and canceled to DONE, and use live in the e2e raw fixture. Fixes apache#9374 Generated-by: Claude Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Shivam Sharma <192242476+ShivamSharma43@users.noreply.github.com>
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
mapStatusCategoryin the incident.io converter matched category names the API doesn't return. The categories ofIncidentStatusV2aretriage,declined,merged,canceled,live,learning,closedandpaused(List Incidents V2).activeandpost-incidentare only the app's names forliveandlearning, anddeclaredandresolvedaren't categories.Because of this:
IN_PROGRESSand stayed open inissues.liveandlearningreachedIN_PROGRESSonly through the default branch and logged "unknown incident.io status category" for every row.Changes:
tasks/incidents_converter.go:triage,live,learningandpausedmap toIN_PROGRESS, andclosed,declined,mergedandcanceledmap toDONE. These are all terminal, and the Rootly plugin mapscancelledtoDONEthe same way. Unknown categories still fall back toIN_PROGRESSwith a warning.tasks/incidents_converter_test.go: the cases use the API's names.activeandpost-incidentare now expected to be unknown. The new cases fail on the old mapping.e2e/raw_tables/_raw_incidentio_incidents.csv: the one row with"category": "active"now useslive. That row is in another incident type, so no snapshot changes.Resolution date and lead time are unchanged; they still come from the "Resolved at" timestamp.
Does this close any open issues?
Fixes #9374
Screenshots
N/A
Other Information
go test ./plugins/incidentio/tasks/: pass.go vet,gofmtandgolangci-lint run ./plugins/incidentio/...: clean. The incidentio e2e tests needE2E_DB_URL, which I didn't run locally; the only fixture change is in a row that the e2e test filters out.pr-type/bug-fix.Generated-by:trailer per the ASF generative tooling guidance.🤖 Generated with Claude Code