[release/9.0.1xx] [system-dependencies] Update the check for the Metal toolchain to update if an update is available.#24858
Conversation
…ate if an update is available. `xcodebuild -showComponent ...` can return this: > Status: installedUpdateAvailable which we understood to be "Installed", which is incorrect. So fix the detection to handle this scenario, and (re)install the toolchain in question.
There was a problem hiding this comment.
Pull request overview
Updates system-dependencies.sh to correctly treat xcodebuild -showComponent status installedUpdateAvailable as requiring action, so the Metal toolchain component is (re)downloaded when an update is available.
Changes:
- Detect
Status: installedUpdateAvailableand treat it as needing an update. - Adjust decision logic to differentiate between “installed”, “update available”, and “not installed”.
- Trigger
xcrun xcodebuild -downloadComponentwhen provisioning is enabled and the component isn’t fully up-to-date.
Comments suppressed due to low confidence (1)
system-dependencies.sh:742
- When provisioning, the log/ok messages always say "Installing"/"installed" even when the detected state is "installedUpdateAvailable" (i.e., updating an existing component). This is misleading in logs; consider tailoring the messages based on NEEDS_UPDATE (e.g., "Updating" / "updated") so users can tell what happened.
log "Installing the Xcode component ${COLOR_BLUE}$comp${COLOR_CLEAR} by executing ${COLOR_BLUE}xcrun xcodebuild -downloadComponent $comp${COLOR_CLEAR}..."
xcrun xcodebuild -downloadComponent "$comp"
ok "Successfully installed the Xcode component ${COLOR_BLUE}$comp${COLOR_CLEAR}."
You can also share your feedback on Copilot code review. Take the survey.
✅ [CI Build #dc0c915] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #dc0c915] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [CI Build #dc0c915] Build passed (Build macOS tests) ✅Pipeline on Agent |
💻 [CI Build #dc0c915] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
💻 [CI Build #dc0c915] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #dc0c915] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #dc0c915] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #dc0c915] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 115 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
|
Failing test will be fixed with #24865. |
xcodebuild -showComponent ...can return this:which we understood to be "Installed", which is incorrect.
So fix the detection to handle this scenario, and (re)install the toolchain in question.
Backport of #24854.