Skip to content

Conversation

@ribafish
Copy link
Contributor

@ribafish ribafish commented Mar 17, 2025

What does this PR do?

It makes the DtoGenerator generate deterministic files. Currently, the DtoImpl files generated differ between runs, as methods are unordered and are thus added in a nondeterministic order. This is now fixed and generated files from the same source code are now identical.

Looking at the current Che server PR builds performance, this fix should shorten the builds where Dtos aren't changed by additional ~3m.

This was highlighted after you've merged PR #781, which connected the project to Develocity. I have investigated cache misses and saw there are differences in generated files, causing the calculated cache key be different and thus not getting cache hits on all Surefire goals. I was able to reproduce it locally and fix it. The scan comparison with the fix is visible here, where no DtoImpls are detected as different - there is one additional cache miss, which is outside of scope of this PR.

Screenshot/screencast of this PR

Before:
Screenshot 2025-03-17 at 12 25 56

After:
Screenshot 2025-03-17 at 12 26 51

What issues does this PR fix or reference?

This relates to Issue eclipse-che/che#23358, as it will improve build performance.

How to test this PR?

Build che-server and observe the generated Dto*Impls.java files.

PR Checklist

As the author of this Pull Request I made sure that:

Release Notes

  • Generated DtoImpls.java files are now deterministic.

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@openshift-ci
Copy link

openshift-ci bot commented Mar 17, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ribafish

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link

openshift-ci bot commented Mar 17, 2025

Hi @ribafish. Thanks for your PR.

I'm waiting for a eclipse-che member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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.

2 participants