Skip to content
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

RP E2E Test Execution #3856

Merged
merged 11 commits into from
Nov 22, 2024
Merged

Conversation

shubhadapaithankar
Copy link
Collaborator

@shubhadapaithankar shubhadapaithankar commented Sep 20, 2024

Which issue this PR addresses:

This PR addresses inefficiencies in our CI and E2E testing process. The current setup is slow and lacks full containerization and Hive integration for cluster management. By using Docker Compose and integrating Hive, this PR reduces runtime, simplifies orchestration, and improves testing reliability.

Fixes: ARO-9501

What this PR does / why we need it:

This PR introduces an E2E testing stage using Docker Compose to orchestrate the RP, Selenium, and E2E test services. The pipeline pulls the required RP image from Azure Container Registry (ACR) and ensures the correct environment is set up for the E2E tests. It helps validate the end-to-end functionality of the system and ensures that tests are running using containerized RP images.

  • Why we need it: The E2E stage ensures that the entire system is tested in a environment, using containerized components (including RP) and validating workflows through Selenium for browser-based testing.
  • Key benefits: This change helps automate the test execution process for the complete system, ensuring that every aspect of the application functions correctly in a containerized environment before deployment.

Key Points:

  • Improved Efficiency: This new E2E pipeline reduces the runtime for both CI and E2E stages by more than half compared to the current process.
  • Hive Integration: We’re now using Hive in the pipeline to create and manage clusters. Hive allows us to propagate required credentials to the installer, as outlined in Hive’s AWS provisioning guide (we apply similar functionality for Azure). This is a major step forward for MIWI, as it enhances our cluster setup, ensuring smoother and more reliable testing.
  • Deployment of Hive Operator: Deploying the Hive Operator in this process is another major step forward for MIWI, ensuring better control and integration of clusters.
  • Fully Dockerized Process: All services are run via Docker Compose, allowing us to orchestrate the setup with a single command, making the process simpler and more streamlined.
  • Image Management: Images for components like rp and e2e are created during the CI containerized stage and then pulled directly for use in the E2E stage.

Test plan for issue:

  1. E2E tests are executed within the pipeline's new E2E stage using Docker Compose.
  2. The tests are triggered automatically after the Containerized stage, ensuring seamless orchestration.

Is there any documentation that needs to be updated for this PR?

N/A

How do you know this will function as expected in production?

N/A

@shubhadapaithankar shubhadapaithankar force-pushed the shubhadapaithankar/ARO-9501-RP-E2E-Test branch from 6062210 to 877e361 Compare November 20, 2024 16:00
slawande2
slawande2 previously approved these changes Nov 20, 2024
@shubhadapaithankar
Copy link
Collaborator Author

/azp run ci, e2e

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

jaitaiwan
jaitaiwan previously approved these changes Nov 22, 2024
Copy link
Contributor

@jaitaiwan jaitaiwan left a comment

Choose a reason for hiding this comment

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

LGTM, I had a small request to add a todo referencing the relevant JIRA where the skip is. Not necessary but I think a good addition. PR looks g.

docker-compose.yml Outdated Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
Copy link
Contributor

@jaitaiwan jaitaiwan left a comment

Choose a reason for hiding this comment

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

LGTM

@shubhadapaithankar
Copy link
Collaborator Author

/azp run ci, e2e

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

main() {
log "enter hive installation"
local skip_deployments=${1:-"none"}

if [ ! -f "./hack/hive/hive-config/hive-deployment.yaml" ] || [ ! -d "./hack/hive/hive-config/crds" ] ; then
if [[ ! -f "./hack/hive/hive-config/hive-deployment.yaml" ]] || [[ ! -d "./hack/hive/hive-config/crds" ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

What improvement does double bracket bring?

Copy link
Collaborator Author

@shubhadapaithankar shubhadapaithankar Nov 22, 2024

Choose a reason for hiding this comment

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

During pipeline testing, I found that the conditional on line 37 was failing when checking if PULL_SECRET is empty. Replacing [ ... ] with [[ ... ]] fixed the issue because [[ ... ]] handles empty values and special characters more reliably.

source : https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html
example from our code base: https://github.com/openshift-metal3/dev-scripts/blob/ab8100cfd50f03633d71a70a8a1207622e9e9122/common.sh#L122

@fahlmant fahlmant merged commit ed9f9c9 into master Nov 22, 2024
22 checks passed
@shubhadapaithankar shubhadapaithankar deleted the shubhadapaithankar/ARO-9501-RP-E2E-Test branch November 26, 2024 01:23
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.

8 participants