Skip to content

fix: filter unsupported cooldown options - #620

Merged
zkoppert merged 1 commit into
mainfrom
fix/cooldown-ecosystem-support
Sep 9, 2026
Merged

fix: filter unsupported cooldown options#620
zkoppert merged 1 commit into
mainfrom
fix/cooldown-ecosystem-support

Conversation

@zkoppert

@zkoppert zkoppert commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Proposed Changes

I found that Evergreen currently adds three unsupported SemVer cooldown fields to generated GitHub Actions configuration, which can make the Dependabot configuration invalid. I now filter semver-major-days, semver-minor-days, and semver-patch-days based on each ecosystem's documented capabilities. I preserve default-days, include, and exclude when at least one supported day field remains.

I also omit the cooldown block when filtering leaves no supported day field. This fixes #605 and applies the same capability check to all 29 ecosystems Evergreen currently detects.

Ecosystem Before After
github-actions default-days plus three unsupported semver-*-days fields default-days remains and the three unsupported fields are omitted
npm All configured cooldown fields All configured cooldown fields remain unchanged
github-actions with SemVer-only input A cooldown block containing unsupported fields and exclude No cooldown block because no supported day field remains

I chose a centralized capability set instead of special-casing GitHub Actions so every generated ecosystem follows the same rule. The tradeoff is that newly supported ecosystems must be added to the set before Evergreen emits their SemVer-specific cooldown fields.

Testing

  • I ran make test in the fresh evergreen-605-validation Codespace at commit 319a8e8, covering 182 tests with 100% line coverage.
  • I added regression tests for mixed npm and GitHub Actions configuration, non-SemVer ecosystems, and SemVer-only cooldown input.

Rollout

No migration or feature flag is required because the fix only changes newly generated Dependabot YAML. After merge, I will watch for reports of invalid generated configuration and confirm GitHub Actions entries no longer contain unsupported SemVer cooldown fields.

Readiness Checklist

Author/Contributor

  • Documentation is not needed because the supported input format is unchanged.
  • I ran make lint and fixed all introduced issues.
  • I ran make test and added coverage for the new behavior.

Preserve general cooldown settings while omitting SemVer-specific fields from ecosystems that do not support them. Avoid emitting an empty cooldown block when every configured day field is unsupported.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 70c37dc1-7495-4c4f-a381-0614c40b3ec5
Signed-off-by: Zack Koppert <zkoppert@github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The change is narrowly scoped, behavior is covered by targeted regression tests, and the updated generation logic matches the PR’s stated acceptance criteria.

Review tier: Lite
Findings: None

What changed in this PR

This PR fixes invalid generated dependabot.yml output by filtering out unsupported SemVer-specific cooldown keys (semver-*-days) for ecosystems that don’t support them, while retaining supported cooldown fields (like default-days, plus include/exclude when applicable). It centralizes ecosystem capability checks so the same rules apply consistently across all detected ecosystems, including a regression fix for github-actions (Issue #605).

Changes:

  • Introduces a SEMVER_COOLDOWN_ECOSYSTEMS allowlist and filters SemVer cooldown keys per-ecosystem during config generation.
  • Omits the cooldown block entirely when filtering removes all supported day fields for an ecosystem.
  • Adds/updates unit tests covering mixed ecosystem output, GitHub Actions filtering, and SemVer-only cooldown inputs.
File Description
dependabot_file.py Adds SemVer cooldown capability filtering and omits unsupported/empty cooldown blocks per ecosystem.
test_dependabot_file.py Adds regression tests to ensure unsupported SemVer cooldown keys are filtered (and cooldown omitted when empty).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@zkoppert
zkoppert marked this pull request as ready for review September 9, 2026 17:27
@zkoppert
zkoppert requested a review from jmeridth as a code owner September 9, 2026 17:27
@zkoppert
zkoppert merged commit ebed183 into main Sep 9, 2026
36 checks passed
@zkoppert
zkoppert deleted the fix/cooldown-ecosystem-support branch September 9, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cooldown Incorrectly Applied to github-actions Type

3 participants