Skip to content

Run the e2e suite with any default deployer - #4109

Open
gauron99 wants to merge 4 commits into
knative:mainfrom
gauron99:push-wtsqtpnwywkq
Open

gauron99 wants to merge 4 commits into
knative:mainfrom
gauron99:push-wtsqtpnwywkq

Conversation

@gauron99

Copy link
Copy Markdown
Contributor

Changes

  • 🧹 Tests find each deployed function through func describe instead of building a Knative Service URL, and reach it with an HTTP client that falls back to an in-cluster dialer pod when the host does not resolve. The suite then runs with any default deployer, such as raw.
  • 🧹 TestCore_Describe checks that the described route is set and that the function answers there, since the other tests rely on it.
  • 🧹 TestCore_Delete lists with every deployer's lister, as func list does.
  • 🧹 Both Subscriptions tests run func subscribe through newCmd, so they honor FUNC_E2E_PLUGIN and verbose mode.
  • 🧹 TestExpose_RemoteKedaRoute fails, instead of skipping, when it finds no KEDA HTTP interceptor Service, as the other keda Route tests do.
  • 🗑️ Remove FUNC_E2E_DOMAIN, which no test uses any more.

/kind cleanup

Tests ask func describe for the deployed function's route and reach it
with an HTTP client that falls back to an in-cluster dialer pod when
the host does not resolve. The suite then runs with any default
deployer, such as raw downstream.

Each deployer reports its own route: the Knative Service URL, or for
raw the cluster-local Service URL, which the dialer makes reachable
from the test runner with no Route or ingress. The HTTP and CloudEvents
checks both use that client. The expose tests keep their own client,
since they assert external reach.

Describe only locates the function; its response still decides whether
a test passes. TestCore_Describe asserts that the route is set and that
the function answers there, as the other tests rely on it.

TestCore_Delete lists with every deployer's lister, as func list does.
FUNC_E2E_DOMAIN is removed, since no test builds a function URL from it.
Both Subscriptions tests call func subscribe through newCmd, as every
other func call in the suite does, so the step honors FUNC_E2E_PLUGIN
(for kn func) and verbose mode.
TestExpose_RemoteKedaRoute fails when it finds no KEDA HTTP interceptor
Service, as the other keda Route tests fail without KEDA. A missing or
renamed interceptor on OpenShift then shows as a failure, not a skip.
@knative-prow knative-prow Bot added kind/cleanup Cleanup size/L 🤖 PR changes 100-499 lines, ignoring generated files. labels Oct 23, 2026
@knative-prow knative-prow Bot added the approved 🤖 PR has been approved by an approver from all required OWNERS files. label Oct 23, 2026
@gauron99
gauron99 requested review from lkingland and matejvasek and a balanced review from Copilot and removed request for dsimansk and jrangelramos October 23, 2026 07:39

Copilot AI left a comment

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.

🟡 Changes recommended

The fallback dialer ignores the selected test namespace, which can prevent cluster-local probes from running under namespace-scoped permissions.

1 open issue
What changed in this PR

Makes the end-to-end suite deployer-independent by discovering function routes through func describe and using an HTTP client with an in-cluster fallback.

Changes:

  • Replace constructed Knative URLs with described routes across deployment tests.
  • Validate described routes and check deletion through all deployers’ listers.
  • Standardize subscription commands, fail when the KEDA interceptor is missing, and remove obsolete domain configuration.
File Description
e2e/​README.md Remove obsolete domain configuration documentation.
e2e/​e2e_test.go Add route discovery and per-test fallback HTTP clients.
e2e/​e2e_remote_test.go Use described routes for remote deployments.
e2e/​e2e_recorder_test.go Reach recorder routes through the fallback client.
e2e/​e2e_podman_test.go Use described routes for Podman deployments.
e2e/​e2e_metadata_test.go Update route checks and standardize subscription commands.
e2e/​e2e_matrix_test.go Discover routes across deployment matrix tests.
e2e/​e2e_matrix_python_test.go Use described routes throughout Python deployment tests.
e2e/​e2e_lifecycle_test.go Use route discovery and fallback HTTP requests.
e2e/​e2e_instanced_test.go Update instance-state checks to use the shared client.
e2e/​e2e_expose_test.go Fail rather than skip when the interceptor is missing.
e2e/​e2e_core_test.go Validate described routes and list across deployers.
e2e/​e2e_config_ci_test.go Discover routes for workflow-deployed functions.

Review effort: Balanced

Comment thread e2e/e2e_test.go Outdated
The e2e HTTP client starts its fallback dialer pod in
FUNC_E2E_NAMESPACE, where the tests deploy functions, whatever
namespace the kubeconfig points at. A run that may create pods only in
the test namespace then still reaches cluster-local functions.
@gauron99
gauron99 requested a balanced review from Copilot October 23, 2026 08:13
Comment thread e2e/e2e_core_test.go
// defer func() {
// clean(t, name, Namespace)
// }()
// if !waitForContent(t, fmt.Sprintf("http://func-e2e-test-deploy-source.%s.%s", Namespace, Domain), "func-e2e-test-deploy-source") {

@aliok aliok Oct 23, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AI complains about this line that it has deleted var Domain in it. Ok to keep it or remove it.

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.

Thanks, Im digging into this more, the case that this sketch covers is one func does not allow currently and others similar are alrready covered. Will address in a followup either updarting or removing

@aliok

aliok commented Oct 23, 2026

Copy link
Copy Markdown
Member

/lgtm
/approve

@knative-prow knative-prow Bot added the lgtm 🤖 PR is ready to be merged. label Oct 23, 2026
@knative-prow

knative-prow Bot commented Oct 23, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok, gauron99

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:

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

Copilot AI left a comment

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.

🔵 Needs a closer look

No blocking defects were identified, but broader cluster-backed validation of cross-deployer routing and dialer cleanup remains unestablished.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved 🤖 PR has been approved by an approver from all required OWNERS files. kind/cleanup Cleanup lgtm 🤖 PR is ready to be merged. size/L 🤖 PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants