Skip to content

eventshub RBAC resources independent to avoid deletion conflicts#538

Merged
knative-prow[bot] merged 1 commit intoknative-extensions:mainfrom
pierDipi:rbac-independent-resources
May 30, 2023
Merged

eventshub RBAC resources independent to avoid deletion conflicts#538
knative-prow[bot] merged 1 commit intoknative-extensions:mainfrom
pierDipi:rbac-independent-resources

Conversation

@pierDipi
Copy link
Copy Markdown
Member

By having [1] and the fact that:

  • eventshub's RBAC resources are namespace global
  • multiple parallel tests might run in a single namespace

we end up removing resources that are in active use by other tests.

[1] 8a5db1b

@knative-prow
Copy link
Copy Markdown

knative-prow bot commented May 30, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pierDipi

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

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 30, 2023
@pierDipi
Copy link
Copy Markdown
Member Author

/cc @mgencur @maschmid @creydr @matzew

@knative-prow knative-prow bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 30, 2023
@knative-prow knative-prow bot requested review from creydr, maschmid, matzew and mgencur May 30, 2023 08:43
@pierDipi pierDipi force-pushed the rbac-independent-resources branch 2 times, most recently from d0b3f68 to 384493c Compare May 30, 2023 09:02
By having [1] and the fact that:
- eventshub's RBAC resources are namespace global
- multiple parallel tests might run in a single namespace

we end up removing resources that are in active use by other tests.

[1] knative-extensions@8a5db1b

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
@pierDipi pierDipi force-pushed the rbac-independent-resources branch from 384493c to ac80065 Compare May 30, 2023 09:06
@mgencur
Copy link
Copy Markdown
Contributor

mgencur commented May 30, 2023

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label May 30, 2023
@mgencur
Copy link
Copy Markdown
Contributor

mgencur commented May 30, 2023

Curious. What does the error look like when the problem occurs? I've seen some issues so I want to compare them and see if this can be the root cause.

@knative-prow knative-prow bot merged commit cf14f44 into knative-extensions:main May 30, 2023
@pierDipi
Copy link
Copy Markdown
Member Author

@mgencur this is the error I get:

{
  "level": "error",
  "ts": "2023-05-26T14:31:18.686Z",
  "logger": "eventshub",
  "caller": "recorder_vent/recorder.go:118",
  "msg": "Server rejected event sink-lyjgyhje.Received.2. Reason: Unauthorized (will not retry!). Event: &Event{ObjectMeta:{sink-lyjgyhje.Received.2  serverless-tests    0 0001-01-01 00:00:00 +0000 UTC <nil> <nil> map[] map[] [] [] []},InvolvedObject:ObjectReference{Kind:Pod,Namespace:serverless-tests,Name:sink-lyjgyhje,UID:c1b54c33-2536-4674-8843-67b754573339,APIVersion:v1,ResourceVersion:214303,FieldPath:,},Reason:CloudEventObserved,Message:{\"kind\":\"Received\",\"event\":{\"specversion\":\"1.0\",\"id\":\"f73473c3-ddbd-4bbf-bf9f-af650170603f\",\"source\":\"https://knative.dev/eventing-contrib/cmd/heartbeats/#serverless-tests/heartbeats\",\"type\":\"dev.knative.eventing.samples.heartbeat\",\"datacontenttype\":\"application/json\",\"time\":\"2023-05-26T14:31:18.668595228Z\",\"data\":{\"id\":2,\"label\":\"\",\"msg\":\"msg c81bd61a-0a1c-43a5-8f88-0d3671d6f9ea for TestContainerSource\"},\"the\":\"42\",\"heart\":\"yes\",\"beats\":\"true\"},\"httpHeaders\":{\"Accept-Encoding\":[\"gzip\"],\"Content-Length\":[\"92\"],\"Content-Type\":[\"application/json\"],\"Host\":[\"sink-lyjgyhje.serverless-tests.svc.cluster.local\"],\"Traceparent\":[\"00-c9b02718dc06c61fe6180935ed55037e-f2fce60738ea2937-00\"],\"User-Agent\":[\"Go-http-client/1.1\"]},\"origin\":\"127.0.0.1:44684\",\"observer\":\"sink-lyjgyhje\",\"time\":\"2023-05-26T14:31:18.669065268Z\",\"sequence\":2,\"id\":\"\",\"additionalInfo\":null},Source:EventSource{Component:observer-default,Host:,},FirstTimestamp:2023-05-26 14:31:18.669127961 +0000 UTC m=+25.984291457,LastTimestamp:2023-05-26 14:31:18.669127961 +0000 UTC m=+25.984291457,Count:1,Type:Normal,EventTime:0001-01-01 00:00:00 +0000 UTC,Series:nil,Action:,Related:nil,ReportingController:,ReportingInstance:,}",
  "stacktrace": "knative.dev/reconciler-test/pkg/eventshub/recorder_vent.(*recorder).trySendEvent\n\t/go/src/github.com/openshift/origin/vendor/knative.dev/reconciler-test/pkg/eventshub/recorder_vent/recorder.go:118\nknative.dev/reconciler-test/pkg/eventshub/recorder_vent.(*recorder).recordEvent\n\t/go/src/github.com/openshift/origin/vendor/knative.dev/reconciler-test/pkg/eventshub/recorder_vent/recorder.go:84\nknative.dev/reconciler-test/pkg/eventshub/recorder_vent.(*recorder).Vent\n\t/go/src/github.com/openshift/origin/vendor/knative.dev/reconciler-test/pkg/eventshub/recorder_vent/recorder.go:78\nknative.dev/reconciler-test/pkg/eventshub.(*EventLogs).Vent\n\t/go/src/github.com/openshift/origin/vendor/knative.dev/reconciler-test/pkg/eventshub/event_log.go:40\nknative.dev/reconciler-test/pkg/eventshub/receiver.(*Receiver).ServeHTTP\n\t/go/src/github.com/openshift/origin/vendor/knative.dev/reconciler-test/pkg/eventshub/receiver/receiver.go:220\ngo.opencensus.io/plugin/ochttp.(*Handler).ServeHTTP\n\t/go/src/github.com/openshift/origin/vendor/go.opencensus.io/plugin/ochttp/server.go:92\nnet/http.serverHandler.ServeHTTP\n\t/usr/local/go/src/net/http/server.go:2916\nnet/http.(*conn).serve\n\t/usr/local/go/src/net/http/server.go:1966"
}

