zalando-stups / fullstop-cli

Simple command line utility to view and resolve fullstop. violations
https://pypi.python.org/pypi/stups-fullstop/
Other
3 stars 5 forks source link

list-violations do not show anything #18

Open ZroMnc opened 8 years ago

ZroMnc commented 8 years ago

When listing violations without the the --type and -s flag the result is none.

When searching with the -t and -sflag it all of a sudden work.

Example:

cviola@callisto ! ~  $ fullstop list-violations
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created

Here its working

cviola@callisto | ~  $ fullstop list-violations -s 10d -t VIOLATION
Account Id  │Region   │Violation Type            │Instance Id│Meta Info              │Comment│Created
123456 eu-west-1 VIOLATION 0987654  application_id: my_app          9d ago
123456 eu-west-1 VIOLATION 0987654  application_id: my_app         7d ago

Please fix #

hjacobs commented 8 years ago

@cgmv did you do fullstop configure to set your account IDs?

ZroMnc commented 8 years ago

Yes I did - all three accounts are set

hjacobs commented 8 years ago

@cgmv probably the last 7 days yielded no results (default is 7 days), that's why you don't get rows without the --since option.

ZroMnc commented 8 years ago

@hjacobs seems like not the case:

$ foo=$(fullstop type | awk '{print $1}')

$ for i in ${foo[@]}; do fullstop list-violations -s 6d -l 1000 -t $i; done
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id  │Region   │Violation Type    │Instance Id│Meta Info                                                                                                                                                           │Comment│Created
01234567 eu-west-1 MISSING_SPEC_LINKS             application_id: my_app, invalid_commits: 98432549832,     (0.6.2), repository: ''************************''                  6d ago
1234567 eu-west-1 MISSING_SPEC_LINKS             application_id: my_app, invalid_commits: 98432549832,     (0.6.2), repository: '************************'          6d ago
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
Account Id│Region│Violation Type│Instance Id│Meta Info│Comment│Created
cviola@callisto | ~  $
dcherepovsky commented 7 years ago

Same for me. But no flags help.

harti2006 commented 7 years ago

The issue of @dcherepovsky could be solved by applying the AWS account ID (not name) to fullstop configure. Not sure if it is still relevant for you @cgmv, otherwise I would like to close the issue.

dcherepovsky commented 7 years ago

@harti2006 : I would recommend to change the default value, recommended by fullstop configure, to the account ID instead of account name in the scope of current issue.

harti2006 commented 7 years ago

Oh, this is clearly a bug. True.