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

[ANE-591] deprecates --json to favor --format json for fossa test and fossa container test #1109

Merged
merged 4 commits into from
Nov 22, 2022

Conversation

meghfossa
Copy link
Contributor

@meghfossa meghfossa commented Nov 18, 2022

Overview

This PR;

  • deprecates --json to favor --format json for fossa test and fossa container test

Acceptance criteria

Don't break existing users, but display warnings:

  • when user uses fossa test --json a warning is displayed AND JSON output if rendered
  • when user uses fossa container test --json a warning is displayed AND JSON output if rendered

New method works:

  • when user uses fossa test --format json, JSON output if rendered.
  • when user uses fossa container test --format json, JSON output if rendered.

Testing plan

fossa test

# Setup
git checkout feat/deprecate-fossa-test-json
make install-local
mkdir sandbox && echo 'black' > sandbox/reqs.txt
./fossa analyze sandbox --project  ane591 --revision 0

# Act

## No regression
./fossa test --project  ane591 --revision 0

## new fmt works
./fossa test --project  ane591 --revision 0 --format json

## warning is rendered
## same output as `fossa test --project  ane591 --revision 0 --format json`
./fossa test --project  ane591 --revision 0 --json

fossa container test

# Setup
git checkout feat/deprecate-fossa-test-json
make install-local
./fossa container analyze redis:alpine --project  ane591container --revision 0

# Act

## No regression
./fossa container test --project  ane591container --revision 0

## new fmt works
./fossa container test --project  ane591container --revision 0 --format json

## warning is rendered
## same output as `fossa test --project  ane591container --revision 0 --format json`
./fossa container test --project  ane591container --revision 0 --json

Risks

Low risk

References

https://fossa.atlassian.net/browse/ANE-591

Checklist

  • 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/.
  • 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.
  • 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 meghfossa changed the title deprecates --json for fossa test command [ANE-591] deprecates --json to favor --format json for fossa test and fossa container test Nov 18, 2022
@meghfossa meghfossa marked this pull request as ready for review November 18, 2022 21:37
@meghfossa meghfossa requested a review from a team as a code owner November 18, 2022 21:37
Copy link
Contributor

@spatten spatten left a comment

Choose a reason for hiding this comment

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

LGTM!

@meghfossa meghfossa merged commit 139cc4d into master Nov 22, 2022
@meghfossa meghfossa deleted the feat/deprecate-fossa-test-json branch November 22, 2022 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants