-
Notifications
You must be signed in to change notification settings - Fork 6
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
Generate third-party snapshots and reports #40
Conversation
…r containing the list of third-party report IDs
…metrics in output
Minor post-blackening cleanup of a concatenated string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems logical and well thought out. Nice work 👍 Just a couple minor quibbles.
Also I'm not sure if it's worth it, but I do wonder if we should do a pass at some point to make the string formatting methods uniform. The older code is using printf style and newer pieces (including what you've added) uses the str.format() style. Just something to consider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I'm not sure if it's worth it, but I do wonder if we should do a pass at some point to make the string formatting methods uniform. The older code is using printf style and newer pieces (including what you've added) uses the str.format() style. Just something to consider.
I don't disagree with you @mcdonnnj, but I didn't want to spend any more time touching code that was unaffected by this change. Some things will just have remain ugly for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved. Just needs some info on that SSM thang.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
This PR updates
extras/create_snapshots_reports_scorecard.py
with the ability to fetch a list of third-party report organization IDs (via a newly-created report type"CYHY_THIRD_PARTY"
- see cisagov/cyhy-core#35), then create snapshots and reports for those third-parties.Notes:
--use-only-existing-snapshots
flag, which means that the third-party snapshot will simply roll up the results from the latest snapshot for each child of the third-party org. This avoids the undesirable situation where an org gets one snapshot created for it's own report and a second snapshot created for the third-party report.reports
collection, just like regular customer CyHy reports are.create_snapshots_reports_scorecard.py
, so you may find it easier to review these changes in the individual commits.For additional details, refer to CYHYDEV-780.