Skip to content

Commit f8c173d

Browse files
authored
Clarify the qa-label check refers to the Agent release cycle (DataDog#23784)
* Spell out that the qa-label check refers to the Agent release cycle * Add changelog entry * Use the fixed changelog type for a zero-impact wording change * Inline the long error string so ruff 0.11.10 stops complaining
1 parent 8796d06 commit f8c173d

4 files changed

Lines changed: 15 additions & 12 deletions

File tree

ddev/changelog.d/23784.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Reword the `qa-label` validation messages to make explicit that the check refers to the Datadog Agent release cycle.

ddev/src/ddev/cli/validate/all/orchestrator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class ValidationConfig:
105105
description="Validate Python package metadata and naming",
106106
),
107107
"qa-label": ValidationConfig(
108-
description="Validate the pull request declares a QA decision label",
108+
description="Validate the pull request declares whether it needs QA for the next Agent release",
109109
repo_wide=True,
110110
),
111111
"readmes": ValidationConfig(

ddev/src/ddev/cli/validate/qa_label.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
REQUIRED_LABELS: frozenset[str] = frozenset({'qa/skip-qa', 'qa/required'})
2020

2121
HELP_MESSAGE = (
22-
"Every pull request must declare its QA expectation by setting exactly one of:\n"
23-
" - 'qa/required' if this PR ships changes that need to be validated during QA.\n"
24-
" - 'qa/skip-qa' if this PR does not need QA validation (e.g., docs, tests, "
25-
"developer tooling, or no agent-impacting changes).\n"
22+
"Every pull request must declare whether its changes require QA validation as part of "
23+
"the next Datadog Agent release by setting exactly one of:\n"
24+
" - 'qa/required' if this PR ships Agent-impacting changes that must be validated "
25+
"during the QA phase of the next Agent release.\n"
26+
" - 'qa/skip-qa' if this PR has no impact on the Agent release (e.g., docs, tests, "
27+
"developer tooling, or changes that don't ship with the Agent).\n"
2628
)
2729

2830

@@ -34,7 +36,7 @@ def _is_fork_pr(app: Application, event: PullRequestEvent) -> bool:
3436
return head_repo != base_repo
3537

3638

37-
@click.command(short_help='Validate the QA decision label on the current pull request')
39+
@click.command(short_help='Validate the Agent-release QA decision label on the current pull request')
3840
@click.pass_obj
3941
def qa_label(app: Application):
4042
"""Fail unless the current pull request has exactly one QA decision label.
@@ -72,13 +74,13 @@ def qa_label(app: Application):
7274
qa_labels = sorted(set(labels) & REQUIRED_LABELS)
7375

7476
if len(qa_labels) == 1:
75-
app.display_success(f'QA label set: {qa_labels[0]}')
77+
app.display_success(f'Agent-release QA label set: {qa_labels[0]}')
7678
return
7779

7880
if not qa_labels:
79-
app.display_error(f'No QA decision label set on PR #{pr_number}.')
81+
app.display_error(f'PR #{pr_number} is missing an Agent-release QA decision label.')
8082
else:
81-
app.display_error(f'PR #{pr_number} has more than one QA decision label: {", ".join(qa_labels)}.')
83+
app.display_error(f'PR #{pr_number} has more than one Agent-release QA decision label: {", ".join(qa_labels)}.')
8284

8385
app.display_info(HELP_MESSAGE)
8486
app.abort()

ddev/tests/cli/validate/test_qa_label.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_passes_with_exactly_one_qa_label(ddev, pr_context, mocker, label):
5050
result = ddev('validate', 'qa-label')
5151

5252
assert result.exit_code == 0, result.output
53-
assert 'QA label set' in result.output
53+
assert 'Agent-release QA label set' in result.output
5454

5555

5656
def test_fails_when_no_qa_label(ddev, pr_context, mocker):
@@ -59,7 +59,7 @@ def test_fails_when_no_qa_label(ddev, pr_context, mocker):
5959
result = ddev('validate', 'qa-label')
6060

6161
assert result.exit_code == 1, result.output
62-
assert 'No QA decision label set' in result.output
62+
assert 'missing an Agent-release QA decision label' in result.output
6363
assert 'qa/required' in result.output
6464
assert 'qa/skip-qa' in result.output
6565

@@ -70,7 +70,7 @@ def test_fails_when_both_qa_labels(ddev, pr_context, mocker):
7070
result = ddev('validate', 'qa-label')
7171

7272
assert result.exit_code == 1, result.output
73-
assert 'more than one QA decision label' in result.output
73+
assert 'more than one Agent-release QA decision label' in result.output
7474

7575

7676
def test_skips_outside_pull_request_context(ddev, monkeypatch, mocker):

0 commit comments

Comments
 (0)