Skip to content

add workflows for publishing operators and publishing the Developer Sandbox UI for UI E2E testing#149

Closed
rsoaresd wants to merge 1 commit intocodeready-toolchain:masterfrom
rsoaresd:add_actions_to_ui_e2e_tests
Closed

add workflows for publishing operators and publishing the Developer Sandbox UI for UI E2E testing#149
rsoaresd wants to merge 1 commit intocodeready-toolchain:masterfrom
rsoaresd:add_actions_to_ui_e2e_tests

Conversation

@rsoaresd
Copy link
Copy Markdown
Contributor

@rsoaresd rsoaresd commented Jul 29, 2025

Description

The UI E2E test environment is ready in the toolchain-e2e repository (check #1148). To integrate Developer Sandbox UI E2E tests into the toolchain-e2e CI pipeline, we need to implement the publish operators for UI E2E testing, since we need to have dedicated published operators for UI E2E testing because we need a different ToolchainConfig configuration because of the SSO: https://github.com/codeready-toolchain/toolchain-e2e/blob/master/deploy/host-operator/ui-e2e-tests/toolchainconfig.yaml.

So, to not duplicate the current publish-operators-for-e2e-tests, we need to adapt it to also publish operators for UI E2E testing

Related PRs

codeready-toolchain/toolchain-e2e#1180
codeready-toolchain/toolchain-e2e#1181

Issue ticket number and link

SANDBOX-1371

@rsoaresd rsoaresd changed the title add workflows for publishing operators and publishing the Developer Sandbox UI UI E2E testing add workflows for publishing operators and publishing the Developer Sandbox UI E2E testing Jul 29, 2025
@rsoaresd rsoaresd changed the title add workflows for publishing operators and publishing the Developer Sandbox UI E2E testing add workflows for publishing operators and publishing the Developer Sandbox UI for UI E2E testing Jul 29, 2025
if [[ -n ${PROVIDED_REF} ]]; then
GH_HEAD_REF_PARAM="GITHUB_HEAD_REF=${PROVIDED_REF}"
fi
make publish-current-bundles-for-e2e QUAY_NAMESPACE=${{ inputs.quay-namespace }} IMAGE_BUILDER=podman PULL_PULL_SHA=${{ inputs.sha }} PULL_NUMBER=${{ inputs.pr-number }} AUTHOR=${{ inputs.author }} ${GH_HEAD_REF_PARAM} ENVIRONMENT=ui-e2e-tests
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why do we need this special GHA composite? and why do we need to provide the ENVIRONMENT as part of "building & publishing" the bundles? There was probably some change that I missed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since we will have two jobs (one for running our current e2e tests and another to run the ui e2e tests), we need to deploy the operators twice. So, I created a different GHA composite for us to be able to publish a image just for the ui e2e tests. I passed the environment to be able to choose the image name, I was working on this proposed solution: https://github.com/codeready-toolchain/toolchain-e2e/pull/1180/files#diff-569b46caefde16d54d39745e2b26b2e9c19570d97da1e8f4471a587610e5961dR118

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ok, this PR is what I was missing codeready-toolchain/toolchain-e2e#1180
TBH, passing environment variable as part of building process is a bit weird. The built images should be environment agnostic, the environment is defined as part of the deployment.

Anyway, I wouldn't create a copy of the already existing composite that differs only in one parameter - let's update the existing and add any parameter we need and that will be set only in the case when it's needed (UI tests)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

but wait a sec, why do we actually need to build the bundle & index images for UI tests? there is no pairing with any of the related repos - we can always use the latest index image for UI tests, right?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I mean at least in the first phase when the tests will be executed separately, or am I missing some small detail?

Copy link
Copy Markdown
Contributor Author

@rsoaresd rsoaresd Jul 30, 2025

Choose a reason for hiding this comment

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

"Confusing" just in terms for us to keep in mind that the ui e2e tests job will deploy the latest operators and not doing pairing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe I am complicating this first phase, sorry!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't be sorry about that, it's most likely just me who is slow with understanding the final idea 😅 That's why I'm asking these questions 🙂

So what you are saying is that you wanted to enable pairing with reg-service, host-operator, and member-operator PRs from toolchain-e2e for UI tests, right? in other words:

  1. there is host-operator PR
  2. there is e2e-test PR
  3. we need to pair these two PRs so it uses
    • host-operator from the PR
    • toolchain-e2e from the PR
    • UI from master

At the same time:

  1. there is RHDH-plugins PR
  2. there is e2e-test PR
  3. we need to pair these two PRs so it uses
    • operators from master
    • toolchain-e2e from the PR
    • UI from the RHDH-plugins PR

Now I understand your point that we cannot simply rely on the latest version of the operators, because it would break the first case.

But for now, we won't run e2e tests in the RHDH-plugins repo, correct? It will be executed only in toolchain-e2e repo. It looks very similar to what we have for ksctl.
This means that we can rely on the already built operator bundles & images from the already existing GHA workflow https://github.com/codeready-toolchain/toolchain-e2e/blob/master/.github/workflows/publish-operators-for-e2e-tests.yml
in other words, use the same index image in the CatalogSources as we use in the current openshift-ci job for k8s API tests.

Does it cover the case?

Copy link
Copy Markdown
Contributor Author

@rsoaresd rsoaresd Jul 30, 2025

Choose a reason for hiding this comment

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

But for now, we won't run e2e tests in the RHDH-plugins repo, correct?

Correct! For now, we will only run on toolchain-e2e repo.

This means that we can rely on the already built operator bundles & images from the already existing GHA workflow https://github.com/codeready-toolchain/toolchain-e2e/blob/master/.github/workflows/publish-operators-for-e2e-tests.yml

Unfortunately, no, because we need to configure the ToolchainConfig: https://github.com/codeready-toolchain/toolchain-e2e/blob/master/deploy/host-operator/ui-e2e-tests/toolchainconfig.yaml, so we would need to publish the image for ui e2e tests anyway

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let me rephrase everything, sorry. I struggle to explain myself.

So, since we need to configure the ToolchainConfig: https://github.com/codeready-toolchain/toolchain-e2e/blob/master/deploy/host-operator/ui-e2e-tests/toolchainconfig.yaml, because of the SSO, we would need to publish the operators for ui e2e tests environment.

That's why I added a new GHA workflow, for us to publish a dedicated ui e2e tests images for host and member operators. I agree that we can reuse the current one instead of duplicating, i will address that.

So, in this first phase, we will enable the UI E2E testing only on toolchain-e2e repo, making available the pairing with host-operator, member-operator, registration-service, and RHDH plugin repo. So, if:

there is host-operator PR and toolchain-e2e PR, we need to pair these two PRs so it uses:

  • host-operator from the PR
  • toolchain-e2e from the PR
  • UI from master

there is RHDH-plugins PR and there is toolchain-e2e PR, we need to pair these two PRs so it uses:

  • operators from master
  • toolchain-e2e from the PR
  • UI from the RHDH-plugins PR

Comment on lines +1 to +2
name: 'Publish Current Developer Sandbox UI'
description: 'An action that publishes the current version of Developer Sandbox UI'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

in which repos will we run this action? In all where we run e2e tests or only in e2e and UI repo?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For now, just in toolchain-e2e. When we move the UI code to our own repo, we will run it there too.

Regarding host-operator, member-operator, and registration-service, we need to decide if we want to run them. In my opinion, i think it makes sense to run them there too. But first we need to check how stable the ui e2e tests will be on toolchain-e2e and ui repo.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ok, the reason why I asked was if we need another composite/GHA or if it can be part of the already existing build & push process.
For the simplicity, since it's gonna be executed in e2e repo only for now, you don't need to create a composite but a workflow in toolchain-e2e repo directly. It can be moved to the composite later when we decide where to run it.

Copy link
Copy Markdown
Contributor Author

@rsoaresd rsoaresd Jul 30, 2025

Choose a reason for hiding this comment

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

Deal, I will do on toolchain-e2e pr side to add the workflow directly: https://github.com/codeready-toolchain/toolchain-e2e/pull/1181/files

@rsoaresd
Copy link
Copy Markdown
Contributor Author

Closing this pr, i understood wrongly, we do not need dedicated operator images for ui e2e tests

@rsoaresd rsoaresd closed this Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants