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

Reproducible comparing using sbom json file got fatal: Not a valid object name jdk-21.0.3+6_adopt-266-ge01a50b2cac #3710

Open
sophia-guo opened this issue Mar 18, 2024 · 5 comments

Comments

@sophia-guo
Copy link
Contributor

Linux_repro_build_compare.sh use sbom jason file to reproduce jdk build got error message fatal: Not a valid object name jdk-21.0.3+6_adopt-266-ge01a50b2cac, which is the value of SCM_Ref in SBOM json file.

@sophia-guo
Copy link
Contributor Author

sophia-guo commented Mar 18, 2024

@andrew-m-leonard The following value format of SCM Ref in SBOM file is expected?

    {
      "name" : "SCM Ref",
      "value" : "jdk-21.0.3+6_adopt-268-g7e3ae202eaf"
    },

@andrew-m-leonard
Copy link
Contributor

@andrew-m-leonard The following value format of SCM Ref in SBOM file is expected?

    {
      "name" : "SCM Ref",
      "value" : "jdk-21.0.3+6_adopt-268-g7e3ae202eaf"
    },

@sophia-guo
So I think that's because the original build did not specify an SCM_REF, hence building from HEAD, so it's not building from a tag that can be precisely described..? Can you try a build which uses a specific SCM_REF ?

@sophia-guo sophia-guo changed the title Reproduciable comparing using sbom json file got fatal: Not a valid object name jdk-21.0.3+6_adopt-266-ge01a50b2cac Reproducible comparing using sbom json file got fatal: Not a valid object name jdk-21.0.3+6_adopt-266-ge01a50b2cac Mar 18, 2024
@sophia-guo
Copy link
Contributor Author

Yes, that happened to build with SCM_REF="".

@sophia-guo
Copy link
Contributor Author

@andrew-m-leonard SCM_REF="" corresponding sbom file " value" is not null. "value" : "jdk-21.0.3+6_adopt-268-g7e3ae202eaf". In this case reproducible comparison should not be supported? Should this case generate sbom file?

@andrew-m-leonard
Copy link
Contributor

@andrew-m-leonard SCM_REF="" corresponding sbom file " value" is not null. "value" : "jdk-21.0.3+6_adopt-268-g7e3ae202eaf". In this case reproducible comparison should not be supported? Should this case generate sbom file?

@sophia-guo i'm not sure this is quite right, we may need to fix something there...
The "SCM Ref" in the SBOM comes from scmref.txt, which if SCM_REF is specified on the job should be identical, if SCM_REF was not specified, ie.building HEAD, then scmref.txt and thus SBOM->"SCM Ref" comes from a "git describe...", and I think the short SHA at the end, ie."g7e3ae202eaf" should be able to be checked out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants