-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Upgrade xk6-browser to v1.0.2 #3235
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
90ac2f9
Upgrade xk6-browser to v1.0.0
ka3de 9e09acb
Remove K6_BROWSER_ENABLED flag requirement
ka3de b02dcd2
Use browser package name instead of expBrowser
ankur22 b1fbe53
Update to v1.0.1 of xk6-browser
ankur22 5eee08d
Add e2e test for browser module in k6
ankur22 0837ee5
Update to v1.0.2 of xk6-browser
ankur22 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
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 actually have a test with the scenarios options instead?
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.
+1 for having an e2e coverage
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've tried to create a test but now I think i've found an issue with the events channel from the new event loop that the browser module subscribes to.
After creating a simple test
Simple test
The output of the test is:
So it would seem that the channel the browser module gets after subscribing isn't being closed when the test exits, am i correct in thinking that? I'd prefer to suppress this error for now and work on the fix in the next cycle.
WDYT?
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.
Yes, it seems you're right. Do you have a guess why this is happening? I see the code for unsubscribing is implemented on the core and invoked from the browser.
How do you intend to suppress it? Do you want to remove the e2e test? I would prefer if at least we understand the root of the problem and we open an issue so we can classify it as non-critical with confidence.
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.
Ok, I'll take a look.
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've created a new issue. I believe the issue actually lies within the browser module scope and so we will work on it asap.
When the test run completes, does the k6 processes exit, or can it ever be reused? The reason I'm asking is because these uncleared goroutines will leak if the k6 process is reused. If it isn't then this is non-critical issue, but we will not be able to add the e2e test in this release.
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.
We have a fix for the leaky goroutines in grafana/xk6-browser#990. As soon as that has been merged into main, i'll upgrade this PR to work with the latest commit from main, and finally add the e2e tests for this PR.
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've updated this branch to work with v1.0.1 of xk6-browser which contains the fix for the goroutine leaks. I've also added an e2e test.
It's worth noting that the e2e test will start a chrome process in the background.
Also, i'm looking at this data race now 😓
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.
This has now been resolved in a32cc6f. Could you please take a look @mstoykov and @codebien?