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

Add compile step before Cypress runs in CI #2187

Merged
merged 8 commits into from
Oct 1, 2024

Conversation

Swiddis
Copy link
Collaborator

@Swiddis Swiddis commented Oct 1, 2024

Description

The current cypress runs are failing with the error Timeout for 600 seconds reached. OpenSearch Dashboards did not finish compiling.. By far, the longest step of OSD startup is compilation. A little poking around upstream reveals that there's a script that can frontload this compilation, so we can separate the server startup from the compile step. This PR applies this, and lowers the timeout since it no longer needs to be so high. It also adds some caching to reduce build times, although there's a bit more that needs to happen to make build times fast (namely, caching all the /target folders, see #2188).

Issues Resolved

See above

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Collaborator

@RyanL1997 RyanL1997 left a comment

Choose a reason for hiding this comment

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

Hi @Swiddis , thanks for taking this on! Just left a minor question about the timeout

.github/workflows/integration-tests-workflow.yml Outdated Show resolved Hide resolved
Signed-off-by: Simeon Widdis <[email protected]>
@Swiddis Swiddis marked this pull request as draft October 1, 2024 17:28
Signed-off-by: Simeon Widdis <[email protected]>
@Swiddis Swiddis force-pushed the fix-ci branch 3 times, most recently from 27ba559 to 22b1613 Compare October 1, 2024 21:10
@Swiddis Swiddis marked this pull request as ready for review October 1, 2024 21:18
Signed-off-by: Simeon Widdis <[email protected]>
@Swiddis Swiddis merged commit fb9027a into opensearch-project:main Oct 1, 2024
13 of 20 checks passed
@Swiddis Swiddis deleted the fix-ci branch October 1, 2024 22:29
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 1, 2024
* Add compile step before run step

Signed-off-by: Simeon Widdis <[email protected]>

* Remove wait-for-startup step

Signed-off-by: Simeon Widdis <[email protected]>

* Fix detection of server startup

Signed-off-by: Simeon Widdis <[email protected]>

* Fix cache finding no lock files

Signed-off-by: Simeon Widdis <[email protected]>

* Add caches for different package targets

Signed-off-by: Simeon Widdis <[email protected]>

* Fix caches

Signed-off-by: Simeon Widdis <[email protected]>

* Add yarn cache to regular unit tests

Signed-off-by: Simeon Widdis <[email protected]>

* Remove target cache in ftr

Signed-off-by: Simeon Widdis <[email protected]>

---------

Signed-off-by: Simeon Widdis <[email protected]>
Signed-off-by: Simeon Widdis <[email protected]>
(cherry picked from commit fb9027a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
exit 1
fi
fi&
Copy link
Member

Choose a reason for hiding this comment

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

if you put to background it will continue to next step even if http server running didn't appear in dashboard.log yet, right? and if 60 seconds passed, will exit 1 be able to abort the workflow if it has already moved to the next step?

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.

4 participants