Skip to content

fix(ci): keep bot dependency PRs labeled and rebased automatically - #2752

Merged
Andriy Knysh (aknysh) merged 4 commits into
mainfrom
osterman/triage-dependabot-prs
Jul 14, 2026
Merged

fix(ci): keep bot dependency PRs labeled and rebased automatically#2752
Andriy Knysh (aknysh) merged 4 commits into
mainfrom
osterman/triage-dependabot-prs

Conversation

@osterman

@osterman Erik Osterman (Cloud Posse) (osterman) commented Jul 13, 2026

Copy link
Copy Markdown
Member

what

  • Add a default no-release label to renovate.json, matching the label Dependabot PRs already get from dependabot.yml.
  • Add "rebaseWhen": "behind-base-branch" to renovate.json so Renovate keeps its own PRs current with main.
  • Add a Mergify rule in .github/mergify.yml that runs update on any open Dependabot/Renovate PR against main that's conflict-free but behind — Dependabot has no native "keep up to date" option, so this fills that gap.

why

Triaging the ~18 open Dependabot/Renovate PRs turned up two systemic problems instead of one-off bad PRs:

  • Every open Renovate PR (10 of them) was failing the required PR Semver Labels check because it carried zero semver label. The check-cleanup logic in .github/workflows/codeql.yml's pr-semver-labels job only special-cases dependabot[bot], and dependabot.yml is the only place a default label gets set — Renovate PRs never got one.
  • main's branch protection requires the PR branch to be up to date (strict: true), but neither bot proactively rebases a clean, non-conflicting PR just because main moved, so PRs accumulate as BEHIND until someone manually updates them.

This is purely CI/automation config — no user-facing behavior change, hence no-release.

references

Renovate PRs had no semver label at all (only Dependabot gets one via
dependabot.yml), so every open Renovate PR failed the required "PR
Semver Labels" check. Add the same no-release label Dependabot uses.

Neither bot proactively rebases a clean PR just because main moved,
so PRs sat BEHIND under our strict branch-protection setting until
someone noticed. Renovate supports rebaseWhen natively; Dependabot
doesn't, so add a Mergify rule to update bot PR branches once they
fall behind.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@osterman Erik Osterman (Cloud Posse) (osterman) added the no-release Do not create a new release (wait for additional code changes) label Jul 13, 2026
@atmos-pro

atmos-pro Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f16ffe9c-2ac5-4e0f-b41d-e8fb47743801

📥 Commits

Reviewing files that changed from the base of the PR and between 051c6b9 and 0a06423.

📒 Files selected for processing (1)
  • pkg/workflow/control_matrix.go

📝 Walkthrough

Walkthrough

Repository automation configuration now restricts additional pull request edit flags, synchronizes eligible dependency-bot pull requests through Mergify, configures Renovate labeling and rebasing, and adjusts workflow matrix allocation hints.

Changes

Repository automation configuration

Layer / File(s) Summary
Command permission restrictions
.claude/settings.json
Adds denied patterns for base branch, reviewer, and milestone edits through gh pr edit.
Dependency pull request synchronization
.github/mergify.yml, renovate.json
Adds dependency-bot detection and updates eligible behind-base-branch pull requests without conflicts; Renovate adds the no-release label and rebases when behind the base branch.

Matrix allocation sizing

Layer / File(s) Summary
Matrix expansion allocation hints
pkg/workflow/control_matrix.go
Adjusts slice and map capacity hints in expandMatrix and adds CodeQL-related comments.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: minor

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the CI/dependency-bot automation changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch osterman/triage-dependabot-prs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size/s Small size PR label Jul 13, 2026
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

@mergify

mergify Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Important

Cloud Posse Engineering Team Review Required

This pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes.

To expedite this process, reach out to us on Slack in the #pr-reviews channel.

@mergify mergify Bot added the needs-cloudposse Needs Cloud Posse assistance label Jul 13, 2026
These denies were added alongside the autonomous pr-maintenance-loop work
to keep merge/close/label/reviewer/milestone changes human-owned for that
unattended hourly loop, but .claude/settings.json is repo-wide, so it was
also blocking closing and labeling PRs in ordinary interactive sessions.
Not the intent.
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jul 13, 2026
CodeQL alerts #5314-#5316 flagged len(rows)*len(matrix[axis]) and
len(row)+1 as potential overflow in allocation size arithmetic. Both
are just capacity hints for append/map-growth, so size each from a
single len() instead, matching the existing convention used elsewhere
in the codebase for this same CodeQL rule.
@github-actions

Copy link
Copy Markdown

Resource Changes Found for bucket in test

Atmos CI

create

Plan: 4 to add, 0 to change, 0 to destroy.
To reproduce this locally, run:

atmos terraform plan bucket -s test

Create

+ aws_s3_bucket.checkov_target
+ aws_s3_bucket.this
+ aws_s3_bucket.trivy_target
+ aws_s3_bucket_public_access_block.trivy_target
Terraform Plan Summary
  # aws_s3_bucket.checkov_target will be created
  + resource "aws_s3_bucket" "checkov_target" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "atmos-native-ci-e2e-checkov-test"
      + bucket_domain_name          = (known after apply)
      + bucket_prefix               = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = false
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = (known after apply)
      + policy                      = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags_all                    = (known after apply)
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + cors_rule (known after apply)

      + grant (known after apply)

      + lifecycle_rule (known after apply)

      + logging (known after apply)

      + object_lock_configuration (known after apply)

      + replication_configuration (known after apply)

      + server_side_encryption_configuration (known after apply)

      + versioning (known after apply)

      + website (known after apply)
    }

  # aws_s3_bucket.this will be created
  + resource "aws_s3_bucket" "this" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "atmos-native-ci-e2e-test"
      + bucket_domain_name          = (known after apply)
      + bucket_prefix               = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = false
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = (known after apply)
      + policy                      = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags                        = {
          + "AtmosFixture" = "native-ci-e2e"
          + "Stage"        = "test"
        }
      + tags_all                    = {
          + "AtmosFixture" = "native-ci-e2e"
          + "Stage"        = "test"
        }
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + cors_rule (known after apply)

      + grant (known after apply)

      + lifecycle_rule (known after apply)

      + logging (known after apply)

      + object_lock_configuration (known after apply)

      + replication_configuration (known after apply)

      + server_side_encryption_configuration (known after apply)

      + versioning (known after apply)

      + website (known after apply)
    }

  # aws_s3_bucket.trivy_target will be created
  + resource "aws_s3_bucket" "trivy_target" {
      + acceleration_status         = (known after apply)
      + acl                         = (known after apply)
      + arn                         = (known after apply)
      + bucket                      = "atmos-native-ci-e2e-trivy-test"
      + bucket_domain_name          = (known after apply)
      + bucket_prefix               = (known after apply)
      + bucket_regional_domain_name = (known after apply)
      + force_destroy               = false
      + hosted_zone_id              = (known after apply)
      + id                          = (known after apply)
      + object_lock_enabled         = (known after apply)
      + policy                      = (known after apply)
      + region                      = (known after apply)
      + request_payer               = (known after apply)
      + tags_all                    = (known after apply)
      + website_domain              = (known after apply)
      + website_endpoint            = (known after apply)

      + cors_rule (known after apply)

      + grant (known after apply)

      + lifecycle_rule (known after apply)

      + logging (known after apply)

      + object_lock_configuration (known after apply)

      + replication_configuration (known after apply)

      + server_side_encryption_configuration (known after apply)

      + versioning (known after apply)

      + website (known after apply)
    }

  # aws_s3_bucket_public_access_block.trivy_target will be created
  + resource "aws_s3_bucket_public_access_block" "trivy_target" {
      + block_public_acls       = true
      + block_public_policy     = true
      + bucket                  = (known after apply)
      + id                      = (known after apply)
      + ignore_public_acls      = true
      + restrict_public_buckets = true
    }

Plan: 4 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + bucket_name = "atmos-native-ci-e2e-test"

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@0de155e). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2752   +/-   ##
=======================================
  Coverage        ?   81.64%           
=======================================
  Files           ?     1648           
  Lines           ?   155530           
  Branches        ?        0           
=======================================
  Hits            ?   126988           
  Misses          ?    21585           
  Partials        ?     6957           
Flag Coverage Δ
unittests 81.64% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pkg/workflow/control_matrix.go 96.42% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aknysh
Andriy Knysh (aknysh) merged commit 5709e63 into main Jul 14, 2026
81 checks passed
@atmos-pro

atmos-pro Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Tip

Atmos Pro  

No affected stacks workflow was detected for this pull request.
If this is expected, no action is needed.
Learn More. Ask AI.

@aknysh
Andriy Knysh (aknysh) deleted the osterman/triage-dependabot-prs branch July 14, 2026 03:02
@mergify mergify Bot removed the needs-cloudposse Needs Cloud Posse assistance label Jul 14, 2026
@github-actions

Copy link
Copy Markdown

These changes were released in v1.223.0-rc.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-release Do not create a new release (wait for additional code changes) size/s Small size PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants