Route Xcode and iOS work to macOS when load balancing #11824
roni-estein
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
Load balancing currently chooses an environment from CPU, memory, and preference weight. That works until copies of the same project have different operating systems and toolchains.
Here is the failure case I keep running into. A React Native repo is available on a Linux agent and a Mac. Linux has more free resources, so it wins the load-balancing score. The thread then needs
xcodebuild, CocoaPods, an iOS Simulator, or a local iOS build. The agent only discovers after the thread starts that the required toolchain cannot run there.A skill can warn the agent, but it runs after T3 Code has selected the environment. It cannot fix the original placement.
React Native by itself should not mean macOS. JavaScript and Android work can run on Linux. The requirement is Xcode or native iOS work.
A small first version
Add an optional required platform to a shared project or new thread:
When auto-balancing a new thread, T3 Code would first filter candidates using
environment.platform.os. It would then apply the existing CPU and memory score to the remaining environments.If no matching environment is connected, T3 Code should stop and say that the requested platform is unavailable. It should not quietly start the thread on an incompatible machine. Manual environment selection would keep working as it does now.
T3 Code already reports
darwin,linux,windows, orunknownfor each environment. That may make a platform filter small enough for a focused first PR.What could come later
Named capabilities such as
xcode,ios-simulator,android-sdk, anddockerwould be more flexible. They also need a discovery and freshness model. I would leave that out of the first change.An agent-triggered handoff could also help when a requirement appears halfway through a thread. That is a separate problem. The scheduler should not have to guess that every mention of React Native means macOS.
My preference would be a project default plus a per-thread override in the composer. For example, a mobile project could default to Any, while an iOS build thread explicitly requires macOS.
Would the maintainers accept a PR for the narrow platform filter first? This would build on the load-balancing work in #9895 without changing its scoring model.
All reactions