Repository navigation
ci(release): retry stapler when Apple CloudKit drops the connection #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -304,8 +304,25 @@ jobs: | |||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # stapler downloads the ticket from Apple's CloudKit, which can drop | ||||||||||||||||||||||||
| # the connection transiently (-1005) — retry before giving up. | ||||||||||||||||||||||||
| staple_with_retry() { | ||||||||||||||||||||||||
| local target="$1" | ||||||||||||||||||||||||
| for attempt in 1 2 3 4 5; do | ||||||||||||||||||||||||
| if xcrun stapler staple "$target"; then | ||||||||||||||||||||||||
| return 0 | ||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||
| echo "staple attempt $attempt for $target failed, retrying in 10s..." | ||||||||||||||||||||||||
| sleep 10 | ||||||||||||||||||||||||
| done | ||||||||||||||||||||||||
| return 1 | ||||||||||||||||||||||||
|
Comment on lines
+315
to
+318
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggestion:
Suggested change
|
||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| echo "Stapling notarization ticket to app..." | ||||||||||||||||||||||||
| xcrun stapler staple "$APP_PATH" | ||||||||||||||||||||||||
| if ! staple_with_retry "$APP_PATH"; then | ||||||||||||||||||||||||
| echo "##[error]stapler staple failed for app after 5 attempts" | ||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| echo "Verifying notarization..." | ||||||||||||||||||||||||
| xcrun stapler validate "$APP_PATH" | ||||||||||||||||||||||||
|
|
@@ -339,7 +356,10 @@ jobs: | |||||||||||||||||||||||
| --wait \ | ||||||||||||||||||||||||
| --timeout 120m | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| xcrun stapler staple "$DMG_FILE" | ||||||||||||||||||||||||
| if ! staple_with_retry "$DMG_FILE"; then | ||||||||||||||||||||||||
| echo "##[error]stapler staple failed for DMG after 5 attempts" | ||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||
| cp "$DMG_FILE" "$ARM64_DMG_FILE" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| rm -rf dmg_temp | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里新增的三个输入(review_concurrency / max_tokens_budget / effort)属于第三方 action(alibaba/open-code-review)的 with 参数。GitHub Actions 对 action 不认识的输入名不会报错,只会静默忽略——如果上游 action.yml 中并未定义这些输入(或拼写/命名不同,如 maxTokensBudget),本配置将完全不生效且无任何告警,与注释中"收敛到 2 串行化"的意图相悖。建议对照上游 v1.13.3 的 action.yml 确认输入名与取值格式(尤其是 max_tokens_budget 用字符串 '2000000' 是否被 number 类型接受),并在 PR 说明中附上验证依据。
Suggestion: