[release-4.22] OCPBUGS-98062: E2E: Fix tuned active profile check for wrapped performance profiles#1559
Conversation
Test 37127 read /etc/tuned/active_profile on the node and expected the performance profile name. That fails when a higher-priority Tuned CR wraps the PP via include=<pp-profile> (e.g. ran-du-performance), because the active profile name is the wrapper, not the PP name. Detect wrapper profiles by scanning Tuned CRs for include=<pp-profile> and assert Profile.status.tunedProfile via the API instead of pod exec. Traverse the tuned profile chain In this commit we are traversing the Tuned profile that contains includes= and verifying if we can traverse back to Performance Profile AI Attribution: AIA Human-AI blend, New content, Human-initiated, Reviewed, Cursor 3.0.16 v1.0 Signed-off-by: Niranjan M.R <mniranja@redhat.com>
- Fix Hypershift compatibility: Use DataPlaneClient for listing Tuned CRs On Hypershift clusters, tuned objects are on the data plane, not control plane. - Add error handling: Change function signatures to return (bool, error) Return errors for unexpected conditions (cycles, missing profiles, parsing failures) while returning (false, nil) for valid "not found" cases. Error cases: * Cycle detected in profile chain * Profile referenced but not found in cluster * Chain exceeded maximum depth * INI parsing failed Valid "not found" case: * Profile chain ends without reaching target (false, nil) - Add logging for better observability: * Log when INI parsing fails with the error details * Log when profiles have no 'include' key * Log when 'include' value is empty * Changed dead-end from Warning to Info (it's a normal case)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@openshift-cherrypick-robot: Jira Issue OCPBUGS-93863 has been cloned as Jira Issue OCPBUGS-98062. Will retitle bug to link to clone. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: openshift-cherrypick-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-98062, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@mrniranjan: This pull request references Jira Issue OCPBUGS-98062, which is invalid:
Comment DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@mrniranjan: This pull request references Jira Issue OCPBUGS-98062, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
/test e2e-aws-operator |
|
@openshift-cherrypick-robot: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
This is an automated cherry-pick of #1549
/assign mrniranjan