Skip to content

test: add pairing logic to toolchain-e2e#16

Merged
rsoaresd merged 10 commits into
codeready-toolchain:masterfrom
rsoaresd:pairing_logic_to_toolchain-e2e
Dec 16, 2025
Merged

test: add pairing logic to toolchain-e2e#16
rsoaresd merged 10 commits into
codeready-toolchain:masterfrom
rsoaresd:pairing_logic_to_toolchain-e2e

Conversation

@rsoaresd
Copy link
Copy Markdown
Contributor

@rsoaresd rsoaresd commented Dec 9, 2025

Description

This PR adds pairing logic with toolchain-e2e in order to enable the e2e tests in this repo

How to test

make test-e2e-in-container SSO_USERNAME=<SSO_USERNAME> SSO_PASSWORD=<SSO_PASSWORD>

What's the next steps?

  • onboard devsandbox-dashboard in CI

Issue ticket number and link

SANDBOX-1513

Comment thread make/test.mk Outdated
Comment on lines +11 to +23
.PHONY: test-e2e-local
test-e2e-local:
$(MAKE) test-e2e E2E_REPO_PATH=${PWD}/../toolchain-e2e PUBLISH_UI=true DEPLOY_UI=true

.PHONY: publish-current-bundles-for-e2e
publish-current-bundles-for-e2e: get-e2e-repo
# build & publish the bundles via toolchain-e2e repo
$(MAKE) -C ${E2E_REPO_PATH} publish-current-bundles-for-e2e UI_REPO_PATH=${PWD}

.PHONY: test-e2e
test-e2e: get-e2e-repo
# run the e2e test via toolchain-e2e repo
$(MAKE) -C ${E2E_REPO_PATH} prepare-and-deploy-e2e test-devsandbox-dashboard-e2e UI_REPO_PATH=${PWD} PUBLISH_UI=${PUBLISH_UI} DEPLOY_UI=${DEPLOY_UI}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused, why the test-e2e-local runs test-e2e while the test-e2e runs the two targets prepare-and-deploy-e2e test-devsandbox-dashboard-e2e - shouldn't it be consistent?

Also, I'm a bit confused with the mix of the usages of the PUBLISH_UI env var - why is it in she second case set to default which is false?

I'm comparing it with the other repos where we have the same logic and it's not matching.

Copy link
Copy Markdown
Contributor Author

@rsoaresd rsoaresd Dec 11, 2025

Choose a reason for hiding this comment

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

I'm a bit confused, why the test-e2e-local runs test-e2e while the test-e2e runs the two targets prepare-and-

test-e2e-local runs test-e2e that it is defined in file test.mk in this repo, not the one defined in toolchain-e2e
test-e2e runs the two targets prepare-and-deploy-e2e test-devsandbox-dashboard-e2e because I think we do not want to run the operators e2e tests in this repo, right?

Also, I'm a bit confused with the mix of the usages of the PUBLISH_UI env var - why is it in she second case set to default which is false?

I set them on that file for being clear which are the default values (if not present there, the person who is looking for the code needs to search in toolchain-e2e to figure it out the default values). But I can just mention in a comment, I will change it, thanks!

Copy link
Copy Markdown
Contributor Author

@rsoaresd rsoaresd Dec 11, 2025

Choose a reason for hiding this comment

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

@MatousJobanek, afterall, the vars config was needed for calling test-e2e (if not set, that vars will be empty) and the run will fail, example: https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_release/72470/rehearse-72470-pull-ci-codeready-toolchain-devsandbox-dashboard-pairing_logic_to_toolchain-e2e-e2e/1999129264741421056

So, I will drop all the config of that vars in this repo (a6c26c9), since we can simply to do this in toolchain-e2e side: codeready-toolchain/toolchain-e2e#1233

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

test-e2e-local runs test-e2e that it is defined in file test.mk in this repo, not the one defined in toolchain-e2e

stupid me 🤦‍♂️

test-e2e runs the two targets prepare-and-deploy-e2e test-devsandbox-dashboard-e2e because I think we do not want to run the operators e2e tests in this repo, right?

ah, right. yeah, that makes sense 👍

Copy link
Copy Markdown
Contributor

@mfrancisc mfrancisc left a comment

