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

kie-issues#1352: Enforce reproducible build on kie-tools #2455

Merged
merged 4 commits into from
Jun 28, 2024

Conversation

pefernan
Copy link
Contributor

Copy link
Contributor

@tiagobento tiagobento left a comment

Choose a reason for hiding this comment

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

Hi @pefernan! Amazing solution. Glad to see you digging deep. I left some comments inline, especially trying to make it even more concise. Love the README.md notes and please don't forget to update them after incorporating changes.

packages/extended-services-java/install.js Outdated Show resolved Hide resolved
packages/maven-base/not-reproducible-plugins.properties Outdated Show resolved Hide resolved
Comment on lines +227 to +235
<property>
<name>reproducible</name>
</property>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we change the activation to

<activation>
      <activeByDefault>false</activeByDefault>
</activation>

and use -P instead of -D to activate it on packages? I'm being extra careful here because managing profiles on a env-var-parameterized repo can become messy really quickly. I respect the extra care you had to only add it on build:prod scripts, but I'd love if we could do this extra step too.

Copy link
Contributor

@gitgabrio gitgabrio Jun 28, 2024

Choose a reason for hiding this comment

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

@tiagobento about -P and -D: I personally have no strong opinion (TBH, I also prefer the -P approach), but, as we agreed upon about other topic, we must consider all our codebase as a single unit, and strive for consistency. For some reason, the -Dapproach is used elsewhere, so I think it is better to enforce this kind of consistency. Needless to say that consistency and clear conventions is the key to avoid a manually crafted, long-time consuming maintenance (in that specific case, I think we must get to the point that all such cloned/copied stuff lives in one single place, and note duplicated over and over)

Copy link
Contributor

Choose a reason for hiding this comment

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

@pefernan
I think @tiagobento is right about the

<activeByDefault>false</activeByDefault>

config

packages/maven-base/pom.xml Outdated Show resolved Hide resolved

<profiles>
<profile>
<id>reproducible-build</id>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<id>reproducible-build</id>
<id>reproducible</id>

?

Copy link
Contributor

@tiagobento tiagobento Jun 27, 2024

Choose a reason for hiding this comment

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

See my other comment on this file...

Copy link
Contributor

@gitgabrio gitgabrio Jun 28, 2024

Choose a reason for hiding this comment

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

@tiagobento this is exactly the same config used all over other repositories, included the reproducible-build id. Again, it is not important one way or the other, but it is important tha we have the same configurations all over our codebase: I already stumbled on the fact that the full flag has a slightly different meaning between some repository, and I want to avoid to increase such kind of entropy. Moreover, if, ever, we'll get to an easy and simple CI configuration, having the same profile named same way all over our code would be surely beneficial.

packages/maven-base/env/index.js Outdated Show resolved Hide resolved
@tiagobento
Copy link
Contributor

btw @gitgabrio this being in the build:prod script will make all builds reproducibility checked on all invocations of build:prod anywhere (including the CI and PR checks) 👍

@pefernan
Copy link
Contributor Author

pefernan commented Jun 28, 2024

@tiagobento in this case, just to keep the consistency with other repos, I'll +1 to @gitgabrio proposal to keep the profile as it is. But if there's a problem in CI I won't fight to change it

Copy link
Contributor

@gitgabrio gitgabrio left a comment

Choose a reason for hiding this comment

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

Hi @pefernan Thanks for all your effort in this PR.
I agree with @tiagobento to add the activeByDefault to false, even if it should be already implicitly so

Comment on lines +227 to +235
<property>
<name>reproducible</name>
</property>
Copy link
Contributor

Choose a reason for hiding this comment

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

@pefernan
I think @tiagobento is right about the

<activeByDefault>false</activeByDefault>

config

Copy link
Contributor

@gitgabrio gitgabrio left a comment

Choose a reason for hiding this comment

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

Great jog @pefernan !!!

@tiagobento tiagobento merged commit 370460d into apache:main Jun 28, 2024
14 checks passed
fantonangeli added a commit to fantonangeli/kie-tools that referenced this pull request Oct 25, 2024
rgdoliveira pushed a commit to kiegroup/kie-tools that referenced this pull request Oct 25, 2024
…changes (#57)

* Apply updates from apache#2635

* Updates from
apache#2455

* Updates from apache#2376

* Fixed wrong value for SONATAFLOW_MANAGEMENT_CONSOLE_WEBAPP__sonataflowEnvMode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:cicd area:monorepo lang:java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enforce reproducible build on kie-tools
3 participants