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

Enhance the Build and Test workflow #3299

Merged
merged 1 commit into from
Jan 23, 2023
Merged

Conversation

AMoo-Miki
Copy link
Collaborator

Signed-off-by: Miki [email protected]

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • yarn test:ftr
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2023

Codecov Report

❗ No coverage uploaded for pull request base (1.x@5f983c8). Click here to learn what that means.
The diff coverage is n/a.

@@          Coverage Diff           @@
##             1.x    #3299   +/-   ##
======================================
  Coverage       ?   67.49%           
======================================
  Files          ?     3044           
  Lines          ?    58696           
  Branches       ?     8902           
======================================
  Hits           ?    39617           
  Misses         ?    16931           
  Partials       ?     2148           
Flag Coverage Δ
Linux 67.45% <0.00%> (?)
Windows 67.44% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

* Run GitHub workflow unit tests in band (opensearch-project#1306)
* Fix JUnit Reporter test (opensearch-project#1338)
* Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442)
* Add code coverage reporting (opensearch-project#1478)
* Add release build verification workflow (opensearch-project#1502)
* Add Windows CI to the workflow (opensearch-project#2966)
* Add retrying flaky jest tests (opensearch-project#2967)
* Record functional test artifacts in case of failure (opensearch-project#3190)
* Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193)
* Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194)
* Fix the version of Chrome to 107 to match `[email protected]`, the last that works on NodeJS v10
* Prevent `AbortError` from breaking unit tests for ExecutionContract

Signed-off-by: Miki <[email protected]>
Copy link
Member

@joshuarrrr joshuarrrr left a comment

Choose a reason for hiding this comment

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

There are a lot of changes here, but nothing of concern jumped out at me. It will be a huge improvement to bring these workflows and tests more inline with our other branches.

@AMoo-Miki
Copy link
Collaborator Author

While this has passed several times in the past, on Windows this PR has failed twice with

UnhandledPromiseRejectionWarning: Error: Caught error after test environment was torn down

expect(jest.fn()).toBeCalledTimes(expected)

Expected number of calls: 1
Received number of calls: 0
    at emitWarning (internal/process/promises.js:99:15)
    at emitPromiseRejectionWarnings (internal/process/promises.js:143:7)
    at process._tickCallback (internal/process/next_tick.js:69:34)

Wish I knew where that was coming from.

@ananzh ananzh merged commit 1c1ea7c into opensearch-project:1.x Jan 23, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 1.3 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-1.3 1.3
# Navigate to the new working tree
pushd ../.worktrees/backport-1.3
# Create a new branch
git switch --create backport/backport-3299-to-1.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 1c1ea7ca9c2b3697e469e2f5b588d0ce3d51ee08
# Push it to GitHub
git push --set-upstream origin backport/backport-3299-to-1.3
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-1.3

Then, create a pull request where the base branch is 1.3 and the compare/head branch is backport/backport-3299-to-1.3.

@kavilla
Copy link
Member

kavilla commented Jan 23, 2023

Nice! With the retry and increasing of timeout it enables us to run the CI at full speed without capping it to prevent failures.

@AMoo-Miki
Copy link
Collaborator Author

i'll manually backport this.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 1.3 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-1.3 1.3
# Navigate to the new working tree
pushd ../.worktrees/backport-1.3
# Create a new branch
git switch --create backport/backport-3299-to-1.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 1c1ea7ca9c2b3697e469e2f5b588d0ce3d51ee08
# Push it to GitHub
git push --set-upstream origin backport/backport-3299-to-1.3
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-1.3

Then, create a pull request where the base branch is 1.3 and the compare/head branch is backport/backport-3299-to-1.3.

AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 23, 2023
…ject#3299)

* Run GitHub workflow unit tests in band (opensearch-project#1306)
* Fix JUnit Reporter test (opensearch-project#1338)
* Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442)
* Add code coverage reporting (opensearch-project#1478)
* Add release build verification workflow (opensearch-project#1502)
* Add Windows CI to the workflow (opensearch-project#2966)
* Add retrying flaky jest tests (opensearch-project#2967)
* Record functional test artifacts in case of failure (opensearch-project#3190)
* Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193)
* Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194)
* Fix the version of Chrome to 107 to match `[email protected]`, the last that works on NodeJS v10
* Prevent `AbortError` from breaking unit tests for ExecutionContract

Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
AMoo-Miki added a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Jan 24, 2023
…ject#3299)

* Run GitHub workflow unit tests in band (opensearch-project#1306)
* Fix JUnit Reporter test (opensearch-project#1338)
* Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442)
* Add code coverage reporting (opensearch-project#1478)
* Add release build verification workflow (opensearch-project#1502)
* Add Windows CI to the workflow (opensearch-project#2966)
* Add retrying flaky jest tests (opensearch-project#2967)
* Record functional test artifacts in case of failure (opensearch-project#3190)
* Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193)
* Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194)
* Fix the version of Chrome to 107 to match `[email protected]`, the last that works on NodeJS v10
* Prevent `AbortError` from breaking unit tests for ExecutionContract

Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
ananzh pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Jan 24, 2023
* Run GitHub workflow unit tests in band (opensearch-project#1306)
* Fix JUnit Reporter test (opensearch-project#1338)
* Add src/test_utils/ and src/core paths to the target clean patterns (opensearch-project#1442)
* Add code coverage reporting (opensearch-project#1478)
* Add release build verification workflow (opensearch-project#1502)
* Add Windows CI to the workflow (opensearch-project#2966)
* Add retrying flaky jest tests (opensearch-project#2967)
* Record functional test artifacts in case of failure (opensearch-project#3190)
* Increase timeout waiting for the exiting of an optimizer worker (opensearch-project#3193)
* Improve yarn's performance in workflows by caching yarn's cache folder (opensearch-project#3194)
* Fix the version of Chrome to 107 to match `[email protected]`, the last that works on NodeJS v10
* Prevent `AbortError` from breaking unit tests for ExecutionContract

Backport PR: opensearch-project#3299
Signed-off-by: Miki <[email protected]>
ananzh pushed a commit that referenced this pull request Jan 25, 2023
* Run GitHub workflow unit tests in band (#1306)
* Fix JUnit Reporter test (#1338)
* Add src/test_utils/ and src/core paths to the target clean patterns (#1442)
* Add code coverage reporting (#1478)
* Add release build verification workflow (#1502)
* Add Windows CI to the workflow (#2966)
* Add retrying flaky jest tests (#2967)
* Record functional test artifacts in case of failure (#3190)
* Increase timeout waiting for the exiting of an optimizer worker (#3193)
* Improve yarn's performance in workflows by caching yarn's cache folder (#3194)
* Fix the version of Chrome to 107 to match `[email protected]`, the last that works on NodeJS v10
* Prevent `AbortError` from breaking unit tests for ExecutionContract

Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>

Signed-off-by: Miki <[email protected]>
Signed-off-by: Miki <[email protected]>
@ananzh ananzh mentioned this pull request Feb 1, 2023
8 tasks
@joshuarrrr
Copy link
Member

backport: #3310

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

Successfully merging this pull request may close these issues.

6 participants