Skip to content

Commit

Permalink
Merge remote-tracking branch 'opensearch/2.10' into backport/backport…
Browse files Browse the repository at this point in the history
…-752-to-2.10
  • Loading branch information
amsiglan committed Dec 6, 2023
2 parents d5879cd + b802a5a commit 422a092
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cypress-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches:
- "*"
env:
OPENSEARCH_DASHBOARDS_VERSION: '2.x'
SECURITY_ANALYTICS_BRANCH: '2.x'
OPENSEARCH_DASHBOARDS_VERSION: '2.10.0'
SECURITY_ANALYTICS_BRANCH: '2.10'
jobs:
tests:
name: Run Cypress E2E tests
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Run OpenSearch-Dashboards server
run: |
cd OpenSearch-Dashboards
yarn start --no-base-path --no-watch &
yarn start --no-base-path --no-watch --server.host="0.0.0.0" &
shell: bash

# Window is slow so wait longer
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches:
- "*"
env:
OPENSEARCH_DASHBOARDS_VERSION: '2.x'
OPENSEARCH_DASHBOARDS_VERSION: '2.10'
jobs:
tests:
name: Run unit tests
Expand Down
2 changes: 2 additions & 0 deletions cypress/support/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ export const createDetector = (
});
});

// Wait for the first run to execute before ingesting data
cy.wait(65000);
// Ingest documents to the test index
for (let i = 0; i < indexDocsCount; i++) {
cy.insertDocumentToIndex(indexName, '', indexDoc);
Expand Down
14 changes: 9 additions & 5 deletions public/store/CorrelationsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,16 @@ export class CorrelationsStore implements ICorrelationsStore {
);

if (response?.ok) {
const correlatedFindings = response.response.findings.map((f) => {
return {
...allFindings[f.finding],
correlationScore: f.score < 0.01 ? '0.01' : f.score.toFixed(2),
};
const correlatedFindings: CorrelationFinding[] = [];
response.response.findings.forEach((f) => {
if (allFindings[f.finding]) {
correlatedFindings.push({
...allFindings[f.finding],
correlationScore: f.score < 0.01 ? '0.01' : f.score.toFixed(2),
});
}
});

return {
finding: allFindings[finding],
correlatedFindings,
Expand Down

0 comments on commit 422a092

Please sign in to comment.