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

Feature - refactor cron formatting #336

Closed
azeemshaikh38 opened this issue Apr 8, 2021 · 4 comments · Fixed by #344
Closed

Feature - refactor cron formatting #336

azeemshaikh38 opened this issue Apr 8, 2021 · 4 comments · Fixed by #344
Assignees
Labels
kind/enhancement New feature or request

Comments

@azeemshaikh38
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The cron job appends the output of scorecard commandline to an output. This is a problem since, the cron job deals with string output from the scorecard command and tries to get the formatting right.

Describe the solution you'd like
Instead, the cron job should be dealing with in-memory data structure of check results which it can use in any way it likes, including formatting it using pre-existing formatting libraries (like JSON). To do this, we need to refactor such that we have a common library of functions/types which will be used by both the commandline tool as well as the cron job.

@inferno-chromium - this is a fair amount of refactor work, but IMO worth the time/effort. Let me know if this LG to you and I can get started on it.

@azeemshaikh38 azeemshaikh38 added the kind/enhancement New feature or request label Apr 8, 2021
@azeemshaikh38 azeemshaikh38 self-assigned this Apr 8, 2021
@naveensrinivasan
Copy link
Member

Instead, the cron job should be dealing with in-memory data structure of check results which it can use in any way it likes, including formatting it using pre-existing formatting libraries (like JSON). To do this, we need to refactor such that we have a common library of functions/types which will be used by both the commandline tool as well as the cron job.

A good idea IMO. But with the in-memory you could run into memory bottlenecks as we scale to 10,000 -100,000 repository.

Will the solution be an issue for such scales?

@azeemshaikh38
Copy link
Contributor Author

Depends on how we handle the results. We could keep writing to file/DB every time a result comes back or we can batch it to reduce IO. But yes, we mostly will not hold all results in memory at the same time.

@inferno-chromium
Copy link
Contributor

SGTM.

@oliverchang
Copy link
Contributor

Big +1 for this :) This would clean up a lot of how the current outputting is done.

@azeemshaikh38 azeemshaikh38 linked a pull request Apr 14, 2021 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants