-
Notifications
You must be signed in to change notification settings - Fork 10
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
chore: improve progress bars in cloud-linter #328
Conversation
Separate the metrics calls from the describe tables calls for elasticache and serverless elasticache. This lets us use a spinner for the describe calls, and then a standard progress bar for the metrics calls. Remove an extra call to increment the s3 progress bar. Add a progress bar to display that we are writing out the results file. Misc linter fixes.
@@ -258,7 +258,6 @@ async fn process_buckets( | |||
let region_clone = region.to_string().clone(); | |||
let progress_bar_clone = process_buckets_bar.clone(); | |||
let spawn = tokio::spawn(async move { | |||
progress_bar_clone.inc(1); |
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.
too funny
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.
Let's let @bruuuuuuuce look too tho
Break the ElastiCache resources into chunks to append metrics and send them to the output writer.
.append_metrics(metrics_client, Arc::clone(&metrics_limiter)) | ||
.await?; | ||
while !resources.is_empty() { | ||
let chunk: Vec<ServerlessElastiCacheResource> = resources |
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.
i like this way better than how I was doing this :fistbump:. Not for this pr, but would be nice to have a higher level function around this, to just DRY up the code around this
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.
Agreed.
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.
Separate the metrics calls from the describe tables calls for elasticache and serverless elasticache. This lets us use a spinner for the describe calls, and then a standard progress bar for the metrics calls.
Remove an extra call to increment the s3 progress bar.
Add a progress bar to display that we are writing out the results file.
Misc linter fixes.