Skip to content

Fix COMPONENTS variable crash when COMPONENT_NAMES is not provided - #3011

Open
BabbarPB08 wants to merge 4 commits into
red-hat-data-services:release-2.25from
BabbarPB08:release-2.25
Open

Fix COMPONENTS variable crash when COMPONENT_NAMES is not provided#3011
BabbarPB08 wants to merge 4 commits into
red-hat-data-services:release-2.25from
BabbarPB08:release-2.25

Conversation

@BabbarPB08

Copy link
Copy Markdown

Problem

When COMPONENT_NAMES is not passed to the Jenkins job, the generateTestConfigFile.py script does not set the COMPONENTS variable in test-variables.yml. The fallback code in oc_install.robot that should handle this case is missing, there's no guard to create a default COMPONENTS dictionary when the variable doesn't exist.

This causes Apply DataScienceCluster CustomResource and Create DataScienceCluster CustomResource Using Test Variables keywords to crash with:

Invalid IF condition: Evaluating expression '$cmp not in $COMPONENTS' failed: 
Variable '$COMPONENTS' not found.

Fix

Added a Variable Should Exist check before accessing $COMPONENTS. If the variable is not defined, it defaults all components in COMPONENT_LIST to Managed using Create Dictionary + Set Suite Variable.

Tested

  • Without COMPONENT_NAMES: Previously crashed, now defaults all components to Managed and proceeds successfully
  • With COMPONENT_NAMES: No change in behavior, existing COMPONENTS variable is used as before
  • Verified on Jenkins: Build #5 SUCCESS

BabbarPB08 and others added 3 commits July 15, 2026 03:00
… not provided

When Jenkins triggers ods-ci without COMPONENT_NAMES parameter, the
COMPONENTS variable is never set in the test config YAML. This causes
Robot Framework to crash with 'Variable $COMPONENTS not found' when
creating the DataScienceCluster CR.

Add a guard that checks if COMPONENTS exists and defaults all components
to Managed if it doesn't, matching the expected behavior for a standard
RHOAI installation.

Cherry-picked fix onto release-2.25 branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d78f791d-5cfe-47ad-a37a-573049b96e8f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@sonarqubecloud

Copy link
Copy Markdown

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This is intentional, the VAR keyword is not compatible with Robot Framework 5, which is what our CI uses.
The original crash was caused by VAR. This fix deliberately uses Create Dictionary + Set Suite Variable for RF5 compatibility.

@BabbarPB08
BabbarPB08 requested review from apodhrad and asanzgom July 24, 2026 17:17
@BabbarPB08
BabbarPB08 enabled auto-merge July 29, 2026 22:46
@BabbarPB08

Copy link
Copy Markdown
Author

Hi @apodhrad @asanzgom

friendly ping on this one. It's been open for about a week now and all CI checks are green. Could you take a look when you get a chance? Happy to address any feedback. Thanks!

@sonarqubecloud

Copy link
Copy Markdown

@rkubis
rkubis self-requested a review August 27, 2026 08:49
@rkubis

rkubis commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci

openshift-ci Bot commented Aug 27, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BabbarPB08, rkubis

The full list of commands accepted by this bot can be found 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

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants