-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Uptime] Fix synthetics detail step count #89940
[Uptime] Fix synthetics detail step count #89940
Conversation
Pinging @elastic/uptime (Team:uptime) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending the marked changes
} | ||
|
||
const defaultStepTypes = ['step/end', 'stderr', 'cmd/status', 'step/screenshot']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should change the language here for the variable. I wouldn't call these step types but rather syntheticTypes
(since they're under synthetics.type
) or syntheticEventTypes
. A step is a noun, but we've modeled synthetics data as a stream of verbs (that's why there are step/start
and step/end
types, but not a plain step
event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went for syntheticEventTypes
.
}); | ||
|
||
describe('getJourneySteps', () => { | ||
let data: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to specify all the fields here? Most aren't related to this specific functionality. If it's to pass a type check there's probably not much we can do, but I've seen these get to be hard to maintain with all the extra data.
] | ||
`); | ||
|
||
expect(call.body.size).toBe(500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's strike this
|
||
expect(call.body.size).toBe(500); | ||
|
||
expect(result).toHaveLength(2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment here explaining that we're testing the formatting?
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / general / Chrome X-Pack Security Functional Tests (OpenID Connect).x-pack/test/security_functional/tests/oidc/url_capture·ts.security app - OIDC interactions URL capture "before all" hook for "can login preserving original URL"Standard Out
Stack Trace
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
* Add parameter to allow filtering by step type. Write tests. * Delete unneeded fields. * PR feedback.
* Add parameter to allow filtering by step type. Write tests. * Delete unneeded fields. * PR feedback.
…om/kibana into pr/89570 * 'sessions/save-all-sessions' of https://github.com/lizozom/kibana: (44 commits) [ML] Functional tests - skip DFA clone tests [Uptime] Fix synthetics detail step count (elastic#89940) Fixes the permissions to require cluster.manage in order to create an index and in order to update an index (elastic#89947) [Security Solution] [Detections] adds log info level for logging in cloud (elastic#89941) [Time to Visualize] Dashboard By Value Testing Lens (elastic#89581) [Uptime] Expand synthetic journey step thumbnail on hover (elastic#89179) TS project refs: Migrates snapshot_restore to a TS Project (elastic#89653) docs: APM 7.11 updates (elastic#89789) move skip to higher level (elastic#86952) Revert "Migrations v2: don't auto-create indices + FTR/esArchiver support (elastic#85778)" Revert "Revert "Enable v2 so migrations, disable in FTR tests (elastic#89297)"" Revert "Enable v2 so migrations, disable in FTR tests (elastic#89297)" [data.search] Allow search response to follow new hits format (elastic#88115) [Maps] Change 'create multi-layer map' title to be use-case focused (elastic#89520) skip flaky suite (elastic#86952) [Security Solution] Remove focustrap (elastic#89905) [Workplace Search] Add remaining i18n support for the Content Sources tree (elastic#89910) [esArchiver] log when migrations complete and we're done loading data (elastic#89938) Add --ssl flag to make resolver generator use ssl with kbn and elasticsearch clients (elastic#89873) TS project refs: Migrates grokdebugger (elastic#89652) ...
Backported to: |
Summary
Resolves #89560.
The step count for the journey detail view can sometimes be incorrect, because it counts steps other than
step/end
. Rather than a simpler solution of modifying the Elasticsearch query to always filter these, or writing a new search, I've opted to make the previous step filters a default. I've also introduced a new parameter for this query, and modified the offending component to specify only journey steps with typestep/end
.Any other calls to this API should remain unchanged. I've also added a test file for the journey API call.
Checklist
Delete any items that are not applicable to this PR.
For maintainers