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: broken ci flow in Node 18 #947

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/alerting-release-e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Alerting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Anomaly Detection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Observability
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

tests-with-security:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template-windows.yml
with:
test-name: Core Dashboards using Bundle Snapshot
Expand All @@ -30,7 +30,7 @@ jobs:

tests-without-security:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template-windows.yml
with:
test-name: Core Dashboards using Bundle Snapshot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

tests-with-security:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Core Dashboards using Bundle Snapshot
Expand All @@ -29,7 +29,7 @@ jobs:

tests-without-security:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Core Dashboards using Bundle Snapshot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environmen
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
steps:
- name: Set up JDK
uses: actions/setup-java@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gantt-chart-release-e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Gantt Chart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Index Management
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ml-commons-release-e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: ML Commons
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notifications-release-e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Notifications
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/observability-release-e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Observability
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Query Workbench
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-e2e-workflow-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environmen
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
steps:
- name: Set up JDK
uses: actions/setup-java@v1
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-signoff-chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environmen
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
steps:
- name: Checkout functional-test
uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-signoff-chromium-ad-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environmen
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
steps:
- name: Checkout functional-test
uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-signoff-chromium-ism-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environmen
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
steps:
- name: Checkout functional-test
uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environmen
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
steps:
- name: Checkout functional-test
uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environmen
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
steps:
- name: Checkout functional-test
uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environmen
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
steps:
- name: Checkout functional-test
uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-signoff-chromium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environmen
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
steps:
- name: Checkout functional-test
uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-signoff-electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environmen
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
steps:
- name: Checkout functional-test
uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-signoff-firefox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environmen
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
steps:
- name: Checkout functional-test
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reports-release-e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Reports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- 'cypress/**/search-relevance-dashboards/**'
tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Search Relevance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Security Analytics
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security-release-e2e-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

tests:
needs: changes
if: ${{ needs.changes.outputs.tests == 'true' }}
# if: ${{ needs.changes.outputs.tests == 'true' }}
uses: ./.github/workflows/release-e2e-workflow-template.yml
with:
test-name: Security
Expand Down
36 changes: 36 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
const { defineConfig } = require('cypress');

module.exports = defineConfig({
e2e: {
defaultCommandTimeout: 60000,
requestTimeout: 60000,
responseTimeout: 60000,
baseUrl: 'http://localhost:5601',
reporter: 'cypress-multi-reporters',
reporterOptions: {
configFile: 'reporter-config.json',
},
viewportWidth: 2000,
viewportHeight: 1320,
supportFile: 'cypress/support/index.js',
specPattern: 'cypress/integration/**/*',
env: {
openSearchUrl: 'http://localhost:9200',
SECURITY_ENABLED: false,
AGGREGATION_VIEW: false,
username: 'admin',
password: 'admin',
ENDPOINT_WITH_PROXY: false,
MANAGED_SERVICE_ENDPOINT: false,
VISBUILDER_ENABLED: true,
DATASOURCE_MANAGEMENT_ENABLED: false,
ML_COMMONS_DASHBOARDS_ENABLED: true,
WAIT_FOR_LOADER_BUFFER_MS: 0,
NO_COMMAND_LOG: 1,
},
},
});
25 changes: 0 additions & 25 deletions cypress.json

This file was deleted.

18 changes: 18 additions & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,22 @@
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
/**
* For cypress on 9.6.0 and chrome larger than 117, --headless=new is needed.
* https://github.com/cypress-io/cypress-documentation/issues/5479#issuecomment-1719336938
*/
// on('before:browser:launch', (browser = {}, launchOptions) => {
// if (
// (browser.name === 'chrome' || browser.name === 'chromium') &&
// browser.isHeadless
// ) {
// launchOptions.args = launchOptions.args.map((arg) => {
// if (arg === '--headless') {
// return '--headless=new';
// }
// return arg;
// });
// }
// return launchOptions;
// });
};
Loading
Loading