Skip to content

Add Redfish exporter fork repo - #587

Open
dougszumski wants to merge 1 commit into
mainfrom
conf/add-redfish-rexporter
Open

dougszumski wants to merge 1 commit into
mainfrom
conf/add-redfish-rexporter

Conversation

@dougszumski

Copy link
Copy Markdown
Member

We have maintained this fork for sometime and use it in OpenStack deployments via Kayobe. It uses branch main as the default so we add a new Kayobe branch protection rule.

The alternative is that we put it under SRE since it's not tied to Kayobe, just used with it. We would then need to change codeowners.

Assisted-By: Claude Opus 5.5 noreply@anthropic.com

@dougszumski
dougszumski requested a review from a team as a code owner November 4, 2026 17:42
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Explain Change →

Summary

Adds redfish_exporter as a single-branch source repository with Monitoring CODEOWNERS. Adds a Monitoring team with push access and branch protection for its repositories. Sets build as the required status check for redfish_exporter.

The change adds the Monitoring team and registers redfish_exporter under that team. It configures monitoring CODEOWNERS content, a required build status check, team push access, and branch protection for Monitoring repositories.

Changes: Monitoring repository onboarding

Layer / File(s) Summary
Configure Monitoring and redfish_exporter
ansible/inventory/group_vars/all/source-repositories, terraform/github/variables.tf, terraform/github/terraform.tfvars.json
Adds the Monitoring team configuration and registers redfish_exporter with monitoring CODEOWNERS content. Adds build as the repository’s default required status check.
Grant Monitoring repository access
terraform/github/teams.tf
Grants the Monitoring team push permission to each repository in its configured repository list.
Protect Monitoring repository branches
terraform/github/branches.tf
Adds branch protection for each Monitoring repository’s default branch. The protection requires conversation resolution and one code-owner-reviewed approval, blocks deletion and force pushes, allows pushes by the Developers team, uses configured default status checks or an empty list, and prevents destruction.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • stackhpc/stackhpc-release-train#586: Changes how source-repo-sync updates community files and their pull requests, including the CODEOWNERS file configured for redfish_exporter.
Merge Risk: Moderate · up to d2d64

The new Monitoring team will make the repository import workflow fail with a KeyError, which blocks onboarding of the existing redfish_exporter repository. Update the importer to handle Monitoring, then run the import and obtain a new plan before merging.

Pre-merge checks: Passed 3

Check name Status Explanation
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (5 skipped: 5 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 50f93c3 and 302159b.

Files selected for processing: 3
  • ansible/inventory/group_vars/all/source-repositories
  • terraform/github/branches.tf
  • terraform/github/terraform.tfvars.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Comment thread terraform/github/branches.tf Outdated
Comment on lines +373 to +376
for_each = toset([
for repository in var.repositories["Kayobe"] : repository
if data.github_repository.repositories[repository].default_branch == "main"
])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Major · Stability & Availability · Quick win

Supported by static analysis

Script executed:

sed -n '1,105p' terraform/github/branches.tf
sed -n '285,430p' terraform/github/branches.tf
sed -n '90,130p' docs/usage/github-organisation-management.md
sed -n '35,70p' terraform/github/terraform.tfvars.json

Repository: stackhpc/stackhpc-release-train

Length of output: 11097


Keep this rule's instance when a Kayobe repository changes its default branch.

The for_each at terraform/github/branches.tf:373-376 keeps a repository only while its default_branch is main. When a repository changes its default branch, Terraform plans to destroy that instance. The block sets prevent_destroy = true, so Terraform rejects the plan. The workspace plan then fails until an operator runs terraform state rm in Terraform Cloud. The trigger is rare, but recovery needs access to the Terraform Cloud GitHub workspace.

Decide the intended scope before you change the key. The Ansible and Batch resources set pattern from default_branch for all repositories in their list. Applying that pattern here protects the default branch of every Kayobe repository, not only repositories whose default branch is main. If a Kayobe repository uses stackhpc/master or stackhpc/2026.1 as its default branch, its pattern duplicates an existing rule in kayobe_branch_protection_master or kayobe_branch_protection_gazpacho. After you confirm the scope, use a stable for_each key and set pattern to match it.

Tools
Checkov (3.3.29)

[low] 372-405: Ensure GitHub branch protection rules requires signed commits

(CKV_GIT_6)


[medium] 372-405: GitHub pull requests should require at least 2 approvals

(CKV_GIT_5)

@stackhpc-ci

Copy link
Copy Markdown
Contributor

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖success

Validation Output

Success! The configuration is valid.


Terraform Plan 📖success

Show Plan

undefined

Pusher: @dougszumski, Action: pull_request, Working Directory: ``, Workflow: Terraform GitHub

@dougszumski
dougszumski force-pushed the conf/add-redfish-rexporter branch 2 times, most recently from a2ab362 to 7554891 Compare November 6, 2026 12:56
We have maintained this fork for some time and use it in OpenStack
deployments via Kayobe. Since it is not tied to Kayobe, just used
with it, we add a new Monitoring team to own it. Membership mirrors
the OpenStack team.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@dougszumski
dougszumski force-pushed the conf/add-redfish-rexporter branch from 7554891 to d2d6433 Compare November 6, 2026 13:07
"privacy": "closed",
"users": {
"maintainers": [
"dougszumski",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

feel free to amend this, it's just based on historical contributors to the redfish exporter currently

@dougszumski

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 302159b and d2d6433.

Files selected for processing: 5

  • ansible/inventory/group_vars/all/source-repositories
  • terraform/github/branches.tf
  • terraform/github/teams.tf
  • terraform/github/terraform.tfvars.json
  • terraform/github/variables.tf

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Comment thread terraform/github/terraform.tfvars.json Resolved

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants