feat(cloud): device matrix via repeated --ios-config/--android-config…#75
Open
finalerock44 wants to merge 3 commits into
Open
feat(cloud): device matrix via repeated --ios-config/--android-config…#75finalerock44 wants to merge 3 commits into
finalerock44 wants to merge 3 commits into
Conversation
… (#1105)
One upload targets N device configs. Each --ios-config <device>:<version> /
--android-config <device>:<apiLevel>[:play] names exactly one validated cell —
no cross-product. A device matrix is single-platform; mixing platforms is
rejected before any upload.
- parseDeviceMatrix() (unit-tested): parsing, :play Google Play cell, mixed-
platform + malformed rejection.
- Each cell validated against the compatibility matrix up front; fails fast
naming the bad cell before the flow zip is uploaded.
- Serialized as the deviceMatrix field; single-device submissions stay byte-
identical. targetPlatform now derives from the matrix too.
- Pre-submit cost preview via POST /uploads/estimateMatrix (cells + est. cost +
per-column breakdown); tolerant of older APIs that lack the endpoint (404).
- --json tests[].device (structured {name, osVersion, googlePlay}) on both the
sync and async paths, so a flow run on two devices is disambiguated.
Note: generated schema.types.ts is intentionally not regenerated here (it lags
dev's swagger); regenerate from dev after the API lands. Runtime reads
config/simulator_name structurally.
The cost preview is best-effort, but the gateway only treated 404 as 'endpoint absent' and threw on 405. An API that predates the endpoint (incl. the CI Prism mock running against dev's swagger before this lands) 405s with NO_METHOD_MATCHED, which blocked the submit. Treat 404 and 405 alike — return null and proceed without a preview. A 400 (invalid config) still surfaces.
CodeQL flags every `exec(\)` in the integration suite as
js/shell-command-injection-from-environment — the built CLI's absolute path
(path.resolve) flows through a template string into a shell. There is no real
injection (test harness, local fixture paths), but the whole class is avoidable.
Route the shared exec helper through execFile(process.execPath, argv) — no
shell — by tokenising the `${CLI} <args>` command. This is CodeQL's
recommended remediation (argument list, not a shell string) and clears the
entire class across all five integration files at once, with no call-site
changes (signature-compatible; runExpectingFailure still reads stdout/stderr
from the rejection). Verified the CLI runs and non-zero exits still surface
stderr.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… (#1105)
One upload targets N device configs. Each --ios-config : / --android-config :[:play] names exactly one validated cell — no cross-product. A device matrix is single-platform; mixing platforms is rejected before any upload.
Note: generated schema.types.ts is intentionally not regenerated here (it lags dev's swagger); regenerate from dev after the API lands. Runtime reads config/simulator_name structurally.
What & why
Type of change
fix— bug fixfeat— new featureperf— performance improvementrefactor— code change that's neither a fix nor a featuredocs— documentation onlychore/ci/build/test— tooling, no user-facing change!or PR notes aBREAKING CHANGE:)Checklist
pnpm lintpassespnpm typecheckpassespnpm buildpassesCHANGELOG.md(release-please handles this)README.md/STYLE_GUIDE.mdupdated if behaviour or output changedHow to test
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.