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

Muzzle CI experiment #5594

Merged
merged 8 commits into from
Mar 18, 2022
Merged

Muzzle CI experiment #5594

merged 8 commits into from
Mar 18, 2022

Conversation

trask
Copy link
Member

@trask trask commented Mar 16, 2022

notes:

single muzzle CI job with all modules took (after fixing class loader leak that doesn't affect the javaagent since javaagent-instrumentation-api is always loaded in the bootstrap class loader outside of muzzle):

  • 25 min at default parallelism (I assume 2)
  • 21 min with --max-workers=4
  • 20 min with --max-workers=8

went with --max-workers=4 to avoid overtaxing and causing failures

then I split the muzzle jobs out into 4 jobs. I think github actions re-run may not understand dynamic matrix(?), so this could still solve the re-run issue.

I'm not sure if the 4 job split-out is worth it, so thinking of reverting that (see last commit). It did get the muzzle time down to 10 min (x4 parallel jobs).

@trask trask requested a review from a team as a code owner March 16, 2022 21:05
@trask trask marked this pull request as draft March 16, 2022 21:19
@trask trask marked this pull request as ready for review March 17, 2022 03:03
}
}

// TODO (trask) how to know that muzzleTasks populated above before used below?
Copy link
Contributor

@anuraaga anuraaga Mar 17, 2022

Choose a reason for hiding this comment

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

If the muzzle tasks are actually being run then maybe it's OK but indeed this pattern doesn't look quite reliable. I don't know if it's important for us to split the list into 1111222233334444, if 123412341234 is OK I would create the tasks first and then in the plugins.withId callback AtomicInteger.getAndIncrement() % muzzleTasks.size() to pick the task to register into.

Alternatively we would need to use evaluationDependsOn and afterEvaluate, but reducing evaluation order dependencies tends to help understand the build.

Copy link
Member Author

Choose a reason for hiding this comment

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

if 123412341234 is OK I would create the tasks first and then in the plugins.withId callback AtomicInteger.getAndIncrement() % muzzleTasks.size() to pick the task to register into.

ya, I like that, do you know if the subprojects ordering is guaranteed to be the same across multiple invocations (on same git sha)?

Copy link
Contributor

@anuraaga anuraaga Mar 17, 2022

Choose a reason for hiding this comment

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

As far as I know Gradle project evaluation order is deterministic (a DFS) which would make this deterministic too, though I can't say with 100% confidence without trying

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Here we're relying on project evaluation order, not task evaluation order. Luckily, project evaluation order is defined by Gradle

https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#N14CB4

@trask trask merged commit 25856b8 into open-telemetry:main Mar 18, 2022
@trask trask deleted the muzzle-ci branch March 18, 2022 16:57
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
* Muzzle CI experiment

* Fix class loader leak

* --max-workers=4

* Concurrent jobs

* Update .github/workflows/muzzle.yml

Co-authored-by: Anuraag Agrawal <[email protected]>

* Simpler

* Add link to comment

Co-authored-by: Anuraag Agrawal <[email protected]>
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.

4 participants