Repository navigation
Prepare App Store version before validation - #7979
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe iOS App Store validation script adds a ChangesApp Store submission preparation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant ValidateScript
participant AppStoreConnect
GitHubActions->>ValidateScript: invoke with --prepare-submission
ValidateScript->>AppStoreConnect: update content rights
ValidateScript->>AppStoreConnect: list versions
AppStoreConnect-->>ValidateScript: return version-id
ValidateScript->>AppStoreConnect: attach build
ValidateScript->>AppStoreConnect: validate readiness
Suggested reviewers: 🚥 Pre-merge checks | ✅ 24 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (24 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryThis PR prepares the App Store version before strict readiness validation. The main changes are:
Confidence Score: 4/5The latest changes do not introduce another distinct blocking issue.
Important Files Changed
Reviews (2): Last reviewed commit: "Declare user-controlled App Store conten..." | Re-trigger Greptile |
| VERSION_ID="$( | ||
| asc versions list --app "$APP" --version "$VERSION" --platform IOS --output json | | ||
| python3 -c 'import json,sys; body=json.load(sys.stdin); data=body.get("data") if isinstance(body,dict) else body; data=data if isinstance(data,list) else ([data] if isinstance(data,dict) else []); print(data[0].get("id", "") if data else "")' | ||
| )" |
There was a problem hiding this comment.
First Match Can Select Wrong Version
If asc versions list returns more than one record for the requested filters, this parser silently selects the first ID without checking its version, platform, state, or result count. The workflow can then attach the processed build to an older or otherwise unintended App Store version instead of failing safely; require exactly one matching iOS version before performing the mutation.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ios/scripts/validate-app-store-release.sh`:
- Around line 154-157: Centralize the ASC version-ID JSON extraction currently
duplicated in the VERSION_ID assignment and the iOS workflow. Create a shared
helper or script containing the existing data-shape and id extraction logic,
update both callers to reuse it, and remove their inline Python copies while
preserving the current empty-result behavior.
In `@tests/test_ios_appstore_lane_identity.py`:
- Around line 930-942: Remove the explicit log_failure=False argument from the
_run invocation in the App Store submission preparation test so failures print
diagnostics using the default behavior, matching the sibling success-path test
while preserving the existing command and return-code assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: d547c367-5d36-4e22-be7c-f2d2b64bf056
📒 Files selected for processing (3)
.github/workflows/ios-app-store.ymlios/scripts/validate-app-store-release.shtests/test_ios_appstore_lane_identity.py
| VERSION_ID="$( | ||
| asc versions list --app "$APP" --version "$VERSION" --platform IOS --output json | | ||
| python3 -c 'import json,sys; body=json.load(sys.stdin); data=body.get("data") if isinstance(body,dict) else body; data=data if isinstance(data,list) else ([data] if isinstance(data,dict) else []); print(data[0].get("id", "") if data else "")' | ||
| )" |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Duplicated ASC version-id JSON extraction.
This python one-liner resolving VERSION_ID from asc versions list --output json is byte-for-byte the same logic already present in .github/workflows/ios-app-store.yml (lines 178-181). Two copies of non-trivial JSON-shape handling (data as dict vs list, .get("id","")) will silently drift if one is updated and not the other. Consider extracting a shared helper (e.g. a small function in this script that the workflow step also calls, or a shared script sourced by both) instead of a third copy of the same logic.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@ios/scripts/validate-app-store-release.sh` around lines 154 - 157, Centralize
the ASC version-ID JSON extraction currently duplicated in the VERSION_ID
assignment and the iOS workflow. Create a shared helper or script containing the
existing data-shape and id extraction logic, update both callers to reuse it,
and remove their inline Python copies while preserving the current empty-result
behavior.
| result = _run( | ||
| [ | ||
| "bash", | ||
| str(ROOT / "ios" / "scripts" / "validate-app-store-release.sh"), | ||
| "--build-id", | ||
| ASC_BUILD_ID, | ||
| "--prepare-submission", | ||
| ], | ||
| env=env, | ||
| tmp=tmp, | ||
| log_failure=False, | ||
| ) | ||
| _check(result.returncode == 0, "App Store validation helper prepares submission state") |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
log_failure=False on a success-path assertion hides diagnostics.
This test expects returncode == 0 (line 942), yet passes log_failure=False, so if the script unexpectedly fails, _run won't print stdout/stderr — unlike the sibling success-path test above (line 888-893) which leaves the default log_failure=True. This makes a CI regression on this exact test much harder to debug.
🐛 Proposed fix
result = _run(
[
"bash",
str(ROOT / "ios" / "scripts" / "validate-app-store-release.sh"),
"--build-id",
ASC_BUILD_ID,
"--prepare-submission",
],
env=env,
tmp=tmp,
- log_failure=False,
)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| result = _run( | |
| [ | |
| "bash", | |
| str(ROOT / "ios" / "scripts" / "validate-app-store-release.sh"), | |
| "--build-id", | |
| ASC_BUILD_ID, | |
| "--prepare-submission", | |
| ], | |
| env=env, | |
| tmp=tmp, | |
| log_failure=False, | |
| ) | |
| _check(result.returncode == 0, "App Store validation helper prepares submission state") | |
| result = _run( | |
| [ | |
| "bash", | |
| str(ROOT / "ios" / "scripts" / "validate-app-store-release.sh"), | |
| "--build-id", | |
| ASC_BUILD_ID, | |
| "--prepare-submission", | |
| ], | |
| env=env, | |
| tmp=tmp, | |
| ) | |
| _check(result.returncode == 0, "App Store validation helper prepares submission state") |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/test_ios_appstore_lane_identity.py` around lines 930 - 942, Remove the
explicit log_failure=False argument from the _run invocation in the App Store
submission preparation test so failures print diagnostics using the default
behavior, matching the sibling success-path test while preserving the existing
command and return-code assertion.
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
Summary
1.0.0before strict readiness validation--prepare-submissionRoot cause
20260713085348successfully, then strict validation found content rights unset and no build attached to the versionTesting
python3 tests/test_ios_appstore_lane_identity.pypassbash -n ios/scripts/validate-app-store-release.shNeed help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Prepares the App Store version before validation to stop readiness failures. We now declare user‑controlled third‑party content, attach the selected processed build to version 1.0.0, then run strict validation.
Written for commit 045fafc. Summary will update on new commits.
Summary by CodeRabbit
New Features
--prepare-submissionmode to the App Store release validator to prepare submission by setting content-rights and attaching the selected build to the specified app version before proceeding with readiness checks.Tests