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

HSEARCH-5223 Regenerate avro Dtos / add a sources-not-modified check to the build #4281

Conversation

marko-bekhta
Copy link
Member

https://hibernate.atlassian.net/browse/HSEARCH-5223

I've tried the change in this job https://ci.hibernate.org/blue/organizations/jenkins/hibernate-search-personal-marko/detail/build%2FHSEARCH-5223-add-source-update-check/3/pipeline/

I'm not sure what's going on with the Avro plugin... when I reverted the changes committed by CI and tried running a build, the Dtos were not updated. Only when I just removed them entirely did they get regenerated, and the imports changed...

so the source modification check won't catch this problem.

I thought about dropping them from git and letting them be generated into target each time, but looking at the comments here https://hibernate.atlassian.net/browse/HSEARCH-4638 .. 😖

I thought about printing the diff if the check fails but then thought that it may be potentially dangerous, so didn't do that 😄


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


@marko-bekhta marko-bekhta force-pushed the build/HSEARCH-5223-add-source-update-check branch from 5605dd2 to 1525da8 Compare August 14, 2024 10:44
@marko-bekhta marko-bekhta force-pushed the build/HSEARCH-5223-add-source-update-check branch from 1525da8 to 334f162 Compare August 20, 2024 07:39
Copy link

sonarcloud bot commented Aug 20, 2024

@marko-bekhta marko-bekhta merged commit b422fef into hibernate:main Aug 21, 2024
8 checks passed
Comment on lines +1166 to +1167
// We are ignoring the failsafe-summary.xml as this file may get modified by integration tests running on
// non-default envs and we don't want to change that at the moment:
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this just be in .gitignore?

In fact I'd put /.empty/* in gitignore; we should never commit anything in a directory named .empty whose only purpose is being empty...

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought about it yes, but there are a couple files in that "empty" directory 🙈 so I thought I'd better keep it as is 😃

Copy link
Member

Choose a reason for hiding this comment

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

Ah, ok, I misunderstood. Yes I see .empty is not supposed to be empty, but .empty/directory is, and .empty/failsafe-summary.xml is actually a checked-in file representing an empty test run.

Now I'm wondering why test runs would end up modifying this file... There must be something wrong :/

Copy link
Member Author

Choose a reason for hiding this comment

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

I noticed that the summary file was only modified by the OpenSearch build (so probably non-default builds that run tests ... ). But if you are saying that it should've stayed unchanged, I'll look into why it gets updated.

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.

2 participants