Skip to content

Commit

Permalink
chore: increase github action runner size
Browse files Browse the repository at this point in the history
  • Loading branch information
FabienArcellier committed Dec 8, 2024
1 parent f75f6a7 commit 6db8712
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/writer/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def upload_package(deploy_url, tar, token, env, verbose=False, sleep_interval=5)
time.sleep(sleep_interval)
start_time = end_time

_check_version_integrity(deploy_url)
_check_version_integrity(deploy_url, token)

if status == "COMPLETED":
print("Deployment successful")
Expand Down Expand Up @@ -323,12 +323,18 @@ def unauthorized_error():
sys.exit(1)


def _check_version_integrity(app_url: str):
def _check_version_integrity(app_url: str, token: str):
"""
Check if the writer version in the deployment package is newer than the writer version running on the server.
>>> _check_version_integrity("https://xxxxxxxxxxxxxxxx.ai.writer.build", "xxxxxxxxxxxxxxxxxxxxxxxxxx")
"""
with requests.get(f"{app_url}/_meta") as resp:
with requests.get(
f"{app_url}/_meta",
headers={
"Authorization": f"Bearer {token}",
},
) as resp:
data = resp.json()
if "writer_version_dev" not in data or "writer_version_run" not in data:
return
Expand Down

0 comments on commit 6db8712

Please sign in to comment.