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 build error due to upstream change #316

Merged
merged 5 commits into from
Jun 6, 2024

Conversation

Hailong-am
Copy link
Contributor

@Hailong-am Hailong-am commented May 30, 2024

Description

Fix build error due to upstream changes
opensearch-project/common-utils#655
opensearch-project/anomaly-detection#1210

Issues Resolved

#311

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc 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.

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
@Hailong-am Hailong-am marked this pull request as draft June 5, 2024 06:04
Signed-off-by: Hailong Cui <ihailong@amazon.com>
@Hailong-am
Copy link
Contributor Author

Hailong-am commented Jun 5, 2024

integTest failed due to, that will need to a fix at AD side, raise PR opensearch-project/anomaly-detection#1221

REPRODUCE WITH: ./gradlew ':integTest' --tests "org.opensearch.integTest.SearchAnomalyDetectorsToolIT.testSearchAnomalyDetectorsToolInFlowAgent_detectorStateParams" -Dtests.seed=676D44C4FE298B5C -Dtests.security.manager=false -Dtests.locale=ar-SA -Dtests.timezone=Europe/Sofia -Druntime.java=17
{"error":{"reason":"System Error","details":"class org.opensearch.timeseries.transport.GetConfigRequest cannot be cast to class org.opensearch.timeseries.transport.GetConfigRequest (org.opensearch.timeseries.transport.GetConfigRequest is in unnamed module of loader java.net.FactoryURLClassLoader @752973de; org.opensearch.timeseries.transport.GetConfigRequest is in unnamed module of loader java.net.FactoryURLClassLoader @43c39321)","type":"ClassCastException"},"status":500}

@@ -126,7 +126,7 @@ dependencies {
// Plugin dependencies
compileOnly group: 'org.opensearch', name:'opensearch-ml-client', version: "${opensearch_build}"
implementation fileTree(dir: jsJarDirectory, include: ["opensearch-job-scheduler-${opensearch_build}.jar"])
implementation fileTree(dir: adJarDirectory, include: ["opensearch-time-series-analytics-${opensearch_build}.jar"])
implementation fileTree(dir: adJarDirectory, include: ["opensearch-anomaly-detection-${opensearch_build}.jar"])
Copy link
Collaborator

Choose a reason for hiding this comment

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

AD team plans to change the jar name from opensearch-anomaly-detection to opensearch-time-series-analytics, but main and 2.x and release branch are not consistent, during 2.14 release, this inconsistency caused skills failed to build. @kaituo can you confirm which name will be using in main and 2.x in 2.15 release?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on latest main, @kaituo changed back to opensearch-anomaly-detection in #1210

@Hailong-am
Copy link
Contributor Author

@zane-neo please help to re-run the CI, class cast exception fixed in AD and i could pass the build in my local.

Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
@zane-neo zane-neo merged commit 62ac87f into opensearch-project:main Jun 6, 2024
16 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

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

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/skills/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/skills/backport-2.x
# Create a new branch
git switch --create backport/backport-316-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 62ac87fa63a41fa460ae3795cdeaf1db927d1588
# Push it to GitHub
git push --set-upstream origin backport/backport-316-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/skills/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-316-to-2.x.

Hailong-am added a commit to Hailong-am/skills that referenced this pull request Jun 6, 2024
* fix build error due to upstream change

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* failed unit test

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix compile error

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix flaky test for locale mr

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* force to use x86_64 for macos

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
(cherry picked from commit 62ac87f)
zane-neo pushed a commit that referenced this pull request Jun 6, 2024
* fix build error due to upstream change

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* failed unit test

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix compile error

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix flaky test for locale mr

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* force to use x86_64 for macos

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
(cherry picked from commit 62ac87f)
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.

2 participants