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

Adds optional pipeline to add features to issues #39

Closed
wants to merge 1 commit into from
Closed

Adds optional pipeline to add features to issues #39

wants to merge 1 commit into from

Conversation

abishekvashok
Copy link
Contributor

@abishekvashok abishekvashok commented Aug 6, 2021

Adds optional pipeline to add features to all issues using the sapp
analyze command. All features provided using the --add-feature
flag/option shall be added to all existing issues associated with the
run. If no features are provided, the pipeline just passes the input as
the output (fall-through).

Signed-off-by: Abishek V Ashok abishekvashok@gmail.com
Fixes: MLH-Fellowship/pyre-check#47

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 6, 2021
@abishekvashok
Copy link
Contributor Author

Testing steps done:
Adding two features (one new, other existing) to be associated with all issues:

python3 -m sapp.cli analyze taint-output.json --add-feature feature:custom-demo-feature --add-feature always-type:scalar

Result:
Screenshot 2021-08-06 at 1 22 50 PM

@abishekvashok
Copy link
Contributor Author

The issues raised by flake8 and black aren't related to this PR. Since, it is persisting, I thought I would fix them for easier work flow for everyone. Hence made a PR: #40

Copy link

@r0rshark r0rshark left a comment

Choose a reason for hiding this comment

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

Thanks! After reviewing the logic I think it make more sense to only affect the imported issues not all the one currently stored

sapp/pipeline/add_features.py Outdated Show resolved Hide resolved
@abishekvashok
Copy link
Contributor Author

@r0rshark pushed the pipeline up the order as discussed. Now it's short and crisp :) (changes screenshot remains the same)

sapp/pipeline/add_features.py Outdated Show resolved Hide resolved
sapp/pipeline/add_features.py Outdated Show resolved Hide resolved
Adds optional pipeline to add features to all issues using the sapp
analyze command. All features provided using the --add-feature
flag/option shall be added to all existing issues associated with the
run. If no features are provided, the pipeline just passes the input as
the output (fall-through).

Signed-off-by: Abishek V Ashok <abishekvashok@gmail.com>
@abishekvashok
Copy link
Contributor Author

@gbleaney thanks for the comments. Fixed all pyre bugs with your suggestions (I had to use input["issues"] = [issue ...] over for issue in input["issue"] though! I hope you don't mind that!

@facebook-github-bot
Copy link
Contributor

@r0rshark has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@r0rshark merged this pull request in b639d7f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Summer 2021] SAPP Cli add support for AddFeature Pipeline
4 participants