fossa-cli icon indicating copy to clipboard operation
fossa-cli copied to clipboard

[ANE-380] Waits for revision cache before producing report

Open meghfossa opened this issue 3 years ago • 0 comments

Overview

This PR modified the report command such that,

  • If the endpoint server supports polling for revision's dependency cache status, we poll until READY status is received
  • If the endpoint server does not support polling for revision's dependency cache status, we wait for the issues scan (this is current behaviour)

Acceptance criteria

  • If the endpoint server supports polling for revision's dependency cache status, we poll until the READY status is received
  • If the endpoint server does not support polling for revision's dependency cache status, we wait for the issues scan (this is current behaviour)

Testing plan

Sibing PR: https://github.com/fossas/FOSSA/pull/8522.

  1. Perform git checkout master && git pull origin && git checkout feat/adds-report-polling && make install-local
  2. Ensure your LOCAL endpoint is at: https://github.com/fossas/FOSSA/pull/8522.
  3. Perform until Step 3 from the sibling PR testing plan.
  4. Perform
./fossa report attribution --format json --project ane380 --revision 0 --endpoint http://localhost:9578 --fossa-api-key <API-KEY>
  1. Perform Step 4 from the sibling PR testing plan.
  2. CLI should successfully produce the report.

Risks

N/A

References

ANE-380

Checklist

  • [x] I added tests for this PR's change (or explained in the PR description why tests don't make sense).
  • [ ] If this PR introduced a user-visible change, I added documentation into docs/.
  • [x] If this change is externally visible, I updated Changelog.md. If this PR did not mark a release, I added my changes into an # Unreleased section at the top.
  • [x] If I made changes to .fossa.yml or fossa-deps.{json.yml}, I updated docs/references/files/*.schema.json. 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).

meghfossa avatar Oct 06 '22 23:10 meghfossa