@pierDipi
Copy link
Copy Markdown
Member Author

and the test ifself just fails with:

    event_info_store.go:160: Timeout waiting for at least 1 matches.
        Error: FAIL MATCHING: saw 0/1 matching events.
        - Store-
        Pod 'sink-lyjgyhje' in namespace 'serverless-tests'
        - Recent events -
        0 events seen, last 0 events (total events seen 4851, events ignored 4851):
        
        - Match errors -
        
        Collected events: 
        knative.dev/reconciler-test/pkg/eventshub.(*Store).AssertAtLeast
        	/go/src/knative.dev/eventing-istio/third_party/eventing/vendor/knative.dev/reconciler-test/pkg/eventshub/event_info_store.go:160
        knative.dev/reconciler-test/pkg/eventshub/assert.MatchAssertionBuilder.AtLeast.func1
        	/go/src/knative.dev/eventing-istio/third_party/eventing/vendor/knative.dev/reconciler-test/pkg/eventshub/assert/step.go:41
        knative.dev/reconciler-test/pkg/environment.(*MagicEnvironment).executeStep.func1
        	/go/src/knative.dev/eventing-istio/third_party/eventing/vendor/knative.dev/reconciler-test/pkg/environment/execution.go:66
        testing.tRunner
        	/usr/local/go/src/testing/testing.go:1446
        runtime.goexit
        	/usr/local/go/src/runtime/asm_amd64.s:1594
            --- FAIL: TestContainerSourceWithArgs/SendsEventsWithArgs/Assert/containersource_as_event_source_to_test_args_message_delivers_events (240.00s)

@pierDipi
Copy link
Copy Markdown
Member Author

/cherry-pick release-1.10

@pierDipi pierDipi deleted the rbac-independent-resources branch July 28, 2023 13:53
@knative-prow-robot
Copy link
Copy Markdown

@pierDipi: #538 failed to apply on top of branch "release-1.10":

Applying: eventshub RBAC resources independent to avoid deletion conflicts
Using index info to reconstruct a base tree...
M	pkg/eventshub/103-pod.yaml
A	pkg/eventshub/104-forwarder.yaml
M	pkg/eventshub/eventshub_test.go
M	pkg/eventshub/resources.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/eventshub/resources.go
CONFLICT (content): Merge conflict in pkg/eventshub/resources.go
Auto-merging pkg/eventshub/eventshub_test.go
CONFLICT (content): Merge conflict in pkg/eventshub/eventshub_test.go
CONFLICT (modify/delete): pkg/eventshub/104-forwarder.yaml deleted in HEAD and modified in eventshub RBAC resources independent to avoid deletion conflicts. Version eventshub RBAC resources independent to avoid deletion conflicts of pkg/eventshub/104-forwarder.yaml left in tree.
Auto-merging pkg/eventshub/103-pod.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 eventshub RBAC resources independent to avoid deletion conflicts
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Details

In response to this:

/cherry-pick release-1.10

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/test-infra repository.

ReToCode pushed a commit to ReToCode/reconciler-test that referenced this pull request Aug 3, 2023
…tive-extensions#538)

By having [1] and the fact that:
- eventshub's RBAC resources are namespace global
- multiple parallel tests might run in a single namespace

we end up removing resources that are in active use by other tests.

[1] knative-extensions@8a5db1b

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

(cherry picked from commit cf14f44)
knative-prow bot pushed a commit that referenced this pull request Aug 3, 2023
… (#565)

By having [1] and the fact that:
- eventshub's RBAC resources are namespace global
- multiple parallel tests might run in a single namespace

we end up removing resources that are in active use by other tests.

[1] 8a5db1b

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>

(cherry picked from commit cf14f44)

Co-authored-by: Pierangelo Di Pilato <pierdipi@redhat.com>
@pierDipi pierDipi restored the rbac-independent-resources branch February 19, 2025 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants