Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
approve:
- commandHelpLink: https://go.k8s.io/bot-commands
ignore_review_state: true
repos:
- openshift/sandboxed-containers-operator
require_self_approval: true
plugins:
openshift/sandboxed-containers-operator:
plugins:
- approve
Comment on lines +7 to +10
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify plugin map structure used across repository plugin configs.
# Expected pattern examples: plugins: <repo>: - approve

set -euo pipefail

echo "== Files containing nested repo.plugins key under pluginconfig =="
rg -n -C2 '^(\s{2,}|\t+)plugins:\s*$' $(fd '_pluginconfig\.yaml$')

echo
echo "== Files containing direct repo -> list form in pluginconfig =="
rg -n -C2 '^plugins:\n(\s{2,}|\t+)[^:\n]+/[^:\n]+:\n(\s{2,}|\t+)-\s+\w+' $(fd '_pluginconfig\.yaml$') || true

Repository: openshift/release

Length of output: 50583


🏁 Script executed:

# Look at the specific file being reviewed to confirm its exact structure
cat core-services/prow/02_config/openshift/sandboxed-containers-operator/_pluginconfig.yaml

Repository: openshift/release

Length of output: 309


🌐 Web query:

Prow plugin configuration schema nested plugins structure YAML format

💡 Result:

The Prow plugin configuration is defined in a YAML file named plugins.yaml. This file specifies which plugins are enabled for specific organizations and repositories, along with plugin-specific configurations. There is no formal JSON schema available in the official documentation, but the structure is defined by the Go struct in sigs.k8s.io/prow/pkg/plugins.Configuration, which can be viewed in Go documentation or source code. Key structure elements from official sources: - Top-level keys are plugin names (e.g., triggers, lgtm, size, config_updater, external_plugins). - Plugins are enabled per org or org/repo with lists of plugin names. - Plugin-specific configs are nested maps under each plugin name. Example from kubernetes/test-infra config/prow/plugins.yaml (master branch): plugins: kubernetes-sigs: - assign - trigger - label - mergecommitblocker - size - skip - wip triggers: - repos: - kubernetes-sigs/cluster-api # ... more repos join_org_url: "https://git.k8s.io/community/community-membership.md#member" only_org_members: true lgtm: - repos: - bazelbuild - kubernetes-sigs/aws-ebs-csi-driver # ... more repos review_acts_as_lgtm: true size: s: 10 m: 30 l: 100 xl: 500 config_updater: maps: config/prow/plugins.yaml: name: plugin external_plugins: org-foo/repo-bar: - name: refresh-remote endpoint: https://my-refresh-plugin.com events: - issue_comment The configuration is loaded and validated by Prow's ConfigAgent.Load function, which unmarshals YAML into the Configuration struct and checks for unknown plugins if enabled. For full field descriptions, refer to the GoDoc at https://godoc.org/sigs.k8s.io/prow/pkg/plugins or pkg.go.dev. Nested structure refers to: 1. Hierarchical enabling: org-level plugins apply to all repos unless excluded via excluded_repos; repo-specific overrides. 2. Plugin configs as nested objects (e.g., triggers.repos list, lgtm.review_acts_as_lgtm bool). 3. External plugins as nested lists under external_plugins. No evidence of deeply recursive "nested plugins" (plugins containing plugins); structure is flat lists with nested config objects per plugin type.

Citations:


Remove nested plugins: key to match Prow's plugin configuration schema.

The nested plugins: at line 9 is invalid. According to Prow's official plugin configuration schema (from sigs.k8s.io/prow/pkg/plugins), repository-scoped plugins must be a flat list directly under the repository key, not a nested object. The current structure will prevent the approve plugin from loading.

Proposed fix
 plugins:
   openshift/sandboxed-containers-operator:
-    plugins:
-    - approve
+  - approve
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
plugins:
openshift/sandboxed-containers-operator:
plugins:
- approve
plugins:
openshift/sandboxed-containers-operator:
- approve
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@core-services/prow/02_config/openshift/sandboxed-containers-operator/_pluginconfig.yaml`
around lines 7 - 10, The repository entry
"openshift/sandboxed-containers-operator" incorrectly nests a "plugins:" key;
remove that nested key and place the flat list of plugin names directly under
the repository key so the "approve" plugin is defined as a top-level list item
for openshift/sandboxed-containers-operator. Update the block that references
"openshift/sandboxed-containers-operator" to have a single plugins list
containing "approve" (no inner "plugins:" object), ensuring it conforms to
Prow's sigs.k8s.io/prow/pkg/plugins schema.

Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,19 @@ branch-protection:
protect: true
osc-release-v1.11:
protect: true
tide:
merge_method:
openshift/sandboxed-containers-operator: merge
queries:
- labels:
- approved
- lgtm
missingLabels:
- backports/unvalidated-commits
- do-not-merge/hold
- do-not-merge/invalid-owners-file
- do-not-merge/work-in-progress
- jira/invalid-bug
- needs-rebase
repos:
- openshift/sandboxed-containers-operator