fallintoplace opened a new pull request, #57545:
URL: https://github.com/apache/spark/pull/57545
### What changes were proposed in this pull request?
Update the running-task and stage state before rendering the Spark Connect
progress bar. Add a regression assertion for the displayed running-task count.
### Why are the changes needed?
`Progress.update_ticks()` previously called `output()` before storing the
latest `inflight_tasks` value. Each progress message therefore displayed the
running-task count from the previous update.
For example, the first update with 10 running tasks displayed `0 Tasks
running`. This change ensures that the rendered message uses values from the
same progress update.
### Does this PR introduce _any_ user-facing change?
Yes. The Spark Connect progress bar now displays the current running-task
count instead of the count from the previous update.
### How was this patch tested?
Added a regression assertion to `ProgressBarTest.test_simple_progress`.
PYTHONPATH=python python -m unittest \
pyspark.sql.tests.connect.shell.test_progress.ProgressBarTest
All five tests passed. Ruff lint and formatting checks also passed.
### Was this patch authored or co-authored using generative AI tooling?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]