-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Heartbeat]: catch all error handler for browser jobs #30013
[Heartbeat]: catch all error handler for browser jobs #30013
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:
|
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.
Leaving a partial review, still reading this completely, lots of good stuff here!
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 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) |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
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, great work!
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 <[email protected]>
* [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 <[email protected]>
- inline
to 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 Enricher
and drop some of the logic in the global wrapper to make things easier.<monitior>-inline
inline suffix from inline monitors.