Skip to content

Conversation

@Shweta-Deshpande
Copy link
Contributor

@Shweta-Deshpande Shweta-Deshpande commented Nov 12, 2025

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Description

Adding support for scaling agents when plan-only runs are queued. This will run them parallelly and improve performance for workspaces with large speculative runs queued for each pull request.
Currently, the new algorithm that calculates the agents required for executing pending runs, counts one agent per workspace. This does not scale for speculative runs where we don't need runs to wait in a queue and run them on agents parallelly instead. This change will increment the required agents count when there is run of type "plan-only" which will resolve the issue.

Usage Example

References

Community Note

  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

@Shweta-Deshpande Shweta-Deshpande requested a review from a team as a code owner November 12, 2025 19:59
@github-actions github-actions bot added dependencies Pull requests that update a dependency file golang controller test size/L labels Nov 12, 2025
@arybolovlev arybolovlev modified the milestones: v2.10.0, v2.10.1 Nov 17, 2025
Copy link
Collaborator

@arybolovlev arybolovlev left a comment

Choose a reason for hiding this comment

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

All in all, looks good, thank you! 👍🏻 I’ve left a few cosmetic, logging-related comments.

🪵 Since this change introduces a new way of calculating pending runs, it needs to be clearly documented in the changelog. This entry is currently missing. The PR description can provide additional context, so anyone who wants to understand the change in more detail can refer to it.

Mock tests are something we have missed. However, there are a few issues with them (I might be missing something, so please correct me):

  • There is no new make target for running them separately.

  • They currently run together with the E2E tests and fail.

  • As mentioned above, the mocks package from go-tfe is imported, and a new folder/file has been added, but it is not used.

We can either postpone these as part of a larger testing effort or fix them properly now.

@github-actions github-actions bot added size/M and removed size/L labels Nov 17, 2025
@Shweta-Deshpande
Copy link
Contributor Author

All in all, looks good, thank you! 👍🏻 I’ve left a few cosmetic, logging-related comments.

🪵 Since this change introduces a new way of calculating pending runs, it needs to be clearly documented in the changelog. This entry is currently missing. The PR description can provide additional context, so anyone who wants to understand the change in more detail can refer to it.

Mock tests are something we have missed. However, there are a few issues with them (I might be missing something, so please correct me):

  • There is no new make target for running them separately.
  • They currently run together with the E2E tests and fail.
  • As mentioned above, the mocks package from go-tfe is imported, and a new folder/file has been added, but it is not used.

We can either postpone these as part of a larger testing effort or fix them properly now.

I fixed the failure in the test. It strangely worked well when I created the test first.

arybolovlev
arybolovlev previously approved these changes Nov 19, 2025
@github-actions github-actions bot added size/L and removed size/M labels Nov 19, 2025
arybolovlev
arybolovlev previously approved these changes Nov 20, 2025
@Shweta-Deshpande Shweta-Deshpande merged commit d07c257 into main Nov 20, 2025
7 checks passed
@Shweta-Deshpande Shweta-Deshpande deleted the TFECO-11017 branch November 20, 2025 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controller dependencies Pull requests that update a dependency file golang size/L test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants