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

cli flag to specify chromedriver port #1620

Merged

Conversation

svkrclg
Copy link
Contributor

@svkrclg svkrclg commented Jul 30, 2021

@svkrclg
Copy link
Contributor Author

svkrclg commented Jul 30, 2021

I am new in this org as a contributor, let me know what else needs to be added.

@svkrclg svkrclg changed the title added cli flag to specify chromedriver port cli flag to specify chromedriver port Jul 31, 2021
@soulgalore
Copy link
Member

Hi @svkrclg looks great, thanks the addition! I'm on vacation, that's why the late merge.

@@ -25,6 +25,9 @@ module.exports.configureBuilder = function(builder, baseDir, options) {
}

const serviceBuilder = new chrome.ServiceBuilder(chromedriverPath);
if (options.chrome.chromedriverPort) {
Copy link
Member

Choose a reason for hiding this comment

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

This need either use lodash.get or you can add a check like:
if (options.chrome && options.chrome.chromedriverPort) ...

The reason is that even when you run Chrome, we aren't 100% you have set any options for Chrome (that's the way it works right now at least).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, sure thing.

Copy link
Member

@soulgalore soulgalore left a comment

Choose a reason for hiding this comment

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

One minor thing!

@svkrclg
Copy link
Contributor Author

svkrclg commented Aug 4, 2021

Also, do you think it is a good idea to check whether the port is free or not before starting chromedriver?

@soulgalore
Copy link
Member

@svkrclg no I think that could up to the developer that starts the driver just as long as we push an error to the log if it fails.

@svkrclg
Copy link
Contributor Author

svkrclg commented Aug 7, 2021

Verified it, in case of an invalid port, the Chromedriver error is pushed to chromedriver.log if verbose >=2

@soulgalore soulgalore merged commit aad1e73 into sitespeedio:main Aug 9, 2021
@soulgalore
Copy link
Member

Thank you @svkrclg !!!

@svkrclg svkrclg deleted the cli-to-specify-chromedriver-port branch August 10, 2021 17:33
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.

None yet

2 participants