Repository navigation
Activity: a change that failed, or whose end is unknown, says so - #2854
Closed
davidmckayv wants to merge 2 commits into
Closed
davidmckayv wants to merge 2 commits into
davidmckayv wants to merge 2 commits into
Conversation
A change's row now says how it came out when it did not simply happen: `outcome: "failed"` with why, or `outcome: "unknown"` when OpenBot started it and could not confirm how it ended. Activity drew those rows by their type alone, so a stop that never stopped read "A person pressed stop" in the colour of a change that went through. Such a row now reads "Did not happen" or "Outcome unknown", in the colour of a change that did not happen, with the reason under it. Rows that went through are drawn as before. The CSV export already carries the payload. Tests: the rows as the page draws them, and the same page in Chromium and WebKit, light and dark, wide and on a phone.
A change that failed keeps its own event type (a stop that did not stop is still computer.stopped, with outcome failed), so the Did not happen view, which asks by type, never showed it. The audit-events list and export take a new optional changeOutcome parameter: failed, unknown, or both. With eventType, an event matches either; every other filter still applies, and leaving it out changes nothing. The Did not happen view and the Did not happen outcome chip ask for failed,unknown as well as their types. Test: the view and the chip ask the server for both, and Blocked does not.
2 tasks done
Contributor
Author
|
Landed in #2869, which fused every G1 slice. |
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.
What
A change's activity row can now say how it came out when it did not simply happen:
outcome: "failed"witherror: the change was tried and did not happen (a stop the computer never answered).outcome: "unknown"witherror: OpenBot started the change and could not confirm how it ended.Activity drew those rows by their type alone, so a stop that never stopped read "A person pressed stop" in the colour of a change that went through. Such a row now reads Did not happen or Outcome unknown, in the colour of a change that did not happen, with the reason under it. Every other row is drawn as before. The CSV export already carries the payload, so it shows the outcome and the reason unchanged.
changeOutcomeOfinapp/src/lib/audit/outcome.tsis the one place that reads it;outcomeOfand the Decision cell both use it.Why
Part of "nothing leaves no trace": a change and its row both happen, or neither, and a change that fails is recorded as failed instead of leaving nothing. The server writes these outcomes under the change's own event type, so no new event type is added.
Tests
app/tests/audit-change-outcome-rows.test.tsx: the rows as the page draws them. Fails before this change (the failed stop read "A person pressed stop",outcomeOfsaid "allowed"), passes after.app/tests/audit-change-outcome-layout.test.tsx: the same page in real Chromium and WebKit, light and dark, 1440px and 390px. No sideways scroll; the two rows are drawn in the did-not-happen colour, the stop that went through in the muted one. Added to the CI browser list.Screenshots (from
OPENBOT_APP_SHOTS): light 1440px shows the failed stop and unknown reset in amber with their reasons under them; dark 390px stacks the decision under What with nothing clipped.The Did not happen view finds them too
A failed change keeps its own event type, so a view that asks by type never showed one. The audit-events list and export take a new optional
changeOutcomequery parameter (failed,unknown, or both): witheventType, an event matches either; every other filter still applies; leaving it out changes nothing (api/openapi/audit-events.yaml, clients regenerated). The Did not happen view and the Did not happen outcome chip now ask forchangeOutcome=failed,unknownalongside their types. Test:audit-change-outcome-rows.test.tsxchecks the view and the chip ask for it and Blocked does not; it fails before this change.Changelog
Activity.
API.
GET .../audit-eventsandGET .../audit-events/exporttake an optionalchangeOutcome(failed,unknown): also the events whose change did not simply happen, whatever their type.