Skip to content

ci: stop the tvOS smoke test depending on one pinned simulator - #7689

Merged
thomhurst merged 1 commit into
mainfrom
issue-7656-tvos-simulator
Nov 6, 2026
Merged

thomhurst merged 1 commit into
mainfrom
issue-7656-tvos-simulator

Conversation

@thomhurst

@thomhurst thomhurst commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Fixes #7656

The Apple smoke job looks up one exact tvOS simulator (Apple TV 4K (3rd generation) on tvOS-27-0). Some runners don't have it, so the job fails even though nothing is wrong with the code (example). It's intermittent: image 20261104.0337.1 both passed and failed on the same day.

Changes to platform-smoke.yml:

  • use any available simulator on any tvOS runtime
  • if there are none, create one on an available tvOS runtime
  • skip the tvOS build and run if setup failed, instead of carrying on and dying with Invalid device:. The job still fails in that case

Testing: forced the create path on a real xcode-27 runner from a throwaway branch, and the tvOS smoke test passed on the created simulator (run).

Not covered:

  • we don't log the simulator list, so I don't know exactly what affected runners have. jq did get past the tvOS-27-0 key, so the runtime was listed with no matching device. If the runtime itself isn't usable on those runners, this step will still fail, just with a clearer error
  • the iOS lookup is pinned the same way. I haven't seen it fail, so I left it alone
  • Apple smoke job times out during the tvOS build #7664 (tvOS build stall) is separate

Summary by CodeRabbit

  • Chores
    • tvOS build checks now adapt to the simulator devices and runtimes available in the build environment instead of relying on one specific device. If no compatible runtime is available, setup reports an error, and the build does not proceed unless simulator setup succeeds. This makes the tvOS validation process more consistent across environments.

Hosted xcode-27 runners on the same image don't all list the same
simulators, so the exact tvOS runtime and device lookup failed on some of
them. Use any available tvOS simulator, create one if there is none, and
skip the tvOS build and run when setup fails.

Fixes #7656
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T18:37:45.011386Z 1c75ece PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The platform smoke workflow now selects an available tvOS simulator or creates one from an available runtime. It records the selected device and runs the tvOS build only when workload installation and simulator setup succeed.

Changes: tvOS simulator setup

Layer / File(s) Summary
Simulator selection and build gate
.github/workflows/platform-smoke.yml
The workflow selects the first available tvOS device. If none exists, it creates a device using the last available runtime and its first supported device type. It errors if no runtime exists and gates the tvOS build on successful simulator setup.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant PlatformSmokeWorkflow
  participant tvOSSimulatorInventory
  participant tvOSBuild
  PlatformSmokeWorkflow->>tvOSSimulatorInventory: Check available tvOS devices
  alt A device is available
    tvOSSimulatorInventory-->>PlatformSmokeWorkflow: Return first available device
  else No device is available
    PlatformSmokeWorkflow->>tvOSSimulatorInventory: Check runtimes and supported device types
    alt A runtime is available
      tvOSSimulatorInventory-->>PlatformSmokeWorkflow: Return last runtime and its first device type
      PlatformSmokeWorkflow->>tvOSSimulatorInventory: Create a device
    else No runtime is available
      tvOSSimulatorInventory-->>PlatformSmokeWorkflow: Report setup error
    end
  end
  opt Simulator setup succeeds
    PlatformSmokeWorkflow->>tvOSBuild: Run tvOS build
  end
Loading
Merge Risk: Minimal · up to 1c75e

No confirmed issue currently prevents merging; the tvOS smoke-test workflow still warrants its normal CI check.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: removing the tvOS smoke test's dependency on one pinned simulator.
Linked Issues check Passed [#7656] The workflow selects an available tvOS simulator or creates one from an available runtime, then boots it. The tvOS build requires successful setup, and execution requires a successful build. T…
Out of Scope Changes check Passed [#7656] The changes are limited to tvOS simulator selection, creation, and setup gating in the Apple smoke workflow. These changes support the linked issue.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Linked Issues check

Explanation

[#7656] The workflow selects an available tvOS simulator or creates one from an available runtime, then boots it. The tvOS build requires successful setup, and execution requires a successful build. The smoke test remains an automated workflow step, and failures still fail the job. The author reports a successful hosted-runner test of simulator creation.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

I’m a rabbit, ears held high,
I watch the simulator list go by.
If none is there, a runtime will do,
A fresh Apple TV joins the queue.
When setup succeeds, the build can start,
I thump my paws and hop apart.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 17e9f874-4036-437c-b6f4-2c741adcf2c8
Commits

Reviewing files that changed from the base of the PR and between 0e89e26 and 1c75ece.

Files selected for processing: 1

  • .github/workflows/platform-smoke.yml

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Review: looks good. The change fits the intent of #7656.

  • The tvOS lookup now takes any simulator on any tvOS runtime. If there is none, it creates one on the newest available tvOS runtime. That fixes the dependency on one pinned device.
  • Gating the build on steps.tvos-simulator.outcome == 'success' is correct. The run step already depends on tvos-build, so a setup failure now skips both steps and the job still fails, which is what you want.
  • With bash's -e and pipefail defaults in GitHub Actions, the jq -er ... error(...) and simctl create failures abort the step with a readable message.

Minor suggestions, none blocking:

  1. The first pick depends on the order simctl lists runtimes and devices. Sorting by runtime version, or preferring an "Apple TV" device name, would keep runs more reproducible across runners.
  2. Log the simulator list (xcrun simctl list devices available) before selecting one. Your PR notes say you don't know what the affected runners have. A single log line would settle that the next time it flakes.
  3. supportedDeviceTypes[0] is not guaranteed to be an Apple TV type. This is fine for tvOS runtimes, but it is an assumption.
  4. The iOS lookup is pinned the same way. You noted this and left it alone, which is reasonable. A follow-up issue is worth filing if it ever flakes.

Nothing else to flag.

@greptile-apps

greptile-apps Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

The Apple smoke job now selects any available tvOS simulator instead of one pinned device and runtime.

  • The Apple smoke job finds or creates a tvOS simulator.

Reviews (1) · Last reviewed commit: "ci: stop the tvOS smoke test depending o..." · Reviewed by Greptile

@thomhurst
thomhurst merged commit b3468b0 into main Nov 6, 2026
28 checks passed
@thomhurst
thomhurst deleted the issue-7656-tvos-simulator branch November 6, 2026 19:37

This branch was previously deployed

1 inactive deployment
Pull Requests — 1c75ece9 Deployed Nov 6, 2026 by thomhurst via modularpipeline (ubuntu-latest) #21530
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apple smoke tests fail when the pinned tvOS simulator is absent

1 participant