-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Skip BWC tests in checkPart1 and checkPart2 #38730
Skip BWC tests in checkPart1 and checkPart2 #38730
Conversation
`one can use -Dtests.bwc.enabled=false` to disable BWC tests. This is usefull for being able to break out BWC tests into their own PR check.
Pinging @elastic/es-core-infra |
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.
For reference elasticsearch-ci/1 takes ~92 minutes and elasticsearch-ci 120 minutes right now. These checks run in parallel, so it still takes ~2 hours for PR checks to run.
Yikes.
This is useful for being able to break out BWC tests into their own PR
check.
How so? This PR seems to add the ability to disable BWC tests via property. How does this help facilitate being able to run only BWC tests?
I also believe that splitting along these lines adds additional value.
I suspect there are a lot of dimensions still available to chop up this build.
FWIW, it's generally best practice to limit things like magic build properties to influencing how the build does its work and now what work it does. There already exists a first-class construct for the latter, they're called tasks.
NOTE: When I say "best practice" that may very well be in conflict to agreed upon patterns and practices that exist here. At this point I'm just trying to provide some third-party insight.
I'm sure there's reasoning behind this, and perhaps we can discuss offline, but it looks like we have a load of projects with a bwcTest
task, which acts as a lifecycle task. When bwc_tests_enabled
is true
we attach some dependencies to that lifecycle task. Why the additional complexity? In what scenario would a build run bwcTest
but not want to run the BWC tests? I find this a bit confusing, and I suspect others do too.
So in summary, we already seem to have a set of tasks whose purpose is to run these tests bwcTest
. We then have some magic flags that make those tasks effectively do nothing. Why both?
Thanks for the review @mark-vieira ! Those are valid points. We used to run The newly added parameter is meant to be used in CI to turn off bwc testing for We could make a change that would automatically turn off bwc tests if one of those tasks are specified on the command line to avoid the use of the property to toggle this. |
Don't allow bwc off for bwcTestSnapshots
@elasticmachine run elasticsearch-ci/default-distro |
I assume realistically folks only run this for specific subprojects as running
So if folks are running
How are the BWC tests run now if
I'm not sure why this is necessary. It very much seems like BWC tests are a special beast that we only want to run in explicit scenarios. Adding more magic to disable them in certain circumstances doesn't seem right. I think all the magic flag stuff should probably go and be replaced instead with a) tasks that invoke the specific set of tests we want for whatever the given scenario is (pre-commit check, CI, etc) and b) specific CI jobs configured to run those tasks. The goal of " I think this is worth a larger discussion perhaps out of band. Let's make time to discuss this in the core-infra weekly tomorrow. |
@@ -170,6 +170,17 @@ if (bwc_tests_enabled == false) { | |||
println "See ${bwc_tests_disabled_issue}" | |||
println "===========================================================" | |||
} | |||
if (project.gradle.startParameter.taskNames.find { it.startsWith("checkPart") } != null) { |
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.
This kind of thing tends to be quite brittle. One major issue is that "tasks that will execute" != "tasks you asked to execute". For example, if I introduce a task checkAllParts
which dependsOn checkPart1, checkPart1
then this breaks down.
If we don't want tasks to run as part of a build we should define new tasks with the correct dependencies. Introducing logic like this into the build makes it very difficult to reason about why a given task was executed (or not) during a particular build invocation. In the end we should strive for more specific lifecycle tasks, not more dynamic logic. If I don't want task foo
to run when I run checkPart
, then checkPart
shouldn't depend on foo
. If making this so means adding more tasks and tweaking the existing dependency graph then we should do that instead.
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.
Splitting the build up is not (yet) something we want to do, so we wouldn't want to embed this into every project. In the end, setting the bwc tests to false does prevent the dependencies to be added to check,
I'm not overly concerned about tasks that would depend on these partial checks as these are done specifically for PR checks in CI, maybe we should even reflect that in the name of the task to make it clear. I would be much more concerned if it would be possible to accidentally run fewer tests, running more than one intended isn't as bad.
People do run |
These goals aren't mutually exclusive. We can have a partitioned build and simple lifecycle tasks that contributors run to do the full test suite. I certainly am not arguing against some kind of "test everything" task.
I have strong opinions on relying on naming conventions to convey test groups you may not want to hear ;)
I'm not sure what's meant by "meaningful" splits. The goal should be to split the build in a way that makes sense execution wise. If we need to introduce logical groups on top of that to convey status to contributors that's something we can do. We shouldn't limit how we execute the build for best performance. There are abstractions we can introduce to aggregate build results. To make things more concrete, let me propose a solution here:
I am most definitely missing something here. If there are other scenarios I'm missing, we should aim to model them with new explicit tasks, rather than modifying the behavior of existing ones with toggles. |
I do mean logical. I'm not arguing against having splits that make sense execution wise underneath that, but we are not there yet. We wouldn't want to expose execution splits to developers, that's why doing just the logical ones first is easier because we get the if that failed this doesn't need to be ran logic for free.
The I wouldn't want to wait to get that before we split out bwc tests, but I can assure you I view this as a temporary state. I share all your concerns and we will make sure to address them eventually.
|
As discussed today, 👍 acknowledging that this is a temporary measure until we agree on a better structure for splitting these PR checks. |
Don't run bwc tests for check part 1 and 2
Don't run bwc tests for check part 1 and 2
Don't run bwc tests for check part 1 and 2
* elastic/master: Remove immediate operation retry after mapping update (elastic#38873) Remove mentioning of types from bulk API docs (elastic#38896) SQL: change JDBC setup URL in the documentation (elastic#38564) Skip BWC tests in checkPart1 and checkPart2 (elastic#38730) Enable silent FollowersCheckerTest (elastic#38851) Update TESTING.asciidoc with platform specific instructions (elastic#38802) Use consistent view of realms for authentication (elastic#38815) Stabilize RareClusterState (elastic#38671) Increase Timeout in UnicastZenPingTests (elastic#38893) Do not recommend installing vagrant-winrm elastic#38887 _cat/indices with Security, hide names when wildcard (elastic#38824) SQL: fall back to using the field name for column label (elastic#38842) Fix LocalIndexFollowingIT#testRemoveRemoteConnection() test (elastic#38709) Remove joda time mentions in documentation (elastic#38720) Add enabled status for token and api key service (elastic#38687)
Don't run bwc tests for check part 1 and 2
This implies that we will add
bwcTestsSamples
as a PR check.For reference elasticsearch-ci/1 takes ~92 minutes and elasticsearch-ci 120 minutes right now. These checks run in parallel, so it still takes ~2 hours for PR checks to run.
By splitting out bwc Tests in their own tests, the expected times will be:
~70 min for /1, 87 min for 2 and 55m for bwc.
So the overall check time would come down by ~ 3/4 of an hour.
I also believe that splitting along these lines adds additional value.