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

[WIP] CrossNamespace: e2e test to verify event delivery for broker and trigger #7933

Open
wants to merge 54 commits into
base: main
Choose a base branch
from

Conversation

yijie-04
Copy link
Contributor

@yijie-04 yijie-04 commented May 22, 2024

Fixes #7927

Proposed Changes

We should have an e2e test to verify that event delivery for broker and trigger when they are in different namespaces.

  • 🎁 Add new feature

Pre-review Checklist

  • At least 80% unit test coverage
  • E2E tests for any new behavior
  • Docs PR for any user-facing impact
  • Spec PR for any new API feature
  • Conformance test for any change to the spec

Release Note


Docs

@knative-prow knative-prow bot added area/test-and-release Test infrastructure, tests or release size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 22, 2024
@yijie-04
Copy link
Contributor Author

/cc @Cali0707 @pierDipi

@knative-prow knative-prow bot requested review from Cali0707 and pierDipi May 22, 2024 16:10
@yijie-04 yijie-04 changed the title CrossNamespace: e2e test to verify event delivery for broker and trigger [WIP] CrossNamespace: e2e test to verify event delivery for broker and trigger May 22, 2024
@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 22, 2024
Copy link
Member

@pierDipi pierDipi left a comment

Choose a reason for hiding this comment

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

A different test structure could be to create 2 environments so that you don't need to create your namespaces

	brokerEnvCtx, brokerEnv := global.Environment(
		knative.WithKnativeNamespace(system.Namespace()),
		knative.WithLoggingConfig,
		knative.WithTracingConfig,
		k8s.WithEventListener,
		environment.Managed(t),
	)

	triggerEnvCtx, triggerEnv := global.Environment(
		knative.WithKnativeNamespace(system.Namespace()),
		knative.WithLoggingConfig,
		knative.WithTracingConfig,
		k8s.WithEventListener,
		environment.Managed(t),
	)

        brokerEnv.Test(brokerEnvCtx, t, broker.GoesReady(...))
        triggerEnv.Test(triggerEnvCtx, t, trigger.CrossNamespaceEventLink(brokerEnvCtx, ...))

Copy link

codecov bot commented May 23, 2024

Codecov Report

Attention: Patch coverage is 8.82353% with 31 lines in your changes missing coverage. Please review.

Project coverage is 67.62%. Comparing base (c60bcd0) to head (8c07a7a).
Report is 1 commits behind head on main.

Files Patch % Lines
pkg/broker/filter/filter_handler.go 8.82% 30 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7933      +/-   ##
==========================================
- Coverage   67.68%   67.62%   -0.06%     
==========================================
  Files         354      354              
  Lines       16524    16539      +15     
==========================================
+ Hits        11184    11185       +1     
- Misses       4650     4665      +15     
+ Partials      690      689       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pierDipi
Copy link
Member

/test reconciler-tests

test/rekt/crossnamespace_test.go Outdated Show resolved Hide resolved
test/rekt/crossnamespace_test.go Outdated Show resolved Hide resolved
test/rekt/crossnamespace_test.go Outdated Show resolved Hide resolved
test/rekt/crossnamespace_test.go Outdated Show resolved Hide resolved
test/rekt/crossnamespace_test.go Outdated Show resolved Hide resolved
test/rekt/features/trigger/crossnamespace.go Outdated Show resolved Hide resolved
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 3, 2024
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 3, 2024
OWNERS_ALIASES Outdated Show resolved Hide resolved
Copy link

knative-prow bot commented Jun 7, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: yijie-04
Once this PR has been reviewed and has the lgtm label, please assign creydr for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

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

@Cali0707
Copy link
Member

Cali0707 commented Jun 9, 2024

/test reconciler-tests

Looks like the last failure was at least partially due to infra problems

Copy link

knative-prow bot commented Jun 11, 2024

@yijie-04: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
reconciler-tests_eventing_main 8c07a7a link true /test reconciler-tests

Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test-and-release Test infrastructure, tests or release do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CrossNamespace: Testing Data Plane Changes for Broker Filter
4 participants