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 k6 Hosts option incompatibility #671

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

inancgumus
Copy link
Member

Fixes #670.

We first update the k6 dependency (see go.mod and go.sum). Then we fix
the breaking code.

All tests pass. But, this solution is not an ideal one. As we are
marshaling and unmarshaling to grab the hosts (see
chromium/browser_type.go).

Since the whole API has changed, I needed to fix tests with the new API
as well.

A proper solution would be to use the new API in our network code,
instead of passing hosts to block to Chromium.

PS: Sorry, I couldn't keep this PR shorter. The problem was CI would
break if I sent each change as separate commits.
@inancgumus inancgumus self-assigned this Dec 8, 2022
Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

I'm not sure about the details in the comment, and it might be good to add those details either in the same comment or in a new issue.

// TODO: A better way to do this would be to handle the resolver
// rules by communicating with Chromium (and then using Hosts's
// Match method) instead of passing the rules via the command line
// to Chromium.
Copy link
Collaborator

Choose a reason for hiding this comment

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

How would we communicate with the chromium? CDP? I don't know why that would be better than passing the rules via the command line. Maybe we need another issue for that? 🙂

Copy link
Member Author

@inancgumus inancgumus Dec 8, 2022

Choose a reason for hiding this comment

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

Right. I'll create another issue next week. Let's get this issue out of the way since we're rushing 🏃 Reminder set 👍😄

@inancgumus inancgumus marked this pull request as ready for review December 8, 2022 13:23
@inancgumus inancgumus merged commit aa0b43d into main Dec 8, 2022
@inancgumus inancgumus deleted the fix/k6-incompatibility-opts-hosts branch December 8, 2022 13:23
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.

Fix k6 network Hosts incompatibility
2 participants