CircleCI-Public / browser-tools-orb

Quickly and easily install common browsers and browser testing tools on CircleCI
https://circleci.com/developer/orbs/orb/circleci/browser-tools
MIT License
24 stars 34 forks source link

fix: chromedriver versions not installing #96

Closed ryanbourdais closed 1 year ago

ryanbourdais commented 1 year ago

This fixes the new issue arisen in #95 with chromedriver installs now failing again. This issue was caused by the timestamp output of [this endpoint](this endpoint) containing a string that matched the major version of stable. Output:

{"timestamp":"2023-09-12T18:09:06.116Z","milestones":{"113":{"milestone":"113","version":"113.0.5672.63","revision":"1121455"},"114":{"milestone":"114","version":"114.0.5735.133","revision":"1135570"},"115":{"milestone":"115","version":"115.0.5790.170","revision":"1148114"},"116":{"milestone":"116","version":"116.0.5845.96","revision":"1160321"},"117":{"milestone":"117","version":"117.0.5938.62","revision":"1181205"},"118":{"milestone":"118","version":"118.0.5993.3","revision":"1192594"},"119":{"milestone":"119","version":"119.0.6004.0","revision":"1194959"}}}

Version 116.0.5845.96 is stable at the moment so the logic would latch onto the string 2023-09-12T18:09:06.116Z in the timestamp. These changes leverage that the output surrounds the milestone versions in double quotes, for example:

"116":{"milestone":"116","version":"116.0.5845.96","revision":"1160321"}

and now has logic that grabs the version only when we find a match of the matching chrome major version and the milestone.

hoylemd commented 1 year ago

@ryanbourdais it's CHROME_VERSION_MAJOR, not CHROME_MAJOR_VERSION 😜 (whether it should be is another matter :p)

ryanbourdais commented 1 year ago

@ryanbourdais it's CHROME_VERSION_MAJOR, not CHROME_MAJOR_VERSION 😜 (whether it should be is another matter :p)

yea, I'm glad you mentioned that, I had copied it from my response to @karlentwistle instead of using my IDE's autocomplete

hoylemd commented 1 year ago

I gochu bro ❤️

neospeed83 commented 1 year ago

Thanks for the rapid resolution @ryanbourdais.

rolandcrosby-columntax commented 1 year ago

Thanks for the fix. When do you plan to cut a release that includes this change?

ryanbourdais commented 1 year ago

@rolandcrosby-columntax as soon as this PR is approved internally and merged in I'll cut a new patch release