-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Fix get-license test failure by ensure cluster is ready #60498
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 get-license test failure by ensure cluster is ready #60498
Conversation
Add assertBusy to more places where license checking can fail.
|
Pinging @elastic/es-security (:Security/License) |
|
|
||
| protected boolean isGetLicenseTest() { | ||
| String testName = getTestName(); | ||
| return testName != null && (testName.contains("/get-license/") || testName.contains("\\get-license\\")); |
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.
Why does this need to support \\ but ccr doesn't?
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.
My guess is that ccr tests do not run on Windows? There are other similar methods in this file, e.g. isMachineLearningTest, isTransformTest and they all check for the backslash'd variant. The CI does have machine learning specific jobs so I think they are justified.
For license check, I decided to add it because we do have multijob-windows-compatibility jobs. I am not completely sure that these jobs run the license check. But it's easy to add so I just did it.
When a new cluster starts, the HTTP layer becomes ready to accept incoming requests while the basic license is still being populated in the background. When a get license request comes in before the license is ready, it can get 404 error. This PR fixes it by either wrap the license check in assertBusy or ensure the license is ready before perform the check.
When a new cluster starts, the HTTP layer becomes ready to accept incoming requests while the basic license is still being populated in the background. When a get license request comes in before the license is ready, it can get 404 error. This PR fixes it by either wrap the license check in assertBusy or ensure the license is ready before perform the check.
When a new cluster starts, the HTTP layer becomes ready to accept incoming requests while the basic license is still being populated in the background. When a get license request comes in before the license is ready, it can get 404 error. This PR fixes it by either wrap the license check in assertBusy or ensure the license is ready before perform the check.
…lastic#60573) This is a follow up for elastic#60498 to ensure an AssertionError is throw when the license is ready. The client throws a ResponseException for 404 status code. It needs to be converted to an AssertionError to correctly work with assertBusy.
…lastic#60573) This is a follow up for elastic#60498 to ensure an AssertionError is throw when the license is ready. The client throws a ResponseException for 404 status code. It needs to be converted to an AssertionError to correctly work with assertBusy.
…lastic#60573) This is a follow up for elastic#60498 to ensure an AssertionError is throw when the license is ready. The client throws a ResponseException for 404 status code. It needs to be converted to an AssertionError to correctly work with assertBusy.
) When a new cluster starts, the HTTP layer becomes ready to accept incoming requests while the basic license is still being populated in the background. When a get license request comes in before the license is ready, it can get 404 error. This PR fixes it by either wrap the license check in assertBusy or ensure the license is ready before perform the check. This is a backport for both #60498 and #60573
) When a new cluster starts, the HTTP layer becomes ready to accept incoming requests while the basic license is still being populated in the background. When a get license request comes in before the license is ready, it can get 404 error. This PR fixes it by either wrap the license check in assertBusy or ensure the license is ready before perform the check. This is a backport for both #60498 and #60573
) When a new cluster starts, the HTTP layer becomes ready to accept incoming requests while the basic license is still being populated in the background. When a get license request comes in before the license is ready, it can get 404 error. This PR fixes it by either wrap the license check in assertBusy or ensure the license is ready before perform the check. This is a backport for both #60498 and #60573
Fix another variant of missing license test failure similar to the cases fixed by #60498.
Fix another variant of missing license test failure similar to the cases fixed by elastic#60498.
Fix another variant of missing license test failure similar to the cases fixed by elastic#60498.
Fix another variant of missing license test failure similar to the cases fixed by elastic#60498.
When a new cluster starts, the HTTP layer become ready to accept incoming requests while the basic license is still being generated in the background. When a get license request comes in before the license is ready, it can get
404error. This PR fixes it by either: ensure the cluster is ready before issue the license request or wrap the license request in assertBusy.Resolves: #59157
Resolves: #60468
Resolves: #60519