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: integration tests with unreleased version of OpenSearch. #600

Merged
merged 3 commits into from
Aug 20, 2024

Conversation

dblock
Copy link
Member

@dblock dblock commented Aug 19, 2024

Description

Similar to opensearch-project/opensearch-py#798, needs a different JDK depending on branch.

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: dblock <dblock@amazon.com>
Copy link

codecov bot commented Aug 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.99%. Comparing base (06a6dc8) to head (3e3fefd).
Report is 57 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #600       +/-   ##
===========================================
+ Coverage   57.29%   67.99%   +10.70%     
===========================================
  Files         315      376       +61     
  Lines        9823     8862      -961     
===========================================
+ Hits         5628     6026      +398     
+ Misses       2902     1555     -1347     
+ Partials     1293     1281       -12     
Flag Coverage Δ
integration 60.35% <ø> (+9.51%) ⬆️
unit 15.37% <ø> (+2.53%) ⬆️

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

see 273 files with indirect coverage changes

Signed-off-by: dblock <dblock@amazon.com>
@dblock
Copy link
Member Author

dblock commented Aug 19, 2024

I am confused to how this passed before and is failing now. @Jakob3xD maybe?

2024-08-19T23:41:33.1991069Z     --- FAIL: TestCatClient/ValidateResponse (0.08s)
2024-08-19T23:41:33.1992267Z         --- PASS: TestCatClient/ValidateResponse/Aliases (0.00s)
2024-08-19T23:41:33.1993646Z         --- PASS: TestCatClient/ValidateResponse/Allocation (0.00s)
2024-08-19T23:41:33.1994995Z         --- FAIL: TestCatClient/ValidateResponse/ClusterManager (0.00s)
2024-08-19T23:41:33.1996289Z         --- PASS: TestCatClient/ValidateResponse/Count (0.03s)
2024-08-19T23:41:33.1997687Z         --- PASS: TestCatClient/ValidateResponse/FieldData (0.00s)
2024-08-19T23:41:33.1998965Z         --- PASS: TestCatClient/ValidateResponse/Health (0.00s)
2024-08-19T23:41:33.2000166Z         --- PASS: TestCatClient/ValidateResponse/Indices (0.01s)
2024-08-19T23:41:33.2001522Z         --- PASS: TestCatClient/ValidateResponse/Master (0.00s)
2024-08-19T23:41:33.2002819Z         --- PASS: TestCatClient/ValidateResponse/NodeAttrs (0.00s)
2024-08-19T23:41:33.2003999Z         --- PASS: TestCatClient/ValidateResponse/Nodes (0.00s)
2024-08-19T23:41:33.2005430Z         --- PASS: TestCatClient/ValidateResponse/PendingTasks (0.00s)
2024-08-19T23:41:33.2006730Z         --- PASS: TestCatClient/ValidateResponse/Plugins (0.00s)
2024-08-19T23:41:33.2007937Z         --- PASS: TestCatClient/ValidateResponse/Recovery (0.01s)
2024-08-19T23:41:33.2009401Z         --- PASS: TestCatClient/ValidateResponse/Repositories (0.00s)
2024-08-19T23:41:33.2010716Z         --- PASS: TestCatClient/ValidateResponse/Segments (0.00s)
2024-08-19T23:41:33.2012461Z         --- PASS: TestCatClient/ValidateResponse/Shards (0.01s)
2024-08-19T23:41:33.2014078Z         --- PASS: TestCatClient/ValidateResponse/Tasks (0.00s)
2024-08-19T23:41:33.2015359Z         --- PASS: TestCatClient/ValidateResponse/Templates (0.00s)
2024-08-19T23:41:33.2016688Z         --- PASS: TestCatClient/ValidateResponse/ThreadPool (0.01s)
2024-08-19T23:41:33.2017608Z === RUN   TestClusterClient
2024-08-19T23:41:33.2018255Z === RUN   TestClusterClient/Reroute
2024-08-19T23:41:33.2018998Z === RUN   TestClusterClient/Reroute/with_request
2024-08-19T23:41:33.2019843Z === RUN   TestClusterClient/Reroute/inspect
2024-08-19T23:41:33.2020559Z === RUN   TestClusterClient/State
2024-08-19T23:41:33.2021304Z === RUN   TestClusterClient/State/with_nil_request
2024-08-19T23:41:33.2022224Z === RUN   TestClusterClient/State/with_request
2024-08-19T23:41:33.2023258Z === RUN   TestClusterClient/State/inspect
2024-08-19T23:41:33.2024035Z === RUN   TestClusterClient/PutDecommission
2024-08-19T23:41:33.2024912Z === RUN   TestClusterClient/PutDecommission/inspect
2024-08-19T23:41:33.2025830Z === RUN   TestClusterClient/GetDecommission
2024-08-19T23:41:33.2026715Z === RUN   TestClusterClient/GetDecommission/with_request
2024-08-19T23:41:33.2027789Z     api_cluster_test.go:243: 
2024-08-19T23:41:33.2029633Z         	Error Trace:	/home/runner/work/opensearch-go/opensearch-go/go-client/opensearchapi/api_cluster_test.go:243
2024-08-19T23:41:33.2032223Z         	Error:      	Expected nil, but got: &opensearch.Error{Err:"no handler found for uri [/_cluster/decommission/awareness/test/_status] and method [GET]"}
2024-08-19T23:41:33.2034260Z         	Test:       	TestClusterClient/GetDecommission/with_request

@Jakob3xD
Copy link
Collaborator

Got this endpoint maybe removed in the upstream Opensearch?

@dblock dblock force-pushed the fix-integration-unreleased branch 2 times, most recently from e0b86f4 to f4454ee Compare August 20, 2024 13:08
@dblock
Copy link
Member Author

dblock commented Aug 20, 2024

Got this endpoint maybe removed in the upstream Opensearch?

It's the other way around. The master concept was deprecated in 2.x, superseded by cluster manager. The SkipIfBelowVersion was not implemented correctly, should have fixed this the first time integration tests started failing.

The reason why tests were passing in 1.x before is because we were actually running against OpenSearch 3.x (main). The workflow is simply incorrect and uses matrix.entry.opensearch_ref which doesn't exist, and should have been matrix.opensearch_ref. Check out https://github.com/opensearch-project/opensearch-go/actions/runs/10265860449/job/28402939845.

2024-08-06T11:47:38.0646042Z [2024-08-06T11:47:38,062][INFO ][o.o.n.Node               ] [fv-az1498-913] version[3.0.0-SNAPSHOT], pid[2328],

after the fix we correctly pickup the 1.x branch

2024-08-20T13:09:01.7610079Z [2024-08-20T13:09:01,760][INFO ][o.o.g.GatewayService     ] [fv-az1789-338] recovered [0] indices into cluster_state
2024-08-20T13:09:06.3854283Z {
2024-08-20T13:09:06.3854984Z   "name" : "fv-az1789-338",
2024-08-20T13:09:06.3855548Z   "cluster_name" : "opensearch",
2024-08-20T13:09:06.3856149Z   "cluster_uuid" : "phkN3ayNTua0kkFCxcXOHw",
2024-08-20T13:09:06.3856716Z   "version" : {
2024-08-20T13:09:06.3857143Z     "distribution" : "opensearch",
2024-08-20T13:09:06.3857777Z     "number" : "1.4.0-SNAPSHOT",
2024-08-20T13:09:06.3858278Z     "build_type" : "tar",
2024-08-20T13:09:06.3858904Z     "build_hash" : "d085afec66d04796816d63cdcf55c2c645803fb2",
2024-08-20T13:09:06.3859752Z     "build_date" : "2024-08-20T12:49:12.418783Z",
2024-08-20T13:09:06.3860363Z     "build_snapshot" : true,
2024-08-20T13:09:06.3860864Z     "lucene_version" : "8.10.1",
2024-08-20T13:09:06.3861454Z     "minimum_wire_compatibility_version" : "6.8.0",
2024-08-20T13:09:06.3862304Z     "minimum_index_compatibility_version" : "6.0.0-beta1"
2024-08-20T13:09:06.3862927Z   },
2024-08-20T13:09:06.3863473Z   "tagline" : "The OpenSearch Project: https://opensearch.org/"
2024-08-20T13:09:06.3864188Z }

@dblock dblock force-pushed the fix-integration-unreleased branch 4 times, most recently from 7bf5ad3 to ad74978 Compare August 20, 2024 13:28
Signed-off-by: dblock <dblock@amazon.com>
@dblock dblock force-pushed the fix-integration-unreleased branch from ad74978 to 3e3fefd Compare August 20, 2024 13:39
@dblock
Copy link
Member Author

dblock commented Aug 20, 2024

@Jakob3xD this is ready

@dblock dblock merged commit 4c0cf65 into opensearch-project:main Aug 20, 2024
55 checks passed
@dblock dblock deleted the fix-integration-unreleased branch August 20, 2024 14:52
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