Skip to content

Commit 94b2b7f

Browse files
lucia-sbclaude
andauthored
Skip code coverage gate validation for extras repos (DataDog#24099)
* fix(validate/ci): skip code coverage validation for extras repo - Add is_extras flag to detect extras repository - Early-return from CI validation for extras (same as marketplace) - Add test to confirm extras skips coverage file check Rationale: The extras repo does not use code coverage config, so the validator should skip that check rather than fail. This commit made by [/dd:git:commit:quick](https://github.com/DataDog/claude-marketplace/tree/main/dd/commands/git/commit/quick.md) * Add changelog entry for PR DataDog#24099 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7352f76 commit 94b2b7f

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

ddev/changelog.d/24099.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Skip code coverage gate validation for extras repos, which do not enforce a required per-integration coverage threshold.

ddev/src/ddev/cli/validate/ci.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def ci(app: Application, sync: bool):
4242

4343
is_core = app.repo.name == 'core'
4444
is_marketplace = app.repo.name == 'marketplace'
45+
is_extras = app.repo.name == 'extras'
4546

4647
# For non-core repos, extract the workflow reference from existing workflow files
4748
# This allows using either @master or @<commit-sha>
@@ -229,7 +230,7 @@ def ci(app: Application, sync: bool):
229230
if repo_choice not in valid_repos:
230231
app.abort(f'Unknown repository `{repo_choice}`')
231232

232-
if is_marketplace:
233+
if is_marketplace or is_extras:
233234
validation_tracker.success()
234235
validation_tracker.display()
235236
return

ddev/tests/cli/validate/test_ci.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,23 @@ def test_code_coverage_file_missing(ddev, repository, helpers):
143143
assert "Unable to find the code coverage config file" in helpers.remove_trailing_spaces(result.output)
144144

145145

146+
def test_code_coverage_skipped_for_extras(ddev, repository, helpers, config_file):
147+
config_file.model.repos['extras'] = str(repository.path)
148+
config_file.model.repo = 'extras'
149+
config_file.save()
150+
151+
# Remove the coverage file entirely — extras should not care
152+
coverage_file = repository.path / 'code-coverage.datadog.yml'
153+
if coverage_file.exists():
154+
coverage_file.unlink()
155+
156+
result = ddev('validate', 'ci', '--sync')
157+
assert result.exit_code == 0, result.output
158+
159+
result = ddev('validate', 'ci')
160+
assert result.exit_code == 0, result.output
161+
162+
146163
@pytest.mark.parametrize(
147164
'repo_name',
148165
[

0 commit comments

Comments
 (0)