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(chromedriver): don't ignore patch version #413

Open
wants to merge 5 commits into
base: legacy
Choose a base branch
from

Conversation

TravkinAlex
Copy link

@TravkinAlex TravkinAlex commented Aug 16, 2019

Fixes #408
Fixes #424

Before fix:
before fix

After fix:
after webdriver fix

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@TravkinAlex
Copy link
Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@VadimSkuratovskyi
Copy link

@TravkinAlex @cnishina @heathkit @alexeagle Hello, could anyone please merge this pull request and release a new version?

Copy link
Member

@cnishina cnishina left a comment

Choose a reason for hiding this comment

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

I think this needs more work but thank you for looking into this.

const exec = newRegex.exec(version);
if (exec) {
lookUpVersion = exec[1];
lookUpVersion = exec[1] + exec[2];
Copy link
Member

Choose a reason for hiding this comment

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

This is a good start but probably won't do it. I can see where we might have 74.0.5.5 and then we'll get 74.1.4.4. We will just grab 74.0.5.5 with your change. Possibly we could make two semver objs from chromedriver <a.b.c.d> we could have one that is a.b.c and another one that is b.c.d. We could check what is the a.b.c versions and then compare the b.c.d versions for the latest.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, done

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@TravkinAlex
Copy link
Author

@cnishina could you please take a look again? I really did my best, but I'm not knowledgeable on development of such things and basically was just clutching at straws trying to fix this 😄
Nevertheless everything seems to work.

Copy link

@VadimSkuratovskyi VadimSkuratovskyi 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 for me

@TravkinAlex
Copy link
Author

@cnishina don't want to be nagging because I don't really know the due process of contributing to this repository (and open-source in general), but could you please review this once more?

@Lampei
Copy link
Contributor

Lampei commented Aug 30, 2019

Does this fix the issue where latest would grab x.12 before x.126 as it was higher in the list of releases? My #418 PR uses some of the v13 code of webdriver-manager to find latest from the LATEST_RELEASE_7X url then grabs that specific binary.

@TravkinAlex
Copy link
Author

TravkinAlex commented Aug 30, 2019

@Lampei yes, it does, getting the latest one (e.g. without providing specific --version for chrome) grabs the 76.0.3809.126 version, we've actually started using custom webdriver-manager with this fix on our project and everything works as intended (it's published to our own Artifactory).
My initial aim was to fix getting at least the specific version, as we provide it explicitly everywhere at my workplace + I have very limited knowledge of this repo & what the different branches are for & why 13.0.0 version is not considered as latest, and found it difficult to find documentation on it.
For getting the latest version - functionally these should both work correctly, but your solution certainly looks more concise and elegant.

@Lampei
Copy link
Contributor

Lampei commented Aug 30, 2019

I think it's just that v13 uses maxVersion of 77 for chrome but 12 is using 76 (which is what I need for my testing). I had been tweaking my PR a little today, but trying to figure out some of the logic in the chrome_xml was causing me grief. I found that if we update our semver to a newer version, there is a semver.coerce(version) feature now that will coerce the versioning to a more logical semver (adding the 0 to the 2.X versions and removing the extra patch stuff from the chromedriver versions) so it does what the getValidSemver does. We would still need to grab the extra so we could be more specific on which version is needed, but would trim the code down quite a bit in that file.

@TravkinAlex
Copy link
Author

@cnishina I've synced to the latest legacy branch, could you please take a look? We use getting of specific version everywhere on our project, this is highly desirable fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants