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

Enable nightly build with reproducible comparison #714

Merged
merged 12 commits into from
Jun 12, 2023

Conversation

sophia-guo
Copy link
Contributor

@sophia-guo sophia-guo commented Jun 5, 2023

Related adoptium/temurin-build#3245

Signed-off-by: Sophia Guo sophia.gwf@gmail.com

@github-actions
Copy link

github-actions bot commented Jun 5, 2023

Thank you for creating a pull request!

Please check out the information below if you have not made a pull request here before (or if you need a reminder how things work).

Code Quality and Contributing Guidelines

If you have not done so already, please familiarise yourself with our Contributing Guidelines and Code Of Conduct, even if you have contributed before.

Tests

Github actions will run a set of jobs against your PR that will lint and unit test your changes. Keep an eye out for the results from these on the latest commit you submitted. For more information, please see our testing documentation.

In order to run the advanced pipeline tests (executing a set of mock pipelines), it requires an admin to post run tests on this PR.
If you are not an admin, please ask for one's attention in #infrastructure on Slack or ping one here.
To run full set of tests, use "run tests"; a subset of tests on specific jdk version, use "run tests quick 11,20"

@sophia-guo sophia-guo self-assigned this Jun 5, 2023
@sxa
Copy link
Member

sxa commented Jun 5, 2023

Hi - I'd like to just understand the approach since there is no description associated with this PR.

Is this adding an extra step into every nightly build that will rebuild it in parallel with running the normal testing, and verify that it comes out identical? And this is only enabling it on Linux/x64. Is it using the output of the SBOM to perform the second build or just re-running with the same parameters from jenkins?

@sophia-guo sophia-guo force-pushed the reprod branch 4 times, most recently from 3224ffa to 679cfd9 Compare June 5, 2023 15:09
@sophia-guo
Copy link
Contributor Author

Is this adding an extra step into every nightly build that will rebuild it in parallel with running the normal testing, and verify that it comes out identical? And this is only enabling it on Linux/x64. Is it using the output of the SBOM to perform the second build or just re-running with the same parameters from jenkins?

This is to add an extra step to trigger a **_reproduce_compare jenkins job, which will not block current pipeline job.
The **_reproduce_compare jenkins job will trigger a second build job with all same parameters as the current one except the parameters BUILD_REF, SCM_REF, BUILD_ARGS and ENABLE_TESTS. The parameters BUILD_REF, SCM_REF, BUILD_ARGS are set by the current one's SBOM data. The triggered build job output will be compared with the current build job output to see if there is difference.

I have created job https://ci.adoptium.net/job/jdk17u-linux-x64-temurin_reproduce_compare/ for testing, but need admins help to move it to folder build-scripts/jobs/jdk17u/. @sxa @andrew-m-leonard could you please help this?

@sxa
Copy link
Member

sxa commented Jun 5, 2023

Thanks for the explanation. Since this job isn't being auto-generated I would suggest that it may be preferable to keep it outside the normal jdk17u folder to ensure it doesn't get accidentally deleted at any point (someone might think that everything in there can be regenerated automatically).

@sophia-guo sophia-guo force-pushed the reprod branch 3 times, most recently from bd01565 to 73a87bb Compare June 5, 2023 18:18
pipelines/build/common/openjdk_build_pipeline.groovy Outdated Show resolved Hide resolved
pipelines/build/common/openjdk_build_pipeline.groovy Outdated Show resolved Hide resolved
tools/reproduce_comparison/Jenkinsfile Outdated Show resolved Hide resolved
pipelines/build/common/openjdk_build_pipeline.groovy Outdated Show resolved Hide resolved
tools/reproduce_comparison/Jenkinsfile Outdated Show resolved Hide resolved
tools/reproduce_comparison/Jenkinsfile Outdated Show resolved Hide resolved
tools/reproduce_comparison/Jenkinsfile Outdated Show resolved Hide resolved
tools/reproduce_comparison/Jenkinsfile Outdated Show resolved Hide resolved
tools/reproduce_comparison/Jenkinsfile Outdated Show resolved Hide resolved
tools/reproduce_comparison/JenkinsfileOld Outdated Show resolved Hide resolved
@sxa
Copy link
Member

sxa commented Jun 6, 2023

@sophia-guo Can you avoid force pushing on every fix please since it makes it impossible to see what's changed since a reviewer last looked at the code.

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
@sophia-guo
Copy link
Contributor Author

Did a rebase and some changes are accidentally gone.

Can you avoid force pushing on every fix please since it makes it impossible to see what's changed since a reviewer last looked at the code.

@sxa I think with force push the changes since last review can still be available
https://github.com/adoptium/ci-jenkins-pipelines/compare/73a87bb1a396b637c8bab08c5a852ac54abaac29..2be0fecab230acc143eade49bb0eb500c935d1ee

Resubmit the changes

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
Copy link
Contributor

@andrew-m-leonard andrew-m-leonard left a comment

Choose a reason for hiding this comment

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

just a couple of comments

tools/reproduce_comparison/Jenkinsfile Outdated Show resolved Hide resolved
tools/reproduce_comparison/Jenkinsfile Outdated Show resolved Hide resolved
@github-actions github-actions bot added documentation generation Issues that provide enhancements or fixes to the job generators labels Jun 7, 2023
Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
docs/UsingOurScripts.md Outdated Show resolved Hide resolved
pipelines/build/common/build_base_file.groovy Show resolved Hide resolved
pipelines/jobs/release_pipeline_job_template.groovy Outdated Show resolved Hide resolved
tools/reproduce_comparison/Jenkinsfile Outdated Show resolved Hide resolved
tools/reproduce_comparison/Jenkinsfile Outdated Show resolved Hide resolved
tools/reproduce_comparison/Jenkinsfile Outdated Show resolved Hide resolved
tools/reproduce_comparison/Jenkinsfile Outdated Show resolved Hide resolved
@karianna
Copy link
Contributor

karianna commented Jun 8, 2023

Some more linter and test fixes needed

@sxa
Copy link
Member

sxa commented Jun 8, 2023

Did a rebase and some changes are accidentally gone.

Can you avoid force pushing on every fix please since it makes it impossible to see what's changed since a reviewer last looked at the code.

@sxa I think with force push the changes since last review can still be available https://github.com/adoptium/ci-jenkins-pipelines/compare/73a87bb1a396b637c8bab08c5a852ac54abaac29..2be0fecab230acc143eade49bb0eb500c935d1ee

Yes you can get to it but it's a bit more difficult to find them, especially if there have been multiple force pushes.

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
@@ -79,7 +79,7 @@ This file contains the default constants and paths used in the build scripts for
// Test suite and inclusion details
"testDetails" : {
// Boolean denoting wether the reproducible compare is needed
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Boolean denoting wether the reproducible compare is needed
// Boolean denoting whether the reproducible compare is needed

@sophia-guo
Copy link
Contributor Author

Note the test failed at https://github.com/adoptium/ci-jenkins-pipelines/pull/714/files#diff-fc15f6bbd3ef3cf595558447270454056407397071c7efbd13ca516fcf0a3a5bR66. Test is using master default.json, which has not been updated with this PR

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
@sophia-guo
Copy link
Contributor Author

Depends adoptium/temurin-build#3386

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
@sophia-guo sophia-guo force-pushed the reprod branch 2 times, most recently from 10fdd38 to cf01432 Compare June 12, 2023 13:36
Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
Copy link
Contributor

@andrew-m-leonard andrew-m-leonard left a comment

Choose a reason for hiding this comment

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

nice work @sophia-guo

Copy link
Contributor

@andrew-m-leonard andrew-m-leonard left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@andrew-m-leonard andrew-m-leonard left a comment

Choose a reason for hiding this comment

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

lgtm

@andrew-m-leonard
Copy link
Contributor

Just an update to https://raw.githubusercontent.com/adoptium/ci-jenkins-pipelines/master/pipelines/defaults.json required

Has been updated...

@sophia-guo sophia-guo merged commit 96e14e1 into adoptium:master Jun 12, 2023
6 of 7 checks passed
@sxa
Copy link
Member

sxa commented Jun 12, 2023

Is the failing Groovy check a concern here?

@sophia-guo
Copy link
Contributor Author

sophia-guo commented Jun 12, 2023

Is the failing Groovy check a concern here?

Shouldn't. See
#714 (comment)

luhenry pushed a commit to luhenry/adoptium-ci-jenkins-pipelines that referenced this pull request Feb 3, 2024
* Add detail error messages

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>

* Enable nightly reproducible comparison

Resubmit the changes

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>

* Correct lint error

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>

* Add enableReproducibleCompare flag

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>

* Set reproducible job ENABLE_REPRODUCIBLE_COMPARE false

Avoid recursive build

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>

* Update build timestamp

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>

* Format update

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>

* Update test case

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>

* Remove unnecessary file permission step

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>

* Typo

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>

* Fix isRelease and params correctly

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>

* Limit json file to SBOM specific and remove unnecessary code

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>

---------

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation generation Issues that provide enhancements or fixes to the job generators jenkins-pipeline testing
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants