diff --git a/local-app/python-tools/cross-organization/purge_check_s3_buckets.py b/local-app/python-tools/cross-organization/purge_check_s3_buckets.py index b45955a1..3b985d27 100755 --- a/local-app/python-tools/cross-organization/purge_check_s3_buckets.py +++ b/local-app/python-tools/cross-organization/purge_check_s3_buckets.py @@ -18,7 +18,7 @@ from rich.progress import Progress, BarColumn, TextColumn, TimeElapsedColumn, SpinnerColumn # --- VERSIONING --- -__version__ = "2.2.0" +__version__ = "2.3.0" console = Console() @@ -75,7 +75,6 @@ def purge_bucket_worker_task(target_block, role_name, primary_region, dry_run, a def update_lane_ui(current_msg, total_weight): if progress_queue: progress_queue.put({ - "account_name": account_name, "bucket_name": bucket_name, "task_index": task_index, "current_test": current_msg, @@ -231,11 +230,11 @@ def main(): ) macro_task_id = overall_progress.add_task("Purge Fleet", total=len(targets)) - # --- FIXED: Extended BarColumn width parameters to 45 to eliminate clipping on long names --- + # --- FIXED: Isolate pure full bucket namespace variable mapping outputs --- lane_progress = Progress( TextColumn("[bold blue]Lane #{task.fields[lane_idx]}[/bold blue]"), - TextColumn("([bold white]{task.fields[combined_label]}[/bold white])"), - BarColumn(bar_width=45), + TextColumn("([bold white]{task.fields[bucket_name]}[/bold white])"), + BarColumn(bar_width=30), TextColumn("[progress.percentage]{task.percentage:>3.0f}%"), TextColumn("[bold yellow]{task.fields[current_test]}/{task.fields[total_tests]}[/bold yellow]"), TimeElapsedColumn() @@ -244,7 +243,7 @@ def main(): render_lanes_count = min(args.workers, len(targets)) lane_task_ids = {} for i in range(render_lanes_count): - tid = lane_progress.add_task("Awaiting batch assignment", total=100, lane_idx=i, combined_label="IDLE", current_test="START", total_tests="0") + tid = lane_progress.add_task("Awaiting batch assignment", total=100, lane_idx=i, bucket_name="IDLE", current_test="START", total_tests="0") lane_task_ids[i] = tid progress_table.add_row(overall_progress) @@ -276,16 +275,10 @@ def main(): pct = int((current_val / total_w) * 100) if total_w > 0 else 0 if pct > 100: pct = 100 - # --- FIXED: Injected account alias mapping targets directly inside the lane label string --- - a_display = signal["account_name"] + # --- FIXED: Pass full string directly to layout engine with zero index clipping boundaries --- b_display = signal["bucket_name"] - - # Concatenate and cleanly truncate to ensure text doesn't overflow terminal screen width boundaries - combined_str = f"{a_display} | {b_display}" - if len(combined_str) > 42: - combined_str = f"{a_display[:12]}.. | ..{b_display[-22:]}" - lane_progress.update(t_id, combined_label=combined_str, completed=pct, current_test=signal["current_test"], total_tests=signal["total_tests"]) + lane_progress.update(t_id, bucket_name=b_display, completed=pct, current_test=signal["current_test"], total_tests=signal["total_tests"]) except queue.Empty: break @@ -306,7 +299,7 @@ def main(): }) overall_progress.update(macro_task_id, advance=1) - lane_progress.update(lane_task_ids[assigned_lane], combined_label="IDLE", completed=0, current_test="IDLE", total_tests="0") + lane_progress.update(lane_task_ids[assigned_lane], bucket_name="IDLE", completed=0, current_test="IDLE", total_tests="0") time.sleep(0.05) global_end_epoch = time.time()