-
Notifications
You must be signed in to change notification settings - Fork 282
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
Windows build and test support for 1.3 #2291
Conversation
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
.github/workflows/ci.yml
Outdated
strategy: | ||
fail-fast: false | ||
matrix: | ||
jdk: [8, 11, 14] | ||
jdk: [8, 11] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JDK14 support? Temurin doesn't have an image for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scrawfor99 Could you look into this? My current thinking is that we will merge it after this PR goes in - let me know what you run into
Here is a quick report on the test failures, looks like some backports were missed, I'll include those changes directly in this pull request
|
Add CI for Windows and MacOS platforms Due to the increase in the number of platforms, I've separated the newer integration tests into their own workflow. Until retries have been enabled they will automatically pass - but still run and report logs. As soon as we have full confidence we will allow them to start blocking pull requests from merging. opensearch-project#2184 Switch the gradle commands to be platform agnostic via the `gradle/gradle-build-action@v2`, dropping the 'clean' step to the build which allows us to reuse the gradle cache - if we see any problems pulling in more recent snapshots we can disable this setting quickly. Found and fixed an issued with config value replacement via environment variables, long story short Windows and MacOS allow for many more characters that are used in the unix environment variable landscape. Added new tests to cover these interesting scenarios as well. Found an encoding issue with user names from config files, still unclear of the source of this issue, be it test setup specific or a problem in the broader OpenSearch ecosystem, disabling the `testSpecialUsernames` until we can dive deeper. opensearch-project#2194 Disabled the HeapBasedRateTrackerTests - it was depending on system timing and was very brittle if the system under test experienced any undo load, created follow up issue opensearch-project#2193 Fixed a test issue in testDlsWithMinDocCountZeroAggregations where there was a random chance for a test failure, easier to find intermittent tests when they are run so often. OpenSSL has open questions - while it is supported for our Linux JDK11 builds, it seems like a stopgap measure. I've disabled the tests on windows environment while we determine if we should support OpenSSL at all on Windows JDK11. opensearch-project#2195 Signed-off-by: Peter Nied <[email protected]>
Adds spotbugs [1] to detect internalization before they are added to the codebase, also fixed several encoding bugs that impact windows users. [1] https://spotbugs.readthedocs.io/en/stable/index.html Closes opensearch-project#2194 Signed-off-by: Peter Nied <[email protected]>
Fixed those bottom 3 tests, they were all windows platform issues, the others might be random failuers. Next step will be looking into the WebhookAuditLogTest failures which seem to be new |
Signed-off-by: Peter Nied <[email protected]>
@scrawfor99 I know you have a couple PRs out for a couple of backports, you might want to rebase off of this pull request while testing or maybe I should pull some of these changes into this change - what do you think? |
Signed-off-by: Peter Nied <[email protected]>
I dumped the CI backport because I saw @cwperks already had one. I rebased the script changes onto your branch and PR'd against it. |
Looking much cleaner, Going to dig in on the WebhookAuditLogTest failures
|
…#1638 Signed-off-by: Peter Nied <[email protected]>
* Add signal/wait model for TestAuditlogImpl I have been tracking test failures with testRestMethod very often showing failures. My theory is that the execution environment can impact the order of operations sometimes causing the audit log not to contain messages before it is checked. Adding a new method `doThenWaitForMessages(...)` this ensures the log queue is fresh, the triggering action completes, and the expected number of messages were received. There is a second long time window that allows for the messages to be flushed, this is likely more than enough - if the messages are received the count down latch immediately continues execution so the tests will not wait if they are ready to proceed. While this new method is much more reliable not all tests were encountering such issues, so I've keep the original convention. This can be migrated in one-offs or all at once if we see more troublesome behavior. The previous methods/fields are depreciated to push future tests to follow the new pattern. Modifications to the rest helper not to throw exceptions were needed to keep the Runnable declaration clean and small. Signed-off-by: Peter Nied <[email protected]>
…lize Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Audit log tests are flaky - pulling in targeted fixes for those test... |
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added callouts from when non-trivial changes were made. Stylecop, Checkstyle, and license checks were applied from where changes were pulled, sorry I know that it is messy to review.
@@ -164,6 +165,7 @@ publishing { | |||
|
|||
tasks.withType(JavaCompile) { | |||
options.encoding = 'UTF-8' | |||
options.warnings = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New: We are never going to fix the warnings emitted during compile in 1.3 and they were slowing me down
} | ||
HttpResponse response = rh.executeGetRequest("_search?pretty", encodeBasicHeader("admin", "admin")); | ||
assertThat(response.getStatusCode(), equalTo(HttpStatus.SC_OK)); | ||
}, 7); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New: 1.3 still uses the transport client, those interacts are not logged, so this number was altered from being 14 -> 7 because the 'read' actions were not included in the audit log (which is expected).
Also updated the verification on 261 to only expect the 'write' message types
} | ||
final HttpResponse response = rh.executeGetRequest("_search?pretty", encodeBasicHeader("admin", "admin")); | ||
Assert.assertEquals(HttpStatus.SC_OK, response.getStatusCode()); | ||
}, 18); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New: Way more audit messages this time because transport messages are included, there were 14 new messages, 7 transport writes, 7 transport reads, and the original 4 expected messages via REST
Ended up filtering out the transport messages on line 302 to keep the rest of the function identical
@@ -199,23 +199,7 @@ protected void initialize(ClusterInfo info, Settings initTransportClientSettings | |||
Assert.assertEquals(info.numNodes, cur.getNodes().size()); | |||
|
|||
SearchResponse sr = tc.search(new SearchRequest(".opendistro_security")).actionGet(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note; this is inline with main - all of these other requested slowed down how long startup took and these assertions aren't that useful since the plugin just throws exceptions if it couldn't create the security index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! 🎸
@@ -222,15 +224,16 @@ public void noServerRunningHttpTest() throws Exception { | |||
public void postGetHttpTest() throws Exception { | |||
TestHttpHandler handler = new TestHttpHandler(); | |||
|
|||
int port = findFreePort(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
* Add jdk 14 to CI Signed-off-by: Stephen Crawford <[email protected]> Signed-off-by: Stephen Crawford <[email protected]>
The latest test failures were from |
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Signed-off-by: Peter Nied <[email protected]>
Description
Updating the github action to support build/test for windows. Note; this change will not include specific backporting. I know this is not desired, but there are some funky changes in our source history that are hard to resolve whereas checkout out specific files is much easier.
Details list of changes
Issues Resolved
Testing
Its all in the CI system!
Check List
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.