Skip to content

Commit 36dbd3e

Browse files
committed
run_id
1 parent 28fac9a commit 36dbd3e

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

.github/workflows/measure-disk-usage.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
# workflows: ['Resolve Dependencies and Build Wheels']
77
# types:
88
# - completed
9-
pull_request:
10-
branches:
11-
- master
129
env:
1310
PYTHON_VERSION: "3.12"
1411

ddev/src/ddev/cli/size/utils/common_funcs.py

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,33 +1104,35 @@ def get_last_dependency_sizes_artifact(commit: str, platform: str) -> str:
11041104

11051105

11061106
def get_run_id(commit, workflow):
1107-
print(f"Getting run id for commit: {commit}, workflow: {workflow}")
1108-
try:
1109-
result = subprocess.run(
1110-
[
1111-
'gh',
1112-
'run',
1113-
'list',
1114-
'--workflow',
1115-
workflow,
1116-
'-c',
1117-
commit,
1118-
'--json',
1119-
'databaseId',
1120-
'--jq',
1121-
'.[-1].databaseId',
1122-
],
1123-
capture_output=True,
1124-
text=True,
1125-
)
1126-
except subprocess.CalledProcessError as e:
1127-
stderr = (e.stderr or '').strip()
1128-
if stderr:
1129-
print(stderr)
1130-
print("Failed to get run id")
1131-
return None
1132-
run_id = result.stdout.strip() if result.stdout else None
1133-
print(f"Run id: {run_id}")
1107+
# print(f"Getting run id for commit: {commit}, workflow: {workflow}")
1108+
# try:
1109+
# result = subprocess.run(
1110+
# [
1111+
# 'gh',
1112+
# 'run',
1113+
# 'list',
1114+
# '--workflow',
1115+
# workflow,
1116+
# '-c',
1117+
# commit,
1118+
# '--json',
1119+
# 'databaseId',
1120+
# '--jq',
1121+
# '.[-1].databaseId',
1122+
# ],
1123+
# capture_output=True,
1124+
# text=True,
1125+
# )
1126+
# except subprocess.CalledProcessError as e:
1127+
# stderr = (e.stderr or '').strip()
1128+
# if stderr:
1129+
# print(stderr)
1130+
# print("Failed to get run id")
1131+
# return None
1132+
# run_id = result.stdout.strip() if result.stdout else None
1133+
# print(f"Run id: {run_id}")
1134+
run_id = os.environ.get("GITHUB_RUN_ID")
1135+
11341136
return run_id
11351137

11361138

0 commit comments

Comments
 (0)