Skip to content

feat: enable ci for windows and macos - #907

Merged
derek-ho merged 26 commits into
opensearch-project:2.xfrom
derek-ho:enable-windows-macos
Oct 25, 2022
Merged

derek-ho merged 26 commits into
opensearch-project:2.xfrom
derek-ho:enable-windows-macos

Conversation

@derek-ho

@derek-ho derek-ho commented Oct 12, 2022 •

Copy link
Copy Markdown
Contributor

Signed-off-by: Derek Ho [email protected]

Description

[Describe what this change achieves]

Issues Resolved

#249 #250

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.

@derek-ho
derek-ho requested a review from a team as a code owner October 12, 2022 19:25
@derek-ho
derek-ho marked this pull request as draft October 12, 2022 19:25
Signed-off-by: Derek Ho <[email protected]>
@codecov-commenter

codecov-commenter commented Oct 12, 2022 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.19%. Comparing base (057fa44) to head (79f765c).
⚠️ Report is 595 commits behind head on 2.x.

Additional details and impacted files
@@             Coverage Diff              @@
##                2.x     #907      +/-   ##
============================================
- Coverage     97.87%   95.19%   -2.68%     
- Complexity     3020     3129     +109     
============================================
  Files           284      310      +26     
  Lines          7425     8404     +979     
  Branches        475      618     +143     
============================================
+ Hits           7267     8000     +733     
- Misses          157      350     +193     
- Partials          1       54      +53     
Flag Coverage Δ
query-workbench 62.76% <ø> (?)
sql-engine 97.94% <ø> (+0.07%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Yury-Fridlyand Yury-Fridlyand left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@derek-ho
derek-ho marked this pull request as ready for review October 17, 2022 14:36
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: windows-latest
os_build_args: -x doctest -x integTest -x jacocoTestReport -x compileJdbc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Disabled doctest/integTest for now, created an issue to enable them in the future
#921


- name: Build with Gradle
run: ./gradlew --continue build assemble
run: ./gradlew --continue build ${{ env.BUILD_ARGS }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment thread workbench/package.json Resolved
@Yury-Fridlyand
Yury-Fridlyand self-requested a review October 17, 2022 16:51
This was referenced Oct 17, 2022
void htmlEscaping_should_disabled() {
assertEquals(
"{\n" + " \"request\": \"index=test\"\n" + "}",
format("{\n" + " \"request\": \"index=test\"\n" + "}"),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should be there %n too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch I reverted this file. As per @joshuali925's suggestion, I will not be doing replaceAll in ErrorFormatter, as this could affect user entered input. Reverted this file to initial state, as I am no longer doing anything in the ErrorFormatter itself.

@derek-ho

Copy link
Copy Markdown
Contributor Author

Looks like at least integ tests are disabled on Windows. That's fine, but please open an issue to re-enable them.

Done: #921

@derek-ho

Copy link
Copy Markdown
Contributor Author

@Yury-Fridlyand can you give it another review and remove the changes requested block if things look good?

@Yury-Fridlyand

Copy link
Copy Markdown
Collaborator

Why ubuntu CI goes to download artifacts for macos?
https://github.com/opensearch-project/sql/actions/runs/3285095735/jobs/5411815462

> Could not resolve all files for configuration ':integ-test:opensearch_distro_extracted_testclusters-integ-test-sqlBwcCluster1-0-1.1.0-'.

   > Could not resolve opensearch-distribution:opensearch:1.1.0.
     Required by:
         project :integ-test
      > Could not resolve opensearch-distribution:opensearch:1.1.0.
         > Could not get resource 'https://artifacts.opensearch.org/releases/core/opensearch/1.1.0/opensearch-min-1.1.0-darwin-x64.tar.gz'.
            > Could not HEAD 'https://artifacts.opensearch.org/releases/core/opensearch/1.1.0/opensearch-min-1.1.0-darwin-x64.tar.gz'. Received status code 403 from server: Forbidden
      > Could not resolve opensearch-distribution:opensearch:1.1.0.
         > Could not get resource 'https://artifacts.opensearch.org/release-candidates/core/opensearch/1.1.0/opensearch-min-1.1.0-darwin-x64.tar.gz'.
            > Could not HEAD 'https://artifacts.opensearch.org/release-candidates/core/opensearch/1.1.0/opensearch-min-1.1.0-darwin-x64.tar.gz'. Received status code 403 from server: Forbidden

@derek-ho

Copy link
Copy Markdown
Contributor Author

Why ubuntu CI goes to download artifacts for macos? https://github.com/opensearch-project/sql/actions/runs/3285095735/jobs/5411815462

> Could not resolve all files for configuration ':integ-test:opensearch_distro_extracted_testclusters-integ-test-sqlBwcCluster1-0-1.1.0-'.

   > Could not resolve opensearch-distribution:opensearch:1.1.0.
     Required by:
         project :integ-test
      > Could not resolve opensearch-distribution:opensearch:1.1.0.
         > Could not get resource 'https://artifacts.opensearch.org/releases/core/opensearch/1.1.0/opensearch-min-1.1.0-darwin-x64.tar.gz'.
            > Could not HEAD 'https://artifacts.opensearch.org/releases/core/opensearch/1.1.0/opensearch-min-1.1.0-darwin-x64.tar.gz'. Received status code 403 from server: Forbidden
      > Could not resolve opensearch-distribution:opensearch:1.1.0.
         > Could not get resource 'https://artifacts.opensearch.org/release-candidates/core/opensearch/1.1.0/opensearch-min-1.1.0-darwin-x64.tar.gz'.
            > Could not HEAD 'https://artifacts.opensearch.org/release-candidates/core/opensearch/1.1.0/opensearch-min-1.1.0-darwin-x64.tar.gz'. Received status code 403 from server: Forbidden

I'm not quite sure I didn't touch that section, but i'll check...

@derek-ho

derek-ho commented Oct 20, 2022 •

Copy link
Copy Markdown
Contributor Author

@Yury-Fridlyand Fixed it, please review again, thanks!

Yury-Fridlyand
Yury-Fridlyand previously approved these changes Oct 20, 2022

- name: Build with Gradle
run: ./gradlew --continue build assemble
run: ./gradlew --continue build ${{ env.BUILD_ARGS }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think you can use there

Suggested change
run: ./gradlew --continue build ${{ env.BUILD_ARGS }}
run: ./gradlew --continue build ${{ matrix.entry.os_build_args }}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You're right this is cleaner let me do this

assertEquals(format(expected), formatter.format(response));
}

@Test

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do you need %n in this test as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yea, put a %n on line 88 in this file

Signed-off-by: Derek Ho <[email protected]>
@derek-ho
derek-ho force-pushed the enable-windows-macos branch from fb50655 to 954c072 Compare October 20, 2022 21:48
@derek-ho
derek-ho merged commit 0699baa into opensearch-project:2.x Oct 25, 2022
@derek-ho
derek-ho deleted the enable-windows-macos branch October 25, 2022 18:00
@opensearch-trigger-bot

Copy link
Copy Markdown
Contributor

The backport to main 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-main main
# Navigate to the new working tree
cd .worktrees/backport-main
# Create a new branch
git switch --create backport/backport-907-to-main
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0699baa2ae47fb72af9721986df669e786655cd2
# Push it to GitHub
git push --set-upstream origin backport/backport-907-to-main
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-main

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

derek-ho added a commit to derek-ho/sql that referenced this pull request Oct 25, 2022
…s-macos

feat: enable ci for windows and macos
(cherry picked from commit 0699baa)
derek-ho added a commit to derek-ho/sql that referenced this pull request Oct 25, 2022
…s-macos

feat: enable ci for windows and macos
(cherry picked from commit 0699baa)
Signed-off-by: Derek Ho <[email protected]>
derek-ho added a commit that referenced this pull request Oct 25, 2022
…nch (#962)

* Merge pull request #907 from derek-ho/enable-windows-macos

feat: enable ci for windows and macos
(cherry picked from commit 0699baa)
Signed-off-by: Derek Ho <[email protected]>

* always and os==ubuntu

Signed-off-by: Derek Ho <[email protected]>

Signed-off-by: Derek Ho <[email protected]>
@penghuo penghuo mentioned this pull request Dec 6, 2022
1 of 6 tasks
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