Skip to content

Update Tools Approval Configuration to always Include Config defaulting to tools annotations#1499

Open
blublinsky wants to merge 1 commit intoopenshift:mainfrom
blublinsky:tools-approval-cleanup
Open

Update Tools Approval Configuration to always Include Config defaulting to tools annotations#1499
blublinsky wants to merge 1 commit intoopenshift:mainfrom
blublinsky:tools-approval-cleanup

Conversation

@blublinsky
Copy link
Copy Markdown
Contributor

Description

This PR finalizes the tools approval feature by removing the "not fully supported" warning and making the configuration behavior more predictable.

Key Changes:

Changed default approval type: never → tool_annotations

Updated +kubebuilder: default marker in ToolsApprovalConfig.ApprovalType
Aligns default behavior with the recommended usage pattern
Always generate the tools approval configuration:

Previously: Config omitted when ToolsApprovalConfig was nil
Now: Config is always present with CRD defaults when not specified
Improves predictability for OLS backend consumption

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up dependent library

Related Tickets & Documents

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

@openshift-ci openshift-ci bot requested review from bparees and raptorsun April 9, 2026 10:03
if cr.Spec.OLSConfig.ToolsApprovalConfig == nil {
// Use CRD defaults (must match +kubebuilder:default markers in ToolsApprovalConfig)
approvalType = string(olsv1alpha1.ApprovalTypeToolAnnotations) // CRD default: tool_annotations
approvalTimeout = 600 // CRD default: 600
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.

it is better we put this 600 value in the constant file and refer it as something like ToolApprovalTimeout

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@raptorsun
Copy link
Copy Markdown
Contributor

the logics are good. just a suggestion about using a constant for the timeout value.

@blublinsky blublinsky force-pushed the tools-approval-cleanup branch from a4f2ddb to 63e8d56 Compare April 9, 2026 13:17
@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 9, 2026
@blublinsky blublinsky force-pushed the tools-approval-cleanup branch from 63e8d56 to 533802a Compare April 10, 2026 08:24
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 10, 2026
@raptorsun
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 10, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 10, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: raptorsun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 10, 2026
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 68ffb02 and 2 for PR HEAD 533802a in total

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 11, 2026

@blublinsky: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/bundle-e2e-4-21 533802a link true /test bundle-e2e-4-21

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants