Coder Social home page Coder Social logo

cloudevents-player's People

Contributors

evankanderson avatar mvazquezc avatar ruromero avatar snyk-bot avatar tqvarnst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cloudevents-player's Issues

UI fails with HTTP 403

Running version 1.3 from main branch, in Knative mode.
The console fails with errors like:

POST https://cloudevents-player-dmartino-kafka.apps.ocp-dev01.lab.eng.tlv2.redhat.com/messages net::ERR_ABORTED 403 (Forbidden)

On the same environment, no issues with previous version v1.1 (v1.2 instead is affected by the same problem)

Duplicated media type (concatenated with ",")

I see the following message being posted from the most recent build (12 hours ago):

"root":{
  "attributes":{
    "datacontenttype":string"application/json",
    "id":string"test",
    "mediaType":string"application/json",
    "source":string"knative.dev/test",
    "specversion":string"0.3",
    "type":string"test.testing",
  },
  "data":{
    "message":string"Hello CloudEvents!",
  },
  "extensions":{},
}

Which leads to the following server-side error:

2019-11-18 04:53:10,387 WARN [org.jbo.res.res.i18n] (executor-thread-21) RESTEASY002130: Failed to parse request.: java.lang.IllegalArgumentException: RESTEASY003340: Failure parsing MediaType string: application/json,application/json
at org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate.internalParse(MediaTypeHeaderDelegate.java:113)
at org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate.parse(MediaTypeHeaderDelegate.java:64)
at org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate.fromString(MediaTypeHeaderDelegate.java:29)
at javax.ws.rs.core.MediaType.valueOf(MediaType.java:172)
at org.jboss.resteasy.specimpl.ResteasyHttpHeaders.getMediaType(ResteasyHttpHeaders.java:151)
at org.jboss.resteasy.specimpl.ResteasyHttpHeaders.testParsing(ResteasyHttpHeaders.java:69)
at org.jboss.resteasy.plugins.server.servlet.ServletUtil.extractHttpHeaders(ServletUtil.java:59)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:226)
at io.quarkus.resteasy.runtime.ResteasyFilter.doFilter(ResteasyFilter.java:30)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:160)
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:63)
at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:133)
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:65)
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:270)
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:59)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:116)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:113)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.quarkus.undertow.runtime.UndertowDeploymentRecorder$9$1$1.call(UndertowDeploymentRecorder.java:469)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:250)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:59)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:82)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:290)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:669)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:479)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:460)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)

Page fails over HTTPS endpoint

Page cannot load when the page is exposed through a TLS route and the WS endpoint is not secured

The page at https://cloudevents-player.apps.example.com/ was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://cloudevents-player.apps.example.com'. This request has been blocked; this endpoint must be available over WSS.

possible to support ARM images?

I try to learn it using minikube@Mac M1, but the image doesn't exist and I tried to rebuild

$ podman build -t quay.io/ruben/cloudevents-player:latest -f src/main/docker/Dockerfile.native .
STEP 1/6: FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
Trying to pull registry.access.redhat.com/ubi8/ubi-minimal:8.3...
Getting image source signatures
Checking if image destination supports signatures
Copying blob sha256:56a04d997355c19a50990df9442628967dba3293799b2c058e9e6feae7c00e91
Copying blob sha256:9f2d1a2655b9b1c4e7a454a14b61d91972c2d9c6b5936eca839a994cf6483017
Copying config sha256:161b5eee3a1af34f1f9432ca11debf7abef432824a12418508256c38d1de18fa
Writing manifest to image destination
Storing signatures
STEP 2/6: WORKDIR /work/
--> 0db0961f608
STEP 3/6: COPY target/*-runner /work/application
Error: building at STEP "COPY target/*-runner /work/application": checking on sources under "/var/tmp/libpod_builder2131162895/build": Rel: can't make  relative to /var/tmp/libpod_builder2131162895/build; copier: stat: ["/target/*-runner"]: no such file or directory

Possible to provide arm image or fix dockerfile for it?

Can't send cloudevents to knative broker type of MTChannelBasedBroker

I deployed Knative v0.25.0 with Istio 1.11.2 gateway and network layer, and use kn to create service. I found error in istio-proxy log with status code 400, and in mt broker log, there is a warning on datacontenttype context attribute can't be parsed properly. And I read the code of the broker, with the warning, it'll return 400 and reject the event.

How to fix this?

RESTEASY002020: Unhandled asynchronous exception, sending back 500: java.lang.NullPointerException

After running for some time, cludevents-player UI stops working.
The error that is visible in the browser console is the following:

Screenshot 2023-03-01 at 15 36 31

When I check the pod logs, I can see it is full of the following errors:

2023-03-01 14:34:50,799 ERROR [org.jbo.res.res.i18n] (ForkJoinPool.commonPool-worker-9) RESTEASY002020: Unhandled asynchronous exception, sending back 500: java.lang.NullPointerException
	at java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469)
	at java.util.TimSort.countRunAndMakeAscending(TimSort.java:360)
	at java.util.TimSort.sort(TimSort.java:234)
	at java.util.Arrays.sort(Arrays.java:1515)
	at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:353)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:503)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
	at com.redhat.syseng.tools.cloudevents.service.MessageService.newEvent(MessageService.java:46)
	at com.redhat.syseng.tools.cloudevents.service.MessageService.receive(MessageService.java:39)
	at com.redhat.syseng.tools.cloudevents.service.MessageService_ClientProxy.receive(MessageService_ClientProxy.zig:213)
	at com.redhat.syseng.tools.cloudevents.resources.MessageReceiverResource.lambda$receive$0(MessageReceiverResource.java:45)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:497)
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)

I am attaching the full log here:
cloudevents-player.log

Rename packages

Rename all packages and artifacts to com.github.ruromero.cloudeventsplayer

Update documentation

The documentation is not up to date with the new packages, versions and references to event content types capabilities.

It would be good to add some badges to show the current build and container statuses

Enhance broker integration

The BROKER_NAME and BROKER_NAMESPACE generates a BROKER_URI http://broker-ingress.knative-eventing.svc.cluster.local/<namespace>/<name> but this only works for the InMemoryChannel-Broker.

The Kafka broker uses the kafka-broker-ingress service making this configuration option unusable.

Besides, during deployment it requires an extra step to fetch the BROKER_URI from the broker and set it to the deployment.

For that reason it would be good to leverage the SinkBinding custom resource for such integration. The SinkBinding injects a K_SINK environment variable with the broker endpoint to the deployment. That solution will also allow to simplify the Knative Service definition by removing all the environment variables.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.