Skip to content

Conversation

@trask
Copy link
Member

@trask trask commented Feb 4, 2025

No description provided.

@trask trask requested a review from a team as a code owner February 4, 2025 22:48
- name: Build
# running suite "none" compiles everything needed by smoke tests without executing any tests
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=none --no-daemon ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
run: ./gradlew :smoke-tests:test -PsmokeTestSuite=none ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
Copy link
Member Author

Choose a reason for hiding this comment

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

--no-daemon was only used in two places, so removed for consistency

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the --no-daemon was used here to reduce memory usage.

Copy link
Member Author

Choose a reason for hiding this comment

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

when I run with --no-daemon locally it logs

To honour the JVM settings for this build a single-use Daemon process will be forked.

and reading the CodeQL docs they say they need --no-daemon or ./gradlew --stop before running (in order to pick up the initial forking/child process I guess?), which makes me think that --no-daemon doesn't really do much here except prevent it from reusing the existing worker started in "Set up Gradle cache", but I really don't know...

Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't check the commit history, but I suspect the issue was that the tests sometimes got an OOM. So it was split in 2 parts where in the first part we compile the tests with --no-daemon (-PsmokeTestSuite=none doesn't run any tests) so whatever memory gradle used for building gets freed. Second step just runs the tests and hopefully has gradle consuming less memory. It is possible that the OOM isn't an issue any more. If that is the case we could remove the Build step from that workflow and just keep Test.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh! I missed the second step below, that makes sense, I'll add this back

- name: Build
# skipping build cache is needed so that all modules will be analyzed
run: ./gradlew assemble -x javadoc --no-build-cache --no-daemon
run: ./gradlew assemble -x javadoc
Copy link
Member Author

@trask trask Feb 4, 2025

Choose a reason for hiding this comment

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

removing --no-build-cache should help with CodeQL performance now that it's a PR check

Comment on lines -47 to -48
# gradle enterprise is used for the build cache
gradle-home-cache-excludes: caches/build-cache-1
Copy link
Member Author

Choose a reason for hiding this comment

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

removing this might help CI performance now that we aren't using gradle enterprise anymore (it should use github actions cache)

@trask trask merged commit 32b19aa into open-telemetry:main Feb 5, 2025
63 checks passed
@trask trask deleted the update-gradle-caching branch February 5, 2025 01:52
@trask trask mentioned this pull request Feb 5, 2025
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.

3 participants