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

Enhance SBOM and JDK file check #4078

Merged
merged 6 commits into from
Dec 8, 2024
Merged

Enhance SBOM and JDK file check #4078

merged 6 commits into from
Dec 8, 2024

Conversation

sophia-guo
Copy link
Contributor

@sophia-guo sophia-guo commented Dec 4, 2024

Fixes #4079

If no SBOM and JDK file available fail the job.

Related #4079

@github-actions github-actions bot added the testing Issues that enhance or fix our test suites label Dec 4, 2024
@sophia-guo
Copy link
Contributor Author

Copy link
Contributor

@smlambert smlambert left a comment

Choose a reason for hiding this comment

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

LGTM

One question, did you intend to lose the indentation within the ifndef blocks of the .mk file?

SBOM_FILE := $(TEST_ROOT)/../jdkbinary/$(SBOM_FILE)
SBOM_FILE := $(shell ls $(TEST_ROOT)/../jdkbinary/ | grep "sbom" | grep -v "metadata")
ifeq ($(strip $(SBOM_FILE)),)
$(error ERROR! NO SBOM_FILE AVAILABLE)
Copy link
Contributor

Choose a reason for hiding this comment

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

whitespace probably needs fixing

Copy link
Member

@sxa sxa left a comment

Choose a reason for hiding this comment

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

https://ci.adoptium.net/job/Test_openjdk21_hs_special.system_x86-64_windows/26/console

I was expecting that link to be a re-run with the fix that showed the fix, but that is my original failing job link :-)

I guess it's not easy to run a re-test with an updated openjdk-build repo, so we can integrate this and then I can run the test against it again

Since it's been flagged by the other two above, I think it's worth fixing the whitespace issues (Blocking for now in case someone else merges this before you see the comments)

@sophia-guo
Copy link
Contributor Author

@sophia-guo sophia-guo marked this pull request as draft December 5, 2024 14:49
@sophia-guo
Copy link
Contributor Author

https://ci.adoptium.net/view/Test_grinder/job/Grinder/11936/console

This failure in makefile will fail the job and hence no other tests in same level will run and no test output will be archived. Currently no other tests in special.system, but it's not a good solution. Change it to draft.

@sxa
Copy link
Member

sxa commented Dec 5, 2024

https://ci.adoptium.net/job/Test_openjdk21_hs_special.system_x86-64_windows/26/console is using my personal branch. @sxa

Ah yes - I hadn't looked at VENDOR_TEST_REPO before and I was searching the log for ERROR! as per:

error ERROR! NO SBOM_FILE AVAILABLE

but that doesn't appear. We only get:

21:32:32  reproducible.mk:17: *** no SBOM_FILE available.  Stop.

(Maybe it was changed since you ran the job). But LGTM now - thanks for the fix, but I agree on your last comment that it would be good for it to fail in a different way if possible.

@sophia-guo sophia-guo force-pushed the win branch 2 times, most recently from 1774f39 to d7046cd Compare December 5, 2024 15:13
@sophia-guo
Copy link
Contributor Author

Updated. Print ERROR message and usage infor.
https://ci.adoptium.net/job/Grinder/11939/ - fail the test itself with ERROR message.
https://ci.adoptium.net/job/Grinder/11943/ - manually abort after the test start running.

@sophia-guo sophia-guo marked this pull request as ready for review December 5, 2024 15:57
Copy link
Member

@sxa sxa left a comment

Choose a reason for hiding this comment

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

Updated. Print ERROR message and usage infor. https://ci.adoptium.net/job/Grinder/11939/

Just a minor point - it might be nicer if the error was inside the Running test block, but otherwise this LGTM and I'm fine with it going in like this!

15:12:19  ERROR! NO SBOM_FILE AVAILABLE
15:12:19  
15:12:19  ===============================================
15:12:19  Running test Rebuild_Same_JDK_Reproducibility_Test_win_0 ...
15:12:19  ===============================================

@sophia-guo
Copy link
Contributor Author

sophia-guo commented Dec 6, 2024

Inside the running test: it shows the usage of windows_repro_build_compare.sh information, which means parameters are missing. ERROR! NO SBOM_FILE AVAILABLE helps to know which parameter is missing.

10:12:20  Usage: C:/jenkins/workspace/Grinder/aqa-tests/\system\reproducibleCompare\windows_repro_build_compare.sh SBOM_URL/SBOM_PATH JDKZIP_URL/JDKZIP_PATH
10:12:20  
10:12:20  1. SBOM_URL/SBOM_PATH - should be the FULL path OR a URL to a Temurin JDK SBOM JSON file in CycloneDX Format
10:12:20      eg. https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-sbom_x64_windows_hotspot_21.0.2_13.json
10:12:20  
10:12:20  2. JDKZIP_URL/JDKZIP_PATH - should be the FULL path OR a URL to a Temurin Windows JDK Zip file
10:12:20      eg. https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.2%2B13/OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13.zip
10:12:20  
10:12:20  3. REPORT_DIR - should be the FULL path OR a URL to the output directory for the comparison report
1

@karianna karianna merged commit 10376ad into adoptium:master Dec 8, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Issues that enhance or fix our test suites
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rebuild_Same_JDK_Reproducibility_Test_win_0 fails without SBoM
5 participants