Skip to content

refactor(ci): update job handlers and cluster scripts to use namespaced functions - #4133

Merged
openshift-merge-bot[bot] merged 3 commits into
redhat-developer:mainfrom
gustavolira:RHIDP-11011
Jan 30, 2026
Merged

refactor(ci): update job handlers and cluster scripts to use namespaced functions#4133
openshift-merge-bot[bot] merged 3 commits into
redhat-developer:mainfrom
gustavolira:RHIDP-11011

Conversation

@gustavolira

@gustavolira gustavolira commented Jan 30, 2026

Copy link
Copy Markdown
Member

Summary

Update job handler, cluster provider, and main entry point scripts to use namespaced module functions. Remove backward compatibility shims now that all callers have been migrated.

RHIDP-11011: Job Handlers

File Old Function New Function
ocp-operator.sh yq_merge_value_files (2x) helm::merge_values
upgrade.sh get_chart_version helm::get_chart_version

RHIDP-11012: Cluster Provider Scripts + Entry Point

File Old Function New Function
openshift-ci-tests.sh get_chart_version helm::get_chart_version
aks-helm-deployment.sh uninstall_helmchart (2x) helm::uninstall
aks-helm-deployment.sh yq_merge_value_files (2x) helm::merge_values
aks-operator-deployment.sh yq_merge_value_files (2x) helm::merge_values
gke-helm-deployment.sh uninstall_helmchart (2x) helm::uninstall
gke-helm-deployment.sh yq_merge_value_files (2x) helm::merge_values
gke-operator-deployment.sh yq_merge_value_files (2x) helm::merge_values
eks-helm-deployment.sh uninstall_helmchart (2x) helm::uninstall
eks-helm-deployment.sh yq_merge_value_files (2x) helm::merge_values
eks-operator-deployment.sh yq_merge_value_files (2x) helm::merge_values

RHIDP-11015: Remove Shims

File Removed
lib/helm.sh 6 backward compatibility aliases (yq_merge_value_files, uninstall_helmchart, etc.)
utils.sh 4 k8s-wait shims (wait_for_deployment, wait_for_job_completion, etc.)
utils.sh 2 unused common shims (oc_login, get_previous_release_version)
utils.sh Migrated 17 internal usages to namespaced functions

Total: 11 files, 22 function migrations, 12 shims removed

Test plan

  • bash -n syntax check passed for all modified files
  • shellcheck --severity=warning passed (no new warnings in modified files)
  • Verified no remaining old function calls in jobs/, cluster/, or entry point

Closes: RHIDP-11011, RHIDP-11012, RHIDP-11015

🤖 Generated with Claude Code

- ocp-operator.sh: yq_merge_value_files → helm::merge_values (2 occurrences)
- upgrade.sh: get_chart_version → helm::get_chart_version

Closes: RHIDP-11011

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@openshift-ci
openshift-ci Bot requested review from rm3l and subhashkhileri January 30, 2026 15:45
@gustavolira gustavolira changed the title refactor(ci): update job handlers to use namespaced functions refactor(ci): update job handlers and cluster scripts to use namespaced functions Jan 30, 2026
…ions

- AKS/EKS/GKE helm-deployment: uninstall_helmchart → helm::uninstall
- AKS/EKS/GKE helm-deployment: yq_merge_value_files → helm::merge_values
- AKS/EKS/GKE operator-deployment: yq_merge_value_files → helm::merge_values

Closes: RHIDP-11012

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove 6 helm function aliases from lib/helm.sh
- Remove k8s-wait function shims from utils.sh
- Remove unused oc_login and get_previous_release_version shims
- Migrate 17 internal utils.sh usages to namespaced functions
- Keep sed_inplace shim (still used internally)

Closes: RHIDP-11015

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@albarbaro

Copy link
Copy Markdown
Member

/lgtm

@openshift-ci

openshift-ci Bot commented Jan 30, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: albarbaro

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

@gustavolira

Copy link
Copy Markdown
Member Author

/test ?

@gustavolira

Copy link
Copy Markdown
Member Author

/test e2e-ocp-helm-nightly

@github-actions

Copy link
Copy Markdown
Contributor

@openshift-merge-bot
openshift-merge-bot Bot merged commit 55b050d into redhat-developer:main Jan 30, 2026
19 of 20 checks passed
gustavolira added a commit to gustavolira/rhdh that referenced this pull request Jan 30, 2026
Fix command not found error by migrating missed function calls:
- wait_for_job_completion → k8s_wait::job
- wait_for_deployment → k8s_wait::deployment (2 calls)
- wait_for_endpoint → k8s_wait::endpoint (2 calls)

These were missed in PR redhat-developer#4133 when k8s-wait shims were removed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
gustavolira added a commit that referenced this pull request Jan 30, 2026
* refactor(ci): clean install-methods using lib functions

- Replace custom polling loops with common::poll_until in operator.sh
- Extract debug info collection to _operator_debug_info helper
- Remove unused install-methods/helm.sh (empty file)
- Reduce deploy_rhdh_operator from ~80 to ~50 lines

Closes: RHIDP-11013

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

* feat(ci): implement lib/config.sh module

- Create lib/config.sh with 5 configuration functions:
  - config::create_app_config_map
  - config::select_config_map_file
  - config::create_dynamic_plugins_config
  - config::create_conditional_policies_operator
  - config::prepare_operator_app_config
- Migrate all callers to use config:: prefix (no backward compatibility)
- Remove config function shims from utils.sh
- Migrate sed_inplace to common::sed_inplace
- Update lib/README.md documentation

Closes: RHIDP-11712

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

* fix(ci): migrate remaining k8s-wait function calls

Fix command not found error by migrating missed function calls:
- wait_for_job_completion → k8s_wait::job
- wait_for_deployment → k8s_wait::deployment (2 calls)
- wait_for_endpoint → k8s_wait::endpoint (2 calls)

These were missed in PR #4133 when k8s-wait shims were removed.

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

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants