Skip to content

Commit cdbcf6d

Browse files
committed
Resolved merge conflicts
2 parents a055306 + 2f37e86 commit cdbcf6d

156 files changed

Lines changed: 7391 additions & 1185 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/actions/create_workflow_report/create_workflow_report.py‎

Lines changed: 191 additions & 83 deletions
Large diffs are not rendered by default.

‎.github/actions/create_workflow_report/test_prs_in_release.py‎

Lines changed: 411 additions & 0 deletions
Large diffs are not rendered by default.

‎.github/actions/create_workflow_report/test_report_queries.py‎

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@
3636
from clickhouse_driver import Client
3737
from testflows.core import *
3838

39-
from create_workflow_report import _git_log_merge_prs, get_checks_fails
39+
from create_workflow_report import (
40+
_git_log_merge_prs,
41+
get_checks_fails,
42+
get_commit_statuses,
43+
)
4044

4145

4246
def check_result_matches_expect(df: pd.DataFrame, expect: list[str]) -> None:
@@ -172,11 +176,55 @@ def test_git_log_merge_prs_includes_fork_prs(self):
172176
assert set(df["pr_number"]) == {2226, 2252}
173177

174178

179+
@TestScenario
180+
def test_commit_statuses_only_keep_requested_ref(self):
181+
"""Test statuses written by another ref on the same commit are ignored."""
182+
base = "https://altinity-build-artifacts.s3.amazonaws.com"
183+
tag = "v26.6.8.20002.altinityantalya"
184+
# GitHub returns statuses newest first.
185+
statuses = [
186+
("Stress test", "failure", f"{base}/json.html?REF=antalya-26.6&sha=abc"),
187+
("Regression release x", "failure", f"{base}/REFs/antalya-26.6/abc/r.html"),
188+
("Regression release y", "success", f"{base}/REFs/{tag}/abc/r.html"),
189+
("Stress test", "success", f"{base}/json.html?REF={tag}&sha=abc"),
190+
("PR job", "success", f"{base}/json.html?PR=1&sha=abc"),
191+
]
192+
response = type(
193+
"Response",
194+
(),
195+
{
196+
"status_code": 200,
197+
"headers": {},
198+
"json": lambda _: [
199+
{"context": c, "state": st, "description": "", "target_url": u}
200+
for c, st, u in statuses
201+
],
202+
},
203+
)()
204+
with When("I fetch statuses for the release tag"):
205+
with patch("create_workflow_report.requests.get", return_value=response):
206+
df = get_commit_statuses("abc", 0, tag)
207+
208+
with Then("only statuses of the tag remain"):
209+
assert dict(zip(df["job_name"], df["job_status"])) == {
210+
"Stress test": "success",
211+
"Regression release y": "success",
212+
}
213+
214+
with When("I fetch statuses for a pull request run"):
215+
with patch("create_workflow_report.requests.get", return_value=response):
216+
df = get_commit_statuses("abc", 1, "some-branch")
217+
218+
with Then("statuses are not filtered by ref"):
219+
assert set(df["job_name"]) == {"Stress test", "Regression release x", "Regression release y", "PR job"}
220+
221+
175222
@Name("test report queries")
176223
@TestModule
177224
def test_report_queries(self):
178225
Scenario(run=test_checks_fails_query, flags=TE)
179226
Scenario(run=test_git_log_merge_prs_includes_fork_prs, flags=TE)
227+
Scenario(run=test_commit_statuses_only_keep_requested_ref, flags=TE)
180228

181229

182230
if main():

‎.github/workflows/fast_builds.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
name: Fast Builds
44
concurrency:
5-
group: ${{ github.workflow }}
5+
group: ${{ github.workflow }}-${{ github.ref }}
66
cancel-in-progress: true
77
on:
88
workflow_dispatch:

‎.github/workflows/master.yml‎

Lines changed: 70 additions & 70 deletions
Large diffs are not rendered by default.

‎.github/workflows/pull_request.yml‎

Lines changed: 69 additions & 112 deletions
Large diffs are not rendered by default.

‎.github/workflows/pull_request_community.yml‎

Lines changed: 68 additions & 68 deletions
Large diffs are not rendered by default.

‎ci/defs/job_configs.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -975,25 +975,25 @@ class JobConfigs:
975975
for total_batches in (2,)
976976
for batch in range(1, total_batches + 1)
977977
],
978-
# One shard can lose worker concurrency mid-suite under MSan and
979-
# overrun the shared 3.5h functional-test budget.
980-
*[
978+
# NOTE (strtgbb): 64g keeps MSan at 6 workers, Lower mem can cause workers to be killed
979+
*[
981980
Job.ParamSet(
982981
parameter=f"amd_msan, WasmEdge, parallel, {batch}/{total_batches}",
983-
runs_on=RunnerLabels.FUNC_TESTER_AMD,
982+
runs_on=RunnerLabels.AMD_LARGE,
984983
requires=[ArtifactNames.CH_AMD_MSAN_GH],
985984
timeout=3600 * 4,
986985
)
987-
for total_batches in (8,)
986+
for total_batches in (6,)
988987
for batch in range(1, total_batches + 1)
989988
],
989+
# NOTE (strtgbb): 2/2 was ~3.3h of sequential work and overran 3.5h in teardown.
990990
*[
991991
Job.ParamSet(
992992
parameter=f"amd_msan, WasmEdge, sequential, {batch}/{total_batches}",
993993
runs_on=RunnerLabels.AMD_SMALL_MEM,
994994
requires=[ArtifactNames.CH_AMD_MSAN_GH],
995995
)
996-
for total_batches in (2,)
996+
for total_batches in (4,)
997997
for batch in range(1, total_batches + 1)
998998
],
999999
Job.ParamSet(

‎ci/praktika/yaml_generator.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class Templates:
8383
workflow_dispatch:{DISPATCH_INPUTS_BLOCK}
8484
8585
concurrency:
86-
group: ${{{{{{{{ github.workflow }}}}}}}}
86+
group: ${{{{{{{{ github.workflow }}}}}}}}-${{{{{{{{ github.ref }}}}}}}}
8787
8888
env:
8989
PYTHONUNBUFFERED: 1
@@ -103,7 +103,7 @@ class Templates:
103103
104104
name: {NAME}
105105
concurrency:
106-
group: ${{{{{{{{ github.workflow }}}}}}}}
106+
group: ${{{{{{{{ github.workflow }}}}}}}}-${{{{{{{{ github.ref }}}}}}}}
107107
cancel-in-progress: true
108108
on:
109109
workflow_dispatch:{DISPATCH_INPUTS_BLOCK}{WORKFLOW_CALL}{TAG_PUSH_TRIGGER}

‎ci/tests/test_yaml_generator.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def test_dispatch_with_tags_renders_boolean_input_and_tag_trigger():
5353
assert "type: boolean" in yaml_text
5454
assert "push:" in yaml_text
5555
assert "tags: ['*']" in yaml_text
56+
assert "group: ${{ github.workflow }}-${{ github.ref }}" in yaml_text
5657
assert "cancel-in-progress: true" in yaml_text
5758

5859

@@ -67,6 +68,7 @@ def test_schedule_concurrency_does_not_cancel_in_progress():
6768
)
6869

6970
assert "concurrency:" in yaml_text
71+
assert "group: ${{ github.workflow }}-${{ github.ref }}" in yaml_text
7072
assert "cancel-in-progress:" not in yaml_text
7173

7274

0 commit comments

Comments
 (0)