Skip to content

Commit c90482d

Browse files
committed
Merge scalar-generated into scalar-next (build 9BPV1ywjzS8CyZ0nO2lwk)
2 parents b4cd3ef + f8318c0 commit c90482d

9 files changed

Lines changed: 49 additions & 25 deletions

File tree

‎.github/workflows/release-please.yml‎

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,44 @@ jobs:
5151
# version bump and changelog must also land back on scalar-next, or the next
5252
# release PR would propose this release again. A real merge (never a plain
5353
# commit push) so a squash- or rebase-merged release PR syncs just as well; the
54-
# non-conventional message keeps the sync commit out of future changelogs. Plain
55-
# (non-force) push on purpose: losing a race against a concurrent regeneration
56-
# push fails loudly here, and the platform's next sync re-converges.
54+
# non-conventional message keeps the sync commit out of future changelogs.
55+
#
56+
# The Scalar platform merges main into scalar-next itself when the release
57+
# PR merges, so this step routinely races it. The sync is done once the release commit
58+
# is an ancestor of scalar-next, whoever merged it, so that is checked before every
59+
# attempt. A rejected push retries from a fresh fetch rather than failing the release
60+
# run. Plain (non-force) push on purpose: a concurrent regeneration push is never
61+
# discarded, and a sync that still cannot land after the retries fails loudly.
5762
- name: Sync release back to scalar-next
5863
if: ${{ steps.release.outputs.release_created == 'true' }}
64+
env:
65+
RELEASE_SHA: ${{ steps.release.outputs.sha }}
66+
RELEASE_TAG: ${{ steps.release.outputs.tag_name }}
5967
run: |
6068
git config user.name "github-actions[bot]"
6169
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
62-
git fetch origin scalar-next
63-
git checkout -B scalar-next origin/scalar-next
64-
git merge --no-edit -m "Sync release ${{ steps.release.outputs.tag_name }} back to scalar-next" "${{ steps.release.outputs.sha }}"
65-
git push origin scalar-next
70+
# Explicit `|| return 1`s because `set -e` does not apply inside a function called
71+
# as a condition, and a failed merge must never fall through to a no-op push.
72+
sync_release() {
73+
git fetch origin scalar-next || return 1
74+
if git merge-base --is-ancestor "$RELEASE_SHA" origin/scalar-next; then
75+
echo "$RELEASE_TAG is already on scalar-next."
76+
return 0
77+
fi
78+
git checkout -B scalar-next origin/scalar-next || return 1
79+
if ! git merge --no-edit -m "Sync release $RELEASE_TAG back to scalar-next" "$RELEASE_SHA"; then
80+
git merge --abort
81+
return 1
82+
fi
83+
git push origin scalar-next
84+
}
85+
for attempt in 1 2 3; do
86+
if sync_release; then exit 0; fi
87+
echo "Attempt $attempt of 3 to sync $RELEASE_TAG back to scalar-next failed."
88+
if [ "$attempt" -lt 3 ]; then sleep $((attempt * 5)); fi
89+
done
90+
echo "::error::Could not sync $RELEASE_TAG back to scalar-next after 3 attempts."
91+
exit 1
6692
publish:
6793
needs: release-please
6894
# `!cancelled()` keeps publishing even when the back-sync to the integration branch

‎scalar-sdk.manifest.json‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Scalar",
33
"slug": "scalar",
4-
"generatorVersion": "0.36.3",
4+
"generatorVersion": "0.36.5",
55
"servers": [
66
"https://access.scalar.com"
77
],
@@ -35,7 +35,8 @@
3535
"platform:admin"
3636
]
3737
}
38-
]
38+
],
39+
"oauth2MetadataUrl": "https://auth.scalar.com/.well-known/oauth-authorization-server"
3940
}
4041
],
4142
"clientHeaderParams": [],
@@ -424,8 +425,7 @@
424425
]
425426
},
426427
"type": {
427-
"kind": "primitive",
428-
"type": "string"
428+
"kind": "unknown"
429429
}
430430
},
431431
{
@@ -2464,8 +2464,7 @@
24642464
]
24652465
},
24662466
"type": {
2467-
"kind": "primitive",
2468-
"type": "string"
2467+
"kind": "unknown"
24692468
}
24702469
},
24712470
{
@@ -3505,8 +3504,7 @@
35053504
]
35063505
},
35073506
"type": {
3508-
"kind": "primitive",
3509-
"type": "string"
3507+
"kind": "unknown"
35103508
}
35113509
},
35123510
{

‎src/scalar_sdk/resources/access_groups/access_groups.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def create(
5252
*,
5353
name: AccessGroupName | Omit = omit,
5454
slug: Slug | Omit = omit,
55-
allowed_domains: str | Omit = omit,
55+
allowed_domains: object | Omit = omit,
5656
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5757
# The extra values given here take precedence over values defined on the client or passed to this method.
5858
extra_headers: Headers | None = None,
@@ -249,7 +249,7 @@ async def create(
249249
*,
250250
name: AccessGroupName | Omit = omit,
251251
slug: Slug | Omit = omit,
252-
allowed_domains: str | Omit = omit,
252+
allowed_domains: object | Omit = omit,
253253
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
254254
# The extra values given here take precedence over values defined on the client or passed to this method.
255255
extra_headers: Headers | None = None,

‎src/scalar_sdk/types/access_group_create_params.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ class AccessGroupCreateParams(TypedDict, total=False):
1717

1818
slug: Slug
1919

20-
allowed_domains: Annotated[str, PropertyInfo(alias="allowedDomains")]
20+
allowed_domains: Annotated[object, PropertyInfo(alias="allowedDomains")]

‎src/scalar_sdk/types/access_group_create_response.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ class AccessGroupCreateResponse(BaseModel):
1818

1919
slug: Slug
2020

21-
allowed_domains: str = FieldInfo(alias="allowedDomains")
21+
allowed_domains: object = FieldInfo(alias="allowedDomains")
2222

23-
allowed_emails: str = FieldInfo(alias="allowedEmails")
23+
allowed_emails: object = FieldInfo(alias="allowedEmails")

‎src/scalar_sdk/types/access_group_retrieve_response.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ class AccessGroupRetrieveResponse(BaseModel):
1818

1919
slug: Slug
2020

21-
allowed_domains: str = FieldInfo(alias="allowedDomains")
21+
allowed_domains: object = FieldInfo(alias="allowedDomains")
2222

23-
allowed_emails: str = FieldInfo(alias="allowedEmails")
23+
allowed_emails: object = FieldInfo(alias="allowedEmails")

‎src/scalar_sdk/types/api_document.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ class APIDocument(BaseModel):
3030

3131
is_private: bool = FieldInfo(alias="isPrivate")
3232

33-
tags: str
33+
tags: object
3434

3535
versions: List[ManagedDocVersion]

‎src/scalar_sdk/types/docs_project.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class DocsProject(BaseModel):
2222

2323
is_private: bool = FieldInfo(alias="isPrivate")
2424

25-
access_groups: str = FieldInfo(alias="accessGroups")
25+
access_groups: object = FieldInfo(alias="accessGroups")
2626

2727
login_portal_uid: str = FieldInfo(alias="loginPortalUid")
2828

‎src/scalar_sdk/types/github_project.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class GithubProject(BaseModel):
4646

4747
analytics_enabled: bool = FieldInfo(alias="analyticsEnabled")
4848

49-
access_groups: str = FieldInfo(alias="accessGroups")
49+
access_groups: object = FieldInfo(alias="accessGroups")
5050

5151
slug: Slug
5252

0 commit comments

Comments
 (0)