Choose a reason for hiding this comment

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

Nice job 👏

Just a couple of minor clarifications.

Comment thread README.md
_Prerequisites_:

1. You need a OCP cluster
- ROSA cluster from ClusterBot will not work since we are not able to modify the OAuth configuration of ROSA clusters created by the ClusterBot.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also CRC didn't worked for me - the rdhd pod was crashloopbacking and not deploying properly ( for some still unknown reason 😞 ) , this was the error in the logs:

Traceback (most recent call last):
  File "/opt/app-root/src/install-dynamic-plugins.py", line 523, in <module>
    main()
  File "/opt/app-root/src/install-dynamic-plugins.py", line 405, in main
    raise InstallException(f"Error while adding OCI plugin {package} to downloader: {e}")
InstallException: Error while adding OCI plugin oci://quay.io/fmuntean/sandbox-rhdh-plugin:27174259!red-hat-developer-hub-backstage-plugin-sandbox to downloader: Command '['/usr/bin/skopeo', 'copy', 'docker://quay.io/fmuntean/sandbox-rhdh-plugin:27174259', 'dir:/tmp/tmpp_ugusz8/150cc6c226e9b94f9ca76b7308907c1b64b83718596fb4cb230d9e94d70384f1']' died with <Signals.SIGABRT: 6>.

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.

It's strange because I was able to pull the image 🤨 Maybe we could contact rhdh team, what do you think? TBH, I do not use CRC

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.

It seems all good:

rsoaresd-mac:devsandbox-dashboard rsoaresd$ skopeo inspect docker://quay.io/fmuntean/sandbox-rhdh-plugin:27174259

{
    "Name": "quay.io/fmuntean/sandbox-rhdh-plugin",
    "Digest": "sha256:535f668fd81618d785e2e758543afd37ebcff6982904b724f994deab1cdf4ffc",
    "RepoTags": [
        "24192715",
        "27172521",
        "27174259",
        "28094436",
        "28100141",
        "28102512",
        "latest"
    ],
    "Created": "2025-11-27T16:43:13.528528033Z",
    "DockerVersion": "",
    "Labels": {
        "io.buildah.version": "1.42.0"
    },
    "Architecture": "arm64",
    "Os": "linux",
    "Layers": [
        "sha256:b1e527af46d144ade39a07127009a2fc2778a6f1d727c874fa94c164e6be2912"
    ],
    "LayersData": [
        {
            "MIMEType": "application/vnd.oci.image.layer.v1.tar+gzip",
            "Digest": "sha256:b1e527af46d144ade39a07127009a2fc2778a6f1d727c874fa94c164e6be2912",
            "Size": 4476720,
            "Annotations": null
        }
    ],
    "Env": [
        "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
    ]
}
rsoaresd-mac:devsandbox-dashboard rsoaresd$ 
rsoaresd-mac:devsandbox-dashboard rsoaresd$ skopeo copy docker://quay.io/fmuntean/sandbox-rhdh-plugin:27174259 dir:/tmp/test-dir
Getting image source signatures
Copying blob b1e527af46d1 done   | 
Copying config 0a900427ab done   | 
Writing manifest to image destination
rsoaresd-mac:devsandbox-dashboard rsoaresd$ 

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.

P.S. Going to try with CRC

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yeah it just fails when the rhdh installer tries to pull it.

If I try to pull it with skopeo on my Mac it works.

Comment thread make/test.mk
@@ -0,0 +1,73 @@
###########################################################
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

one thing I'm missing is the IMAGE_PLATFORM which drives the build of the tests and/or the build of the deployment images.

Is that being exposed somewhere else ?

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! But I guess that will not be passed to the test-e2e targets ? Maybe I'm wrong.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ok, thanks for explaining. I'll try it out later on 👍

Copy link
Copy Markdown
Contributor

@MatousJobanek MatousJobanek left a comment

Choose a reason for hiding this comment

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

Nice 👍

Copy link
Copy Markdown
Contributor

@mfrancisc mfrancisc left a comment

Choose a reason for hiding this comment

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

Nice job 🙌

@rsoaresd rsoaresd merged commit 7e398b5 into codeready-toolchain:master Dec 16, 2025
2 of 3 checks passed
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.

3 participants