[Heartbeat]: catch all error handler for browser jobs#30013
[Heartbeat]: catch all error handler for browser jobs#30013vigneshshanmugam merged 4 commits intoelastic:masterfrom
Conversation
|
This pull request does not have a backport label. Could you fix it @vigneshshanmugam? 🙏
NOTE: |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
andrewvc
left a comment
There was a problem hiding this comment.
Leaving a partial review, still reading this completely, lots of good stuff here!
andrewvc
left a comment
There was a problem hiding this comment.
Can we add a test for the behavior of suites when no journey is run? This would test that if the invoked command fails we still generate events with suite metadata etc. even though no journeys are present.
|
Actually, disregard my last comment. In |
|
Pinging @elastic/uptime (Team:Uptime) |
andrewvc
left a comment
There was a problem hiding this comment.
Generally looking good! I want to run some local tests. Also, it looks like you missed my feedback on synthexec.go, when you get a chance could you respond to it?
Nothing there is major, great work on a complex PR!
| }, | ||
| }, | ||
| func(t *testing.T, e *beat.Event, je *journeyEnricher) { | ||
| v := lookslike.MustCompile(common.MapStr{ |
There was a problem hiding this comment.
Would there be any value in also testing the monitor.* values that are set here? Also, as a note, you can use lookslike.Strict to ensure that there are no extra fields if that's appropriate. It just wraps the outer lookslike.MustCompile, but you do have to define every field.
There was a problem hiding this comment.
Not sure if there would be any value, I added it to denote the case when there are no journeys ran and this was the only message from console.
| e.synthEvents <- se | ||
| } | ||
|
|
||
| e.synthEvents <- se |
There was a problem hiding this comment.
There's a weird thing to consider, which is errors between journeys.
We could still need to check for journey/end to account for errors that might happen between journeys. I think we can just set e.currentJourney.store(false) again, no? Then it just gets reported as an error on the suite.
Our long term goal is for heartbeat to really only execute one journey per monitor (with discovery mode) so I'm OK with not handling this for the moment and just tacking those errors on the previous journey. Also, I don't know what an error between journeys would even be.
There was a problem hiding this comment.
I am not sure if there would be error between journeys, But with this change we would still get stderr messages on the suite level, wouldnt that be enough to figure out any errors?
Oops, can you point me to that one? Is it about the naming |
|
I'm wondering, should we backport this to 7.17.0 , I would say that this is mostly a bugfix, the extra suite stuff won't affect 7.17.0 otherwise |
Yeah ++ on back porting it. |
* [Heartbeat]: catch all error handler for browser jobs * fix wrapper tests * add tests and consume all events * address review and improve test (cherry picked from commit 267f8cb)
* [Heartbeat]: catch all error handler for browser jobs * fix wrapper tests * add tests and consume all events * address review and improve test (cherry picked from commit 267f8cb)
* [Heartbeat]: catch all error handler for browser jobs * fix wrapper tests * add tests and consume all events * address review and improve test (cherry picked from commit 267f8cb) Co-authored-by: Vignesh Shanmugam <vignesh.shanmugam22@gmail.com>
* [Heartbeat]: catch all error handler for browser jobs * fix wrapper tests * add tests and consume all events * address review and improve test (cherry picked from commit 267f8cb) Co-authored-by: Vignesh Shanmugam <vignesh.shanmugam22@gmail.com>
- inlineto monitors #29505synthetics.payload.message. Anything written during the broken journey will be used by Uptime UI for showing debug messages.suite.*details for all the suite jobs.Synthetics Enricherand drop some of the logic in the global wrapper to make things easier.<monitior>-inlineinline suffix from inline monitors.