Closed gilfaizon closed 2 months ago
@csasarak does your work on Core affect this ticket at all?
I don't think it does directly because in this case we're validating the OS against a list internal to the CLI. We actually do support Rocky Linux in our backend so I think it's OK to merge this PR.
However, the future "correct" solution I think is to either not validate or fetch a list of valid distributions at some point during analysis and validate against that. In the future if we're able to more easily add support for other Linux distributions we don't want to be forced to coordinate new CLI releases with the addition of that support. So I think I'd also be good with a version of this that either warns or doesn't do the check at all.
@spatten If you want to we can open up a discussion internally but I think the above is what we ought to do.
I guess one possible reason to do the validation here is to potentially lessen the load on Core. I think if Core can't handle that we should figure out a way to fix it rather than maintaining this logic IMO.
I guess one possible reason to do the validation here is to potentially lessen the load on Core. I think if Core can't handle that we should figure out a way to fix it rather than maintaining this logic IMO.
However, the future "correct" solution I think is to either not validate or fetch a list of valid distributions at some point during analysis and validate against that. In the future if we're able to more easily add support for other Linux distributions we don't want to be forced to coordinate new CLI releases with the addition of that support. So I think I'd also be good with a version of this that either warns or doesn't do the check at all.
I agree with that. This PR is still worth merging, but in the future we should skip validation or move the validation to Core
Overview
If using
rocky
as an os in the fossa-deps.yml, fossa will fail to read the fossa-deps file with the following error:This aims to fix that, and allow the use of rocky for rpm-generic deps. It also updates the fossa-deps schema.
Acceptance criteria
FOSSA CLI analysis does not fail when using
rocky
as an os value.Testing plan
I created a fossa-deps.yml with the follwing:
This will fail on fossa-cli versions outside of this branch.
I tested by downloading the built MacOS arm build from this run:
My scan was successful, and the dependency was included in my FOSSA project.
Risks
I looked at this very quickly; I may have missed a spot where I need to update the OS, or provide additional info.
References
N/A
Checklist
docs/
.docs/README.ms
and gave consideration to how discoverable or not my documentation is.Changelog.md
. If this PR did not mark a release, I added my changes into an# Unreleased
section at the top..fossa.yml
orfossa-deps.{json.yml}
, I updateddocs/references/files/*.schema.json
AND I have updated example files used byfossa init
command. You may also need to update these if you have added/removed new dependency type (e.g.pip
) or analysis target type (e.g.poetry
).docs/references/subcommands/<subcommand>.md
.