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

chore: improve progress bars in cloud-linter #328

Merged
merged 2 commits into from
Jun 6, 2024
Merged

Conversation

nand4011
Copy link
Contributor

@nand4011 nand4011 commented Jun 5, 2024

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.

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.
@nand4011 nand4011 requested review from cprice404, bruuuuuuuce and a team June 5, 2024 22:50
@@ -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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too funny

cprice404
cprice404 previously approved these changes Jun 5, 2024
Copy link
Contributor

@cprice404 cprice404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dope

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
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

Copy link
Contributor

@bruuuuuuuce bruuuuuuuce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@nand4011 nand4011 merged commit 7664098 into main Jun 6, 2024
3 checks passed
@nand4011 nand4011 deleted the improve-progress-bars branch June 6, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants