Skip to content

test: reenable ui e2e tests + improvements#1206

Merged
rsoaresd merged 8 commits intocodeready-toolchain:masterfrom
rsoaresd:fix_periodic_job
Oct 2, 2025
Merged

test: reenable ui e2e tests + improvements#1206
rsoaresd merged 8 commits intocodeready-toolchain:masterfrom
rsoaresd:fix_periodic_job

Conversation

@rsoaresd
Copy link
Copy Markdown
Contributor

@rsoaresd rsoaresd commented Sep 25, 2025

Description

  • reenable Developer Sandbox UI E2E Tests
  • improvements in getting the IMAGE_TO_PUSH_IN_QUAY, if we are running in periodic job we need to get from our codeready-toolchain quay org

Summary by CodeRabbit

  • Chores
    • Improved container image publishing so tags are environment-aware and consistent for PRs, CI runs, and local builds; local test runs can now optionally push the sandbox image.
  • Tests
    • Added UI-focused end-to-end tests into the main e2e workflow to increase coverage of user-facing behavior.
  • Documentation
    • Simplified local UI E2E test instructions by removing an obsolete push flag.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Sep 25, 2025

Walkthrough

Adds CI/PR-aware image naming and two public Make variables in make/sandbox-ui.mk, changes IMAGE_TO_PUSH_IN_QUAY to a conditional computed value, makes test-e2e depend on test-ui-e2e in make/test.mk, sets PUSH_SANDBOX_IMAGE=true in CI/test invocations, and removes that flag from the local UI E2E README.

Changes

Cohort / File(s) Summary
Container image naming logic
make/sandbox-ui.mk
Added QUAY_NAMESPACE and IMAGE_NAME_TO_PUSH_IN_QUAY. Replaced simple IMAGE_TO_PUSH_IN_QUAY default with a conditional, CI/PR-aware computation using IMAGE_NAME_TO_PUSH_IN_QUAY and CI metadata (REPOSITORY_NAME/REPO_NAME, PULL_NUMBER, COMMIT_ID_SUFFIX/PULL_PULL_SHA) with fallbacks to explicit quay tag or :latest.
E2E Make wiring
make/test.mk
Made test-e2e depend on test-ui-e2e, adding UI e2e to the main test-e2e workflow.
Push flag usage
make/sandbox-ui.mk, make/test.mk
CI/test invocations now pass PUSH_SANDBOX_IMAGE=true; internal usages updated to reference IMAGE_NAME_TO_PUSH_IN_QUAY for PR/latest cases.
Local UI E2E documentation
test/e2e/sandbox-ui/README.md
Removed PUSH_SANDBOX_IMAGE=true from the documented local run command.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant CI as CI Env / Local
  participant Make as make/sandbox-ui.mk
  participant Quay as Quay Registry

  CI->>Make: invoke build/push (envs vary)
  alt CI with CLONEREFS_OPTIONS + GITHUB_ACTIONS
    Make->>Make: IMAGE = ${IMAGE_NAME_TO_PUSH_IN_QUAY}:from.${REPOSITORY_NAME}.PR${PULL_NUMBER}.${COMMIT_ID_SUFFIX}
  else CI with CLONEREFS_OPTIONS (no GITHUB_ACTIONS)
    alt REPO_NAME unset
      Make->>Make: IMAGE = quay.io/codeready-toolchain/sandbox-rhdh-plugin:latest
    else REPO_NAME set
      Make->>Make: IMAGE = ${IMAGE_NAME_TO_PUSH_IN_QUAY}:from.${REPO_NAME}.PR${PULL_NUMBER}.${COMMIT_ID_SUFFIX}
    end
  else Local / Non-CI
    Make->>Make: IMAGE = ${IMAGE_NAME_TO_PUSH_IN_QUAY}:latest
  end
  alt When PUSH_SANDBOX_IMAGE=true
    Make->>Quay: push IMAGE
  end
Loading
sequenceDiagram
  autonumber
  participant Dev as Developer/CI
  participant Make as make (test-e2e)
  participant Deps as existing e2e prereqs
  participant UI as test-ui-e2e

  Dev->>Make: run target test-e2e
  Make->>Deps: run existing e2e prerequisites
  Make->>UI: run test-ui-e2e (CI may set PUSH_SANDBOX_IMAGE=true)
  UI-->>Make: return UI results
  Deps-->>Make: return other results
  Make-->>Dev: aggregate and report results
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • metlos
  • mfrancisc
  • MatousJobanek

Poem

I hop through Makefiles, tags in tow,
CI crafts names where PRs will go.
Quay waits patient, builds take flight,
Push when CI nods — local runs light. 🥕🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title accurately reflects the core purpose of the pull request by highlighting the re-enabling of UI end-to-end tests and summarizing the accompanying improvements to the image retrieval workflow, all in a concise and clear manner.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 11fe710 and 1b27654.

📒 Files selected for processing (1)
  • make/sandbox-ui.mk (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Unit Tests
  • GitHub Check: Build & push Developer Sandbox UI image for UI e2e tests
  • GitHub Check: Build & push operator bundles for e2e tests
🔇 Additional comments (2)
make/sandbox-ui.mk (2)

13-14: LGTM! Well-structured variable declarations.

The use of ?= allows callers to override these defaults, and the composition of IMAGE_NAME_TO_PUSH_IN_QUAY from QUAY_NAMESPACE provides good flexibility.


205-205: LGTM! Explicit flag for local testing.

Adding PUSH_SANDBOX_IMAGE=true to the local test target makes the behavior explicit and aligns with the PR's goal of improving image handling.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread make/sandbox-ui.mk Outdated
COMMIT_ID_SUFFIX=$$(echo "$${PULL_PULL_SHA}" | cut -c1-7); \
echo "from.$(REPO_NAME).PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX}"; \
if [ -z "$(REPO_NAME)" ]; then \
echo "quay.io/codeready-toolchain/sandbox-rhdh-plugin:v49"; \
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.

same used in sandbox-sre

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.

How would we make sure the periodic jobs are always using the latest version of the plugin? Is there a latest tag? If not, should we create one?

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.

This is the "same problem" we have right now in sandbox-sre, we need to be sure that it is updated to the latest version and not forget to update it (not ideal, of course). Regarding creating a latest tag, we can discuss it with the team. TBH, I do not know the reason why we do not have it

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.

The main reason is because we want to be able to first deploy the image on staging and only after testing and validating there we want to update production.

More details about how the CD works now https://github.com/codeready-toolchain/sandbox-sre/blob/master/components/rhdh/README.md

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.

That said , we could also build a tag with latest evertime we update the image, and use this only for e2e testing maybe.

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

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
make/test.mk (1)

45-45: UI E2E now part of test-e2e — ensure deterministic order (avoid -j hazards).

As added, test-ui-e2e is just another prerequisite and may run in parallel if make -j is used. If ordering matters (it likely does), either:

  • Mark the target non-parallel, or
  • Invoke $(MAKE) test-ui-e2e as the last recipe step instead of a prerequisite.

To prevent parallel execution for this target, add:

.NOTPARALLEL: test-e2e

Alternatively, move test-ui-e2e out of the prerequisite list and call it explicitly at the end of the test-e2e recipe.

make/sandbox-ui.mk (1)

13-14: Good addition; minor reuse improvement.

Consider deriving the registry path from the existing plugin name variable to avoid duplication.

Apply this small tweak:

-IMAGE_NAME_TO_PUSH_IN_QUAY ?= quay.io/$(QUAY_NAMESPACE)/sandbox-rhdh-plugin
+IMAGE_NAME_TO_PUSH_IN_QUAY ?= quay.io/$(QUAY_NAMESPACE)/$(SANDBOX_PLUGIN_IMAGE_NAME)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ed521a and fefc3e2.

📒 Files selected for processing (2)
  • make/sandbox-ui.mk (1 hunks)
  • make/test.mk (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Unit Tests
  • GitHub Check: GolangCI Lint
  • GitHub Check: Build & push operator bundles for e2e tests
  • GitHub Check: Build & push Developer Sandbox UI image for UI e2e tests

Comment thread make/sandbox-ui.mk Outdated
Comment on lines 15 to 35
# if $(REPO_NAME) is not set, it means that the E2E tests were triggered by periodic CI job
IMAGE_TO_PUSH_IN_QUAY := $(shell \
if [ -n "$(CI)$(CLONEREFS_OPTIONS)" ]; then \
if [ -n "$(GITHUB_ACTIONS)" ]; then \
REPOSITORY_NAME=$$(basename "$(GITHUB_REPOSITORY)"); \
COMMIT_ID_SUFFIX=$$(echo "$(PULL_PULL_SHA)" | cut -c1-7); \
echo "from.$${REPOSITORY_NAME}.PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX}"; \
echo "$(IMAGE_NAME_TO_PUSH_IN_QUAY):from.$${REPOSITORY_NAME}.PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX}"; \
else \
AUTHOR=$$(jq -r '.refs[0].pulls[0].author' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]'); \
PULL_PULL_SHA=$${PULL_PULL_SHA:-$$(jq -r '.refs[0].pulls[0].sha' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]')}; \
COMMIT_ID_SUFFIX=$$(echo "$${PULL_PULL_SHA}" | cut -c1-7); \
echo "from.$(REPO_NAME).PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX}"; \
if [ -z "$(REPO_NAME)" ]; then \
echo "quay.io/codeready-toolchain/sandbox-rhdh-plugin:v49"; \
else \
AUTHOR=$$(jq -r '.refs[0].pulls[0].author' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]'); \
PULL_PULL_SHA=$${PULL_PULL_SHA:-$$(jq -r '.refs[0].pulls[0].sha' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]')}; \
COMMIT_ID_SUFFIX=$$(echo "$${PULL_PULL_SHA}" | cut -c1-7); \
echo "$(IMAGE_NAME_TO_PUSH_IN_QUAY):from.$(REPO_NAME).PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX}"; \
fi; \
fi; \
else \
echo "latest"; \
echo "$(IMAGE_NAME_TO_PUSH_IN_QUAY):latest"; \
fi)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Fix bashism and brittle CI fallbacks in IMAGE_TO_PUSH_IN_QUAY computation.

  • Bash-only here-strings (<<<) will fail under /bin/sh (common in CI). Pipe JSON to jq instead.
  • Avoid hardcoded v49; use the existing TAG or make it overrideable.
  • Handle GitHub Actions periodic runs (no PULL_NUMBER/PULL_PULL_SHA): fallback to a stable tag.
  • Allow explicit override by callers (?= instead of :=).

Apply this diff:

-# if $(REPO_NAME) is not set, it means that the E2E tests were triggered by periodic CI job
-IMAGE_TO_PUSH_IN_QUAY := $(shell \
+# if $(REPO_NAME) is not set, it means that the E2E tests were triggered by periodic CI job
+IMAGE_TO_PUSH_IN_QUAY ?= $(shell \
     if [ -n "$(CI)$(CLONEREFS_OPTIONS)" ]; then \
         if [ -n "$(GITHUB_ACTIONS)" ]; then \
             REPOSITORY_NAME=$$(basename "$(GITHUB_REPOSITORY)"); \
-            COMMIT_ID_SUFFIX=$$(echo "$(PULL_PULL_SHA)" | cut -c1-7); \
-            echo "$(IMAGE_NAME_TO_PUSH_IN_QUAY):from.$${REPOSITORY_NAME}.PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX}"; \
+            COMMIT=$${PULL_PULL_SHA:-$${GITHUB_SHA}}; \
+            COMMIT_ID_SUFFIX=$$(echo "$${COMMIT}" | cut -c1-7); \
+            PULL_NO=$${PULL_NUMBER:-$$(echo "$${GITHUB_REF}" | sed -n 's#refs/pull/\([0-9]\+\)/.*#\1#p')}; \
+            if [ -n "$${PULL_NO}" ] && [ -n "$${COMMIT_ID_SUFFIX}" ]; then \
+              echo "$(IMAGE_NAME_TO_PUSH_IN_QUAY):from.$${REPOSITORY_NAME}.PR$${PULL_NO}.$${COMMIT_ID_SUFFIX}"; \
+            else \
+              echo "quay.io/codeready-toolchain/sandbox-rhdh-plugin:$(TAG)"; \
+            fi; \
         else \
             if [ -z "$(REPO_NAME)" ]; then \
-                echo "quay.io/codeready-toolchain/sandbox-rhdh-plugin:v49"; \
+                echo "quay.io/codeready-toolchain/sandbox-rhdh-plugin:$(TAG)"; \
             else \
-				AUTHOR=$$(jq -r '.refs[0].pulls[0].author' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]'); \
-            	PULL_PULL_SHA=$${PULL_PULL_SHA:-$$(jq -r '.refs[0].pulls[0].sha' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]')}; \
+				AUTHOR=$$(echo "$${CLONEREFS_OPTIONS}" | jq -r '.refs[0].pulls[0].author' | tr -d '[:space:]'); \
+            	PULL_PULL_SHA=$${PULL_PULL_SHA:-$$(echo "$${CLONEREFS_OPTIONS}" | jq -r '.refs[0].pulls[0].sha' | tr -d '[:space:]')}; \
             	COMMIT_ID_SUFFIX=$$(echo "$${PULL_PULL_SHA}" | cut -c1-7); \
                 echo "$(IMAGE_NAME_TO_PUSH_IN_QUAY):from.$(REPO_NAME).PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX}"; \
             fi; \
         fi; \
     else \
         echo "$(IMAGE_NAME_TO_PUSH_IN_QUAY):latest"; \
     fi)

Notes:

  • If you need a pinned tag for periodic jobs, consider parameterizing via TAG or a dedicated variable instead of hardcoding.
  • If GH-based pairing requires AUTHOR, set it from GITHUB_ACTOR in the GH path separately.

Please confirm:

  • CI uses /bin/sh (not bash). If yes, the above change is required to avoid syntax errors.
  • That quay.io/codeready-toolchain/sandbox-rhdh-plugin:$(TAG) exists for periodic runs (or provide the tag via TAG=<value>).

🏁 Script executed:

#!/bin/bash
# Verify bash-only here-strings in sandbox-ui.mk
rg -n '<<<' make/sandbox-ui.mk

# Check if TAG is defined anywhere in the repo
rg -nP '^\s*TAG\s*[:?]?=' .

Length of output: 268


Replace bashisms with POSIX-compliant syntax and parameterize TAG

  • Use ?= for IMAGE_TO_PUSH_IN_QUAY to allow overrides.
  • Replace <<< here-strings with echo "$${CLONEREFS_OPTIONS}" | jq -r ….
  • Swap hardcoded :v49 to :$(TAG) (defaults to latest at line 3).
  • In GitHub Actions branch, if PULL_NUMBER or commit SHA is unset, fallback to $(TAG) instead of failing.

Comment thread make/sandbox-ui.mk Outdated
Comment thread make/sandbox-ui.mk Outdated
COMMIT_ID_SUFFIX=$$(echo "$${PULL_PULL_SHA}" | cut -c1-7); \
echo "from.$(REPO_NAME).PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX}"; \
if [ -z "$(REPO_NAME)" ]; then \
echo "quay.io/codeready-toolchain/sandbox-rhdh-plugin:v49"; \
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.

How would we make sure the periodic jobs are always using the latest version of the plugin? Is there a latest tag? If not, should we create one?

@rsoaresd
Copy link
Copy Markdown
Contributor Author

/retest

likely is flaky, i will keep an eye

=== NAME  TestIdlerAndPriorityClass
    user_workloads_test.go:174: 
        	Error Trace:	/go/src/github.com/codeready-toolchain/toolchain-e2e/test/e2e/parallel/user_workloads_test.go:174
        	            				/go/src/github.com/codeready-toolchain/toolchain-e2e/test/e2e/parallel/user_workloads_test.go:43
        	Error:      	Received unexpected error:
        	            	context deadline exceeded
        	Test:       	TestIdlerAndPriorityClass
    clean.go:87: skipping object cleanup, test=TestIdlerAndPriorityClass failedTimestamp=Sep 26 14:03:21.129

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
test/e2e/sandbox-ui/README.md (1)

19-19: Docs match behavior of test-ui-e2e-local.

Dropping PUSH_SANDBOX_IMAGE from the local command aligns with the Make target. Consider mentioning QUAY_NAMESPACE default and that podman login to quay.io is required for pushes.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c89f48 and 44a8400.

📒 Files selected for processing (2)
  • make/sandbox-ui.mk (2 hunks)
  • test/e2e/sandbox-ui/README.md (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build & push Developer Sandbox UI image for UI e2e tests
  • GitHub Check: Build & push operator bundles for e2e tests
🔇 Additional comments (3)
make/sandbox-ui.mk (3)

13-15: Good extraction of registry/namespace defaults.

Defining QUAY_NAMESPACE and IMAGE_NAME_TO_PUSH_IN_QUAY upfront improves clarity and reuse.


205-205: Nice: local target auto-pushes plugin image.

Inline PUSH_SANDBOX_IMAGE=true in test-ui-e2e-local matches the docs change and reduces user friction.
If desired, add a short README note that a podman login to quay.io is required before running this.


16-35: Fix bashisms, remove hardcoded tag, and harden GH/periodic fallbacks in IMAGE_TO_PUSH_IN_QUAY.

  • Here-strings (<<<) are bash-only; Make defaults to /bin/sh in CI.
  • Hardcoded v49 makes periodic jobs brittle; parameterize via TAG.
  • In GH Actions, PULL_PULL_SHA/PULL_NUMBER may be unset; add fallbacks to GITHUB_SHA/GITHUB_REF.
  • Allow explicit overrides of IMAGE_TO_PUSH_IN_QUAY.

Apply:

-IMAGE_TO_PUSH_IN_QUAY := $(shell \
+IMAGE_TO_PUSH_IN_QUAY ?= $(shell \
     if [ -n "$(CI)$(CLONEREFS_OPTIONS)" ]; then \
         if [ -n "$(GITHUB_ACTIONS)" ]; then \
             REPOSITORY_NAME=$$(basename "$(GITHUB_REPOSITORY)"); \
-            COMMIT_ID_SUFFIX=$$(echo "$(PULL_PULL_SHA)" | cut -c1-7); \
-            echo "$(IMAGE_NAME_TO_PUSH_IN_QUAY):from.$${REPOSITORY_NAME}.PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX}"; \
+            COMMIT=$${PULL_PULL_SHA:-$${GITHUB_SHA}}; \
+            COMMIT_ID_SUFFIX=$$(echo "$${COMMIT}" | cut -c1-7); \
+            PULL_NO=$${PULL_NUMBER:-$$(echo "$${GITHUB_REF}" | sed -n 's#refs/pull/\([0-9]\+\)/.*#\1#p')}; \
+            if [ -n "$${PULL_NO}" ] && [ -n "$${COMMIT_ID_SUFFIX}" ]; then \
+              echo "$(IMAGE_NAME_TO_PUSH_IN_QUAY):from.$${REPOSITORY_NAME}.PR$${PULL_NO}.$${COMMIT_ID_SUFFIX}"; \
+            else \
+              echo "quay.io/codeready-toolchain/sandbox-rhdh-plugin:$(TAG)"; \
+            fi; \
         else \
             : "if REPO_NAME is not set, it means that the E2E tests were triggered by periodic CI job"; \
             if [ -z "$(REPO_NAME)" ]; then \
-                echo "quay.io/codeready-toolchain/sandbox-rhdh-plugin:v49"; \
+                echo "quay.io/codeready-toolchain/sandbox-rhdh-plugin:$(TAG)"; \
             else \
-				AUTHOR=$$(jq -r '.refs[0].pulls[0].author' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]'); \
-            	PULL_PULL_SHA=$${PULL_PULL_SHA:-$$(jq -r '.refs[0].pulls[0].sha' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]')}; \
+				AUTHOR=$$(echo "$${CLONEREFS_OPTIONS}" | jq -r '.refs[0].pulls[0].author' | tr -d '[:space:]'); \
+            	PULL_PULL_SHA=$${PULL_PULL_SHA:-$$(echo "$${CLONEREFS_OPTIONS}" | jq -r '.refs[0].pulls[0].sha' | tr -d '[:space:]')}; \
             	COMMIT_ID_SUFFIX=$$(echo "$${PULL_PULL_SHA}" | cut -c1-7); \
                 echo "$(IMAGE_NAME_TO_PUSH_IN_QUAY):from.$(REPO_NAME).PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX}"; \
             fi; \
         fi; \
     else \
         echo "$(IMAGE_NAME_TO_PUSH_IN_QUAY):latest"; \
     fi)

Notes:

  • If periodic runs must not use latest, set TAG in the job (e.g., TAG=v49) instead of hardcoding here.
  • If pairing logic relies on AUTHOR in GH, consider AUTHOR ?= $(GITHUB_ACTOR) at the top.

Run to confirm remaining bashisms and hardcoded tags:

#!/bin/bash
rg -n '<<<' make/sandbox-ui.mk || true
rg -n 'sandbox-rhdh-plugin:v[0-9]+' make/sandbox-ui.mk || true
rg -n 'IMAGE_TO_PUSH_IN_QUAY\s*:=' make/sandbox-ui.mk || true

Comment thread make/sandbox-ui.mk
SSO_PASSWORD_READ := $(shell if [ -n "$(CI)" ]; then cat /usr/local/sandbox-secrets/SSO_PASSWORD 2>/dev/null || echo ""; else echo "${SSO_PASSWORD}"; fi)

TAG := $(shell \
QUAY_NAMESPACE ?= codeready-toolchain-test
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.

this is already set in test.mk - we don't need duplication

Suggested change
QUAY_NAMESPACE ?= codeready-toolchain-test

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
Collaborator

Choose a reason for hiding this comment

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

That's weird. Most likely it's because the test.mk is alphabetically after this one, so it was evaluated later.

Comment thread make/sandbox-ui.mk
PULL_PULL_SHA=$${PULL_PULL_SHA:-$$(jq -r '.refs[0].pulls[0].sha' <<< $${CLONEREFS_OPTIONS} | tr -d '[:space:]')}; \
COMMIT_ID_SUFFIX=$$(echo "$${PULL_PULL_SHA}" | cut -c1-7); \
echo "from.$(REPO_NAME).PR$(PULL_NUMBER).$${COMMIT_ID_SUFFIX}"; \
: "if REPO_NAME is not set, it means that the E2E tests were triggered by periodic CI job"; \
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.

Suggested change
: "if REPO_NAME is not set, it means that the E2E tests were triggered by periodic CI job"; \
echo "if REPO_NAME is not set, it means that the E2E tests were triggered by periodic CI job"; \

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.

i used : in order to comment inside the shell

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.

ah, ok - I misunderstood that. I have never seen such a syntax, my bad.

Comment thread make/sandbox-ui.mk Outdated
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Sep 30, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MatousJobanek, rajivnathan, rsoaresd

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:
  • OWNERS [MatousJobanek,rajivnathan,rsoaresd]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Oct 1, 2025

@rsoaresd
Copy link
Copy Markdown
Contributor Author

rsoaresd commented Oct 1, 2025

/retest

flaky test:

    host.go:2005: failed to find Space with matching criteria:
        ----
        actual:
        metadata:
          creationTimestamp: "2025-10-01T12:21:13Z"
          finalizers:
          - finalizer.toolchain.dev.openshift.com
          generation: 1
          labels:
            toolchain.dev.openshift.com/state: pending
          name: space-waitinglist1
          namespace: toolchain-host-01115336
          resourceVersion: "94957"
          uid: 72a5846c-6909-401e-9723-e299ae09e462
        spec:
          tierName: appstudio
        status:
          conditions:
          - lastTransitionTime: "2025-10-01T12:21:13Z"
            message: unspecified target member cluster
            reason: ProvisioningPending
            status: "False"
            type: Ready
        
        ----
        diffs:
        expected target clusters not to be empty. Actual Space resource:
        &{{ } {space-waitinglist1  toolchain-host-01115336  72a5846c-6909-401e-9723-e299ae09e462 94957 1 2025-10-01 12:21:13 +0000 UTC <nil> <nil> map[toolchain.dev.openshift.com/state:pending] map[] [] [finalizer.toolchain.dev.openshift.com] [{e2e.test Update toolchain.dev.openshift.com/v1alpha1 2025-10-01 12:21:13 +0000 UTC FieldsV1 {"f:spec":{".":{},"f:tierName":{}}} } {host-operator Update toolchain.dev.openshift.com/v1alpha1 2025-10-01 12:21:13 +0000 UTC FieldsV1 {"f:metadata":{"f:finalizers":{".":{},"v:\"finalizer.toolchain.dev.openshift.com\"":{}},"f:labels":{".":{},"f:toolchain.dev.openshift.com/state":{}}}} } {host-operator Update toolchain.dev.openshift.com/v1alpha1 2025-10-01 12:21:13 +0000 UTC FieldsV1 {"f:status":{".":{},"f:conditions":{".":{},"k:{\"type\":\"Ready\"}":{".":{},"f:lastTransitionTime":{},"f:message":{},"f:reason":{},"f:status":{},"f:type":{}}}}} status}]} { [] appstudio  false} { [] [{Ready False 2025-10-01 12:21:13 +0000 UTC ProvisioningPending unspecified target member cluster <nil>}]}}
        
    space.go:108: 
        	Error Trace:	/go/src/github.com/codeready-toolchain/toolchain-e2e/testsupport/space/space.go:108
        	            				/go/src/github.com/codeready-toolchain/toolchain-e2e/test/e2e/space_autocompletion_test.go:73
        	Error:      	Received unexpected error:
        	            	context deadline exceeded
        	Test:       	TestAutomaticClusterAssignment/set_low_max_number_of_spaces_and_expect_that_space_won't_be_provisioned_but_added_on_waiting_list/increment_the_max_number_of_spaces_and_expect_that_first_space_will_be_provisioned.

@rsoaresd
Copy link
Copy Markdown
Contributor Author

rsoaresd commented Oct 1, 2025

/retest

infra issue

1 similar comment
@rsoaresd
Copy link
Copy Markdown
Contributor Author

rsoaresd commented Oct 1, 2025

/retest

infra issue

@rsoaresd rsoaresd merged commit 955f145 into codeready-toolchain:master Oct 2, 2025
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants