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

Force parallel configuration of all projects before model building #30226

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

6hundreds
Copy link
Member

Fixes #30206

@6hundreds

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@6hundreds 6hundreds force-pushed the 6hundreds/30206/parallel-configuration-for-model-building branch from 61bf38e to de723b1 Compare August 20, 2024 15:01
@6hundreds

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@6hundreds

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@6hundreds 6hundreds force-pushed the 6hundreds/30206/parallel-configuration-for-model-building branch from 93a2499 to 18a4cb6 Compare August 27, 2024 14:44
@6hundreds

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@6hundreds 6hundreds force-pushed the 6hundreds/30206/parallel-configuration-for-model-building branch from ac2933d to 9333e47 Compare August 28, 2024 09:28
@6hundreds
Copy link
Member Author

@bot-gradle test this without pts on linux

@bot-gradle
Copy link
Collaborator

I've triggered the following builds with parameters: -DenablePredictiveTestSelection=false for you. Click here to see all build failures.

@6hundreds 6hundreds force-pushed the 6hundreds/30206/parallel-configuration-for-model-building branch from 9333e47 to 2523dd6 Compare August 30, 2024 13:34
@6hundreds 6hundreds force-pushed the 6hundreds/30206/parallel-configuration-for-model-building branch from 2523dd6 to 433ce83 Compare August 30, 2024 13:37
@6hundreds
Copy link
Member Author

@bot-gradle test this without pts on linux

@bot-gradle
Copy link
Collaborator

I've triggered the following builds with parameters: -DenablePredictiveTestSelection=false for you. Click here to see all build failures.

// TODO: isolated expected behaviour for parallel sync
// server.expect("configure-root")
// server.expectConcurrent("configure-a", "configure-b")
server.expectConcurrent("configure-a", "configure-b")
Copy link
Member

@alllex alllex Sep 11, 2024

Choose a reason for hiding this comment

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

This test actually works like this even on master without changes in this PR. I am able to reproduce it locally. That is, projects a and b are configured concurrently.

The reason for this is related to BuildType.TASKS not meaning "only run tasks, no models are built". Instead it means "tasks are requested, but models might as well". Another part of the story is that any IDE sync (IJ 2024.2 and IJ 2024.2.1) is identified as BuildType.TASKS even if no tasks are involved. Instead, I observe a request for "default tasks".

@Override
public void prepare(ProjectState projectState) {
if (buildModelParameters.isIsolatedProjects()) {
buildLifecycleController.configureProjects();
Copy link
Member

@alllex alllex Sep 11, 2024

Choose a reason for hiding this comment

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

💭 Calling this method here is actually redundant, because it is already called unconditionally on that model-building code path here.

First via this call:

ProjectState targetProject = buildController.withProjectsConfigured(gradle -> gradle.getDefaultProject().getOwner());

And then via here:

// Force configuration of the containing build and then locate the builder for target project
buildController.configureProjects();

@alllex
Copy link
Member

alllex commented Sep 11, 2024

FYI, experimenting with this further in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Force parallel project configuration before model building
3 participants