Skip to content

Commit

Permalink
Temporarily hardcode chromedriver to 112.0.0 to enable all ftr tests
Browse files Browse the repository at this point in the history
The latest version of chromedriver is 112.0.1 which does not support
node 14. This PR hardcodes chromedriver to 112.0.0 temporarily. Pls
revert it once we bump to node 18.

Issue Resolved
#3975

Signed-off-by: ananzh <ananzh@amazon.com>
  • Loading branch information
ananzh committed May 3, 2023
1 parent ca0bb8f commit 1f0e947
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Prevent primitive linting limitations from being applied to unit tests found under `src/setup_node_env` ([#3403](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3403))
- [Tests] Fix unit tests for `get_keystore` ([#3854](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3854))
- [Tests] Use `scripts/use_node` instead of `node` in functional test plugins ([#3783](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3783))
- Temporarily hardcode chromedriver to 112.0.0 to enable all ftr tests ([#3976](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3976))

## [2.x]

Expand Down
11 changes: 6 additions & 5 deletions scripts/upgrade_chromedriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ if (majorVersion) {
if (process.argv.includes('--install')) {
console.log(`Installing chromedriver@^${majorVersion}`);

spawnSync(`yarn add --dev chromedriver@^${majorVersion}`, {
// TODO: Temporary fix to install chromedriver 112.0.0; revert this once Node is bumped to 16+.
// https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3975
spawnSync('yarn add --dev chromedriver@112.0.0', {
stdio: 'inherit',
cwd: process.cwd(),
shell: true,
Expand All @@ -90,10 +92,9 @@ if (majorVersion) {
});
rl.on('line', (line) => {
if (line.includes('"chromedriver": "')) {
line = line.replace(
/"chromedriver":\s*"[~^]?\d[\d.]*\d"/,
`"chromedriver": "^${majorVersion}"`
);
// TODO: Temporary fix to install chromedriver 112.0.0; revert this once Node is bumped to 16+.
// https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3975
line = line.replace(/"chromedriver":\s*"[~^]?\d[\d.]*\d"/, `"chromedriver": "112.0.0"`);
upgraded = true;
}
writeStream.write(line + '\n', 'utf8');
Expand Down

0 comments on commit 1f0e947

Please sign in to comment.