-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Enhance elapsed time display in UI Hook with minutes and seconds #36618
Conversation
Thanks for this submission! |
Thank you! I'm excited to start contributing to Terraform, as I use it frequently at work and truly enjoy the technology. Since this is my first time contributing to open-source projects, I’d like to understand the best ways to help. Would resolving open issues be a good approach, or are there other recommended ways to contribute? Additionally, I’d like to better understand how I can assist with this specific issue. It seems that only someone from HashiCorp can authorize my testing on Vercel. I attempted the procedure, but it requires authorization from someone at Vercel. |
The first thing is to read https://github.com/hashicorp/terraform/blob/main/.github/CONTRIBUTING.md. It can be difficult to contribute directly to Terraform as even small changes can have a big impact on other users of the software. Even this change has us asking, "what if someone is relying on the previous output format?" This is the nature of a widely-used, mature codebase - it becomes more risky to make even small changes. It is much easier, and very appreciated, to contribute to the providers (like AWS, Azure, etc). Per the Contributing.md, if you want to contribute we prefer to discuss the proposed implementation on the issue in question before a PR is opened. You are welcome to open PRs, but be aware they will likely mostly not be reviewed if you haven't received previous maintainer consensus on your approach. Thanks! |
Got it, thanks for the clarification. Since the issue was already open, I went ahead and worked on a solution, thinking it would be a good contribution. Now I understand that discussing the approach first is preferred in this project. For future contributions, I'll make sure to align with the maintainers before opening a PR. Appreciate the guidance! |
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.
Thanks for your contribution @GuiiifSouza! 🚀
After we discussed this internally we're happy to accept this PR. Like Craig mentioned, there is a possibility that the old elapsed time format could be something people use when parsing Terraform's terminal output. That possibility feels slim though, and if any issues did arise this change would be easy to revert in future.
Thanks for the opportunity to contribute, @SarahFrench and @crw! |
This PR improves the elapsed time display in the UI Hook by changing it from seconds-only to a more readable mm:ss format.
Previously, elapsed time was displayed in seconds only, making it hard to interpret for longer durations. Now, it follows the 00m00s format, making it more user-friendly.
This improvement directly addresses Issue #36368, which requests better readability for elapsed time display.
Main Changes:
Added separate calculations for minutes and seconds.
Updated the display string format to include mm:ss.
Kept the existing rounding logic for time calculations.
now:

before:

Fixes #36368
Target Release
1.12.x
CHANGELOG entry