-
Notifications
You must be signed in to change notification settings - Fork 213
refactor(ci): modularize pipeline utilities into lib/ structure #3817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
/review |
PR Reviewer Guide 🔍(Review updated until commit b3ffc23)Here are some key observations to aid the review process:
|
3d348ac to
40969eb
Compare
|
/review |
|
Persistent review updated to latest commit b3ffc23 |
|
/improve |
b3ffc23 to
a53e723
Compare
a53e723 to
bfbb110
Compare
|
The image is available at: |
|
The image is available at: |
|
Just testing my privileges /approve |
|
/approve |
|
/unapprove |
|
/remove-approve |
|
/lgtm |
Replaced the hardcoded OPENSHIFT_OPERATORS_NAMESPACE with OPERATOR_NAMESPACE in the cluster_setup_ocp_helm() and cluster_setup_ocp_operator() functions. This change improves flexibility and consistency in the deployment checks for OpenShift Pipelines.
Enhanced the configmap retrieval process by implementing a wait mechanism that checks for the existence of the default dynamic plugins configmap created by the operator. This change allows the script to wait for up to 2.5 minutes before failing, improving reliability in scenarios where the configmap may take time to be created. Additionally, updated error logging to provide more context if the configmap is not found after the wait period.
Removed unnecessary blank lines and adjusted spacing in the configmap retrieval logic to enhance code readability. These changes contribute to a cleaner codebase without altering functionality.
Added detailed diagnostic information to the k8s_wait::deployment function. When a timeout occurs, the script now logs pod status, pod description, pod logs, and recent events in the specified namespace. This improvement aids in troubleshooting deployment issues by providing more context on the state of resources at the time of failure.
Refactored the plugin merging process to intelligently combine custom and default plugins, ensuring that custom plugins take precedence while avoiding conflicts. This change enhances the flexibility of plugin management and preserves the operator's default plugin states.
Updated the plugin merging process to extract default plugins into a separate array and ensure deduplication by package name. This change improves the clarity of the merging strategy and enhances the robustness of plugin management while maintaining custom plugin precedence.
Removed the complex merging process for orchestrator plugins and streamlined the function to focus on waiting for the Backstage resource to be ready. Updated logging to reflect the new approach, enhancing clarity and maintainability of the code.
…nt function Implemented a wait mechanism to ensure that the external PostgreSQL database is fully ready before proceeding with the RBAC instance deployment. This change enhances the reliability of the deployment process by allowing immediate connection for the database creation job, and includes error logging for deployment failures.
… and deployment Enhanced the `enable_orchestrator_plugins_op` function to include error handling for the Backstage resource check, logging an error if the resource is not found. Additionally, implemented a wait mechanism in the `deploy_rhdh_operator` function to ensure the Backstage deployment is created by the operator, with appropriate logging for success and warnings for potential asynchronous creation.
…urce in operator deployment Enhanced the `deploy_rhdh_operator` function to verify the availability of the PostgresCluster CRD before deploying the Backstage resource. Implemented a wait mechanism to ensure the PostgresCluster resource is created by the operator, with detailed logging for success and error scenarios. This change improves the reliability of the deployment process and aids in troubleshooting.
…rator deployment Updated the `deploy_rhdh_operator` function to wait for either a PostgresCluster or StatefulSet resource to be created by the operator. Improved logging to provide clarity on which resource is being checked and added error handling for cases where neither resource is created within the specified wait time. This change enhances the reliability of the deployment process and aids in troubleshooting.
…sources Refined the `deploy_rhdh_operator` function to eliminate unnecessary whitespace and improve the clarity of the wait mechanism for database resource creation. This update enhances the readability of the code while maintaining the existing functionality and logging for resource checks.
Refined the `enable_orchestrator_plugins_op` function to improve the process of enabling orchestrator plugins. This update includes extracting and merging custom and default dynamic plugins, applying the merged configmap, and restarting the Backstage deployment. Enhanced logging and error handling were added to ensure clarity and reliability during the plugin enabling process.
…r Backstage resource Enhanced the `deploy_rhdh_operator` function to log an error if the Backstage deployment is not created within the specified wait time. Added additional logging to check the status of the Backstage CR and the operator logs for better troubleshooting. This change improves the reliability of the deployment process and aids in identifying issues during the Backstage resource creation.
…p function Updated the plugin merging process in the `enable_orchestrator_plugins_op` function to utilize yq for improved clarity and efficiency. The new implementation merges default and custom plugins while ensuring deduplication by package name, enhancing the robustness of plugin management and maintaining custom plugin precedence.
…utils.sh Removed the wait logic for Backstage deployment readiness after enabling orchestrator plugins. Updated logging to clarify that deployment verification will occur in subsequent calls, enhancing the clarity of the process.
Replace timeout bash -c subshells with proper polling loops to fix log:: functions not working inside subprocesses. Functions fixed: - wait_for_svc(): rewritten with polling loop - wait_for_endpoint(): rewritten with polling loop - check_operator_status(): rewritten with polling loop - waitfor_crunchy_postgres_*(): now uses k8s_wait::crd - waitfor_tekton_pipelines(): now uses k8s_wait::crd - install_pipelines_operator(): now uses k8s_wait::crd - delete_tekton_pipelines(): rewritten with polling loop Benefits: - log::info/success/error now work correctly - Consistent polling pattern across all wait functions - Reduced code duplication by using k8s_wait::crd - Variables now use 'local' keyword (DISPLAY_NAME → display_name) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update all Backstage Custom Resource manifests from v1alpha4 to v1alpha5. Changes: - apiVersion: rhdh.redhat.com/v1alpha4 → v1alpha5 - Remove spec.application.image (not supported in v1alpha5) - Add spec.deployment.patch to override container images - Configure dynamic-plugins-root volume with 10Gi storage The v1alpha5 API requires using deployment patches to customize the container image instead of the direct image field. Files updated: - rhdh-start.yaml - rhdh-start-rbac.yaml - rhdh-start-runtime.yaml Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update the function comment to accurately describe behavior: - The operator DOES create backstage-dynamic-plugins-* configmap - The function merges operator defaults with custom plugins - Custom plugins override defaults on package conflicts The previous comment incorrectly stated the operator doesn't create the default configmap, which contradicted the actual code behavior. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The ephemeral volume patch for dynamic-plugins-root was conflicting with the operator's default volume configuration. Removed the volume patch and let the operator handle the volume creation automatically (as it did in v1alpha4). This fixes the deployment timeout issue in e2e-ocp-operator-nightly where the backstage pod failed to become ready after enabling orchestrator plugins. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Temporarily disable the SonarQube dynamic plugin in the showcase sanity values file to address potential issues related to its integration. This change is part of ongoing adjustments to plugin management. # Conflicts: # .ibm/pipelines/value_files/diff-values_showcase-sanity-plugins.yaml
55f81b4 to
7f3aa17
Compare
|
The image is available at: /test e2e-ocp-helm |
|
|
The image is available at: |
|
@gustavolira: The following tests failed, say
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. |



Description
Extract common functions from utils.sh into focused modules to improve maintainability and reduce code duplication.
Which issue(s) does this PR fix
PR acceptance criteria
Please make sure that the following steps are complete:
How to test changes / Special notes to the reviewer