Conversation
changelog: Internal, Reporting, Add data-pull subtask to streamling IG reports
| end | ||
|
|
||
| result = subtask_class.new.run(args: argv, include_missing: config.include_missing?) | ||
| result = subtask_class.new.run(args: argv, config:) |
There was a problem hiding this comment.
cc @olatifflexion this is definitely going to cause merge conflicts with your branch to add a new task, sorry! I think it should be pretty stable now
| class InspectorGeneralRequest | ||
| def run(args:, config:) | ||
| require 'data_requests/deployed' | ||
| ActiveRecord::Base.connection.execute('SET statement_timeout = 0') |
There was a problem hiding this comment.
Is this safe because this is a one-off command invocation, thus not using a connection pool where this might affect other queries?
There was a problem hiding this comment.
Yeah it'll be run in its own process outside of any web requests
| 'uuid-lookup' => UuidLookup, | ||
| 'uuid-convert' => UuidConvert, | ||
| 'email-lookup' => EmailLookup, | ||
| 'ig-request' => InspectorGeneralRequest, |
There was a problem hiding this comment.
Petty nit: the existing naming convention seems to be things you can look up about a user/account -- their uuid, their email, but not their Inspector General. Would this make more sense as shared-devices or something? It's actually not abundantly clear to me what this is for.
That said, that may be the point?
There was a problem hiding this comment.
The inspector general is a GSA office, so we're running the standard report with the attributes that the GSA office asks for. And the final export of this includes more than just their devices so I feel like that name might sell it short
remove comment
🛠 Summary of changes
Takes advantage of our new
data-pullinfra to allow for pulling data from prod in a batched way.Once merged, this will let us replace the first two separate tasks in our guide:
data_requests:lookup_users_by_devicedata_requests:create_users_reportwith one task we can run right from local devops repo:
and it'll print the JSON right there