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

Run help on root project to speed up project probe #528

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

joshfriend
Copy link
Contributor

Related to #484, running help takes a significant amount of time in our build because it is so large and it configures the whole project just to find a few basic pieces of info. Using :help on the root project makes this considerably faster.

@asodja
Copy link
Member

asodja commented Jan 9, 2024

I think that makes sense.

There are some tests failing where we check that help was run though, e.g.:

logFile.find("<tasks: [help]>").size() == 2
|       |                       |      |
|       []                      0      false

Replacing <tasks: [help]> with <tasks: [:help]> should fix tests. Could you maybe also take care of that?
Also it seems DCO check for signed commits is not happy.

@joshfriend joshfriend force-pushed the jfriend/faster-probe branch 2 times, most recently from 794bbac to 304eaa6 Compare January 9, 2024 19:47
@joshfriend
Copy link
Contributor Author

I'm having trouble running the tests locally with an ARM mac, possibly because this supports such old gradle versions. For now i just globally replaced the expected output but I doubt that is going to pass

@asodja
Copy link
Member

asodja commented Jan 9, 2024

I think it should do the trick. Let's see. And I see StudioPluginIntegrationTest is flaky so ignore that one..

We need to upgrade Gradle version, thanks for a reminder.

Signed-off-by: Josh Friend <jfriend@squareup.com>
@joshfriend
Copy link
Contributor Author

Ok, I might have it this time 😆
Updated the help scenarios in the integration tests to run :help as well (instead of help) and got some of them to pass locally (by updating the supportedGradleVersions array somewhat)

@asodja
Copy link
Member

asodja commented Jan 10, 2024

I also have arm mac, but it works for me. Maybe it's an issue for you, since we request toolchains for JDK8 and maybe you don't have arm version of JDK8?

@asodja
Copy link
Member

asodja commented Jan 10, 2024

I adjusted ProfilerIntegrationTest since there was one more failure, this is now good to merge.

Thanks for the contribution!

@asodja asodja merged commit 49747cb into gradle:master Jan 10, 2024
8 of 9 checks passed
@joshfriend joshfriend deleted the jfriend/faster-probe branch January 10, 2024 14:36
@joshfriend
Copy link
Contributor Author

joshfriend commented Jan 10, 2024

maybe you don't have arm version of JDK8?

Yeah that must be why, I checked and I don't have one installed (just switched to a new laptop), I'll get one for next time! Foojay resolver would be a nice addition to do that automatically.

Thanks for fixing the remaining issues, hope it wasn't too annoying for you!

joshfriend added a commit to joshfriend/k2-performance-metrics that referenced this pull request Apr 24, 2024
It has fixes to make initial environment probe faster
gradle/gradle-profiler#528
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.

None yet

2 participants