Skip to content
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

Fix/4123 click panic #4174

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Fix/4123 click panic #4174

wants to merge 7 commits into from

Conversation

ankur22
Copy link
Contributor

@ankur22 ankur22 commented Jan 13, 2025

What?

This makes changes to the codebase so that we alert the user of an error that they could work with to try and fix their environment.

Why?

When either the load generator and/or chrome are under heavy load (CPU is nearly maxed out), a user might sometimes see an NPD error. This isn't useful and the user cannot do anything with that information. We protect against an NPD by returning an error which should give the user some idea of what steps to take to get their test to work (increase compute resources).

More details can be found in #4124 (comment).

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (make lint) and all checks pass.
  • I have run tests locally (make tests) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Related PR(s)/Issue(s)

#4124

@ankur22 ankur22 requested a review from a team as a code owner January 13, 2025 16:02
@ankur22 ankur22 requested review from codebien, olegbespalov and inancgumus and removed request for a team January 13, 2025 16:02
Looks like the wrong frame was used. We retrieved the frame with
h.ownerFrame, but then never used the value that was returned if it
wasn't nil.
@ankur22 ankur22 force-pushed the fix/4123-click-panic branch from e65d30f to 7fbcd21 Compare January 13, 2025 16:06
olegbespalov
olegbespalov previously approved these changes Jan 14, 2025
Copy link
Contributor

@olegbespalov olegbespalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, since still not fully have context 👍 Left a few non-blocking comments 👍

js/modules/k6/browser/common/page.go Show resolved Hide resolved
js/modules/k6/browser/common/execution_context.go Outdated Show resolved Hide resolved
js/modules/k6/browser/common/page.go Show resolved Hide resolved
Being a bit more defensive against unexpected NPDs further along down
the line of execution.
Co-authored-by: Ivan <2103732+codebien@users.noreply.github.com>
@ankur22 ankur22 force-pushed the fix/4123-click-panic branch from 5a8f184 to eb16372 Compare January 14, 2025 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants