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

Update kubernetes-client and quarkus #287

Merged
merged 7 commits into from
Mar 22, 2024
Merged

Update kubernetes-client and quarkus #287

merged 7 commits into from
Mar 22, 2024

Conversation

sgraband
Copy link
Contributor

@sgraband sgraband commented Mar 5, 2024

Update kubernetes-client to 6.10.0.
Update quarkus platform to 3.8.1.
This provides support for kubernetes 1.29.0.

Additionaly fix some deprecated warnings.

Helm Repo PR: eclipse-theia/theia-cloud-helm#51

@jfaltermeier
Copy link
Contributor

The changes itself look good to me.

https://mvnrepository.com/artifact/io.javaoperatorsdk/kubernetes-webhooks-framework-core
was not updated although this has a kubernetes-client dependency as well. There would be one newer version that has 6.9.2 as a dependency for the kubernetes-client: https://mvnrepository.com/artifact/io.javaoperatorsdk/kubernetes-webhooks-framework-core/1.1.3
I shortly checked and I believe this does not cause issues. However, at least in the future we should try to align the client version with all dependencies if possible.

I noticed something different however.
When I try to start a session, I now get this exception in the service:

2024-03-06 09:30:53,726 INFO  [org.ecl.the.clo.ser.RootResource] (executor-thread-1) [33acd623-efa8-48c9-a273-be8bf762fc3b] Launching ephemeral session LaunchRequest [user=foo@theia-cloud.io, appDefinition=theia-cloud-demo, workspaceName=null, label=null, ephemeral=true, appId=asdfghjkl, kind=launchRequest, timeout=5, LaunchRequest.Env[fromMap={}, fromConfigMaps=[], fromSecrets=[]]]
2024-03-06 09:30:53,730 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-1) HTTP Request to /service failed, error id: c67907eb-5b22-4e34-9fc6-52f6dc1fd95c-23: java.lang.NullPointerException: Cannot invoke "org.eclipse.theia.cloud.common.k8s.resource.session.SessionStatus.setLastActivity(long)" because the return value of "org.eclipse.theia.cloud.common.k8s.resource.session.Session.getStatus()" is null
 at org.eclipse.theia.cloud.common.k8s.client.DefaultSessionResourceClient.create(DefaultSessionResourceClient.java:44)
 at org.eclipse.theia.cloud.common.k8s.client.DefaultSessionResourceClient.lambda$launch$0(DefaultSessionResourceClient.java:58)
 at java.base/java.util.Optional.orElseGet(Unknown Source)
 at org.eclipse.theia.cloud.common.k8s.client.DefaultSessionResourceClient.launch(DefaultSessionResourceClient.java:58)
 at org.eclipse.theia.cloud.common.k8s.client.SessionResourceClient.launch(SessionResourceClient.java:30)
 at org.eclipse.theia.cloud.service.K8sUtil.launchSession(K8sUtil.java:97)
 at org.eclipse.theia.cloud.service.K8sUtil.launchEphemeralSession(K8sUtil.java:84)
 at org.eclipse.theia.cloud.service.K8sUtil_ClientProxy.launchEphemeralSession(Unknown Source)
 at org.eclipse.theia.cloud.service.RootResource.launch(RootResource.java:71)
 at org.eclipse.theia.cloud.service.RootResource_Subclass.launch$$superforward(Unknown Source)
 at org.eclipse.theia.cloud.service.RootResource_Subclass$$function$$3.apply(Unknown Source)
 at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:73)
 at io.quarkus.arc.impl.AroundInvokeInvocationContext$NextAroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:97)
 at io.quarkus.security.runtime.interceptor.SecurityHandler.handle(SecurityHandler.java:27)
 at io.quarkus.security.runtime.interceptor.AuthenticatedInterceptor.intercept(AuthenticatedInterceptor.java:29)
 at io.quarkus.security.runtime.interceptor.AuthenticatedInterceptor_Bean.intercept(Unknown Source)
 at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
 at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:70)
 at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:62)
 at io.quarkus.resteasy.reactive.server.runtime.StandardSecurityCheckInterceptor.intercept(StandardSecurityCheckInterceptor.java:44)
 at io.quarkus.resteasy.reactive.server.runtime.StandardSecurityCheckInterceptor_AuthenticatedInterceptor_Bean.intercept(Unknown Source)
 at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
 at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:30)
 at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:27)
 at org.eclipse.theia.cloud.service.RootResource_Subclass.launch(Unknown Source)
 at org.eclipse.theia.cloud.service.RootResource$quarkusrestinvoker$launch_d6daf46557974a8ba82a33ef9782812bef20cee9.invoke(Unknown Source)
 at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
 at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
 at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
 at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)
 at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
 at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
 at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
 at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
 at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 at java.base/java.lang.Thread.run(Unknown Source)

I don't know if the cause for this is this update or if this somehow slipped through with the conversion webhook change.
Can you reproduce this?

@sgraband
Copy link
Contributor Author

sgraband commented Mar 6, 2024

The issue seems like an oversight from the previous PR. I added a commit that should resolve the issue.

Regarding the kubernetes-client version:
I agree, that we should align all of the versions. For now i would prefer to keep it as is, because we cannot update to the correct version anyway and the current state is already tested. Does that work for you?

@jfaltermeier
Copy link
Contributor

Keeping the the webhooks version is fine for.

I got two more exceptions when launching a session.

Service:

2024-03-06 12:42:33,549 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-1) HTTP Request to /service failed, error id: b8026cbf-9d9b-4aa4-914a-110b49eef8aa-1: java.lang.NullPointerException: Cannot invoke "org.eclipse.theia.cloud.common.k8s.resource.session.SessionStatus.hasUrl()" because "sessionStatus" is null
 at org.eclipse.theia.cloud.common.k8s.client.DefaultSessionResourceClient.launch(DefaultSessionResourceClient.java:64)
 at org.eclipse.theia.cloud.common.k8s.client.SessionResourceClient.launch(SessionResourceClient.java:30)
 at org.eclipse.theia.cloud.service.K8sUtil.launchSession(K8sUtil.java:97)
 at org.eclipse.theia.cloud.service.K8sUtil.launchEphemeralSession(K8sUtil.java:84)
 at org.eclipse.theia.cloud.service.K8sUtil_ClientProxy.launchEphemeralSession(Unknown Source)
 at org.eclipse.theia.cloud.service.RootResource.launch(RootResource.java:71)
 at org.eclipse.theia.cloud.service.RootResource_Subclass.launch$$superforward(Unknown Source)
 at org.eclipse.theia.cloud.service.RootResource_Subclass$$function$$3.apply(Unknown Source)
 at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:73)
 at io.quarkus.arc.impl.AroundInvokeInvocationContext$NextAroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:97)
 at io.quarkus.security.runtime.interceptor.SecurityHandler.handle(SecurityHandler.java:27)
 at io.quarkus.security.runtime.interceptor.AuthenticatedInterceptor.intercept(AuthenticatedInterceptor.java:29)
 at io.quarkus.security.runtime.interceptor.AuthenticatedInterceptor_Bean.intercept(Unknown Source)
 at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
 at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:70)
 at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:62)
 at io.quarkus.resteasy.reactive.server.runtime.StandardSecurityCheckInterceptor.intercept(StandardSecurityCheckInterceptor.java:44)
 at io.quarkus.resteasy.reactive.server.runtime.StandardSecurityCheckInterceptor_AuthenticatedInterceptor_Bean.intercept(Unknown Source)
 at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:42)
 at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:30)
 at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:27)
 at org.eclipse.theia.cloud.service.RootResource_Subclass.launch(Unknown Source)
 at org.eclipse.theia.cloud.service.RootResource$quarkusrestinvoker$launch_d6daf46557974a8ba82a33ef9782812bef20cee9.invoke(Unknown Source)
 at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
 at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
 at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
 at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)
 at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
 at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
 at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
 at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
 at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 at java.base/java.lang.Thread.run(Unknown Source)

Conversion Hook:

2024-03-06 12:43:03,570 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-1) HTTP Request to /convert/session?timeout=30s failed, error id: b49475b7-4ced-4388-804d-d78f3ef7bb19-304: java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "java.util.Optional.orElse(Object)" is null
 at org.eclipse.theia.cloud.common.k8s.resource.session.v1beta6.SessionV1beta6Spec.<init>(SessionV1beta6Spec.java:109)
 at org.eclipse.theia.cloud.common.k8s.resource.session.v1beta6.SessionV1beta6.<init>(SessionV1beta6.java:50)
 at org.eclipse.theia.cloud.conversion.mappers.session.SessionV1beta6Mapper.fromHub(SessionV1beta6Mapper.java:35)
 at org.eclipse.theia.cloud.conversion.mappers.session.SessionV1beta6Mapper.fromHub(SessionV1beta6Mapper.java:24)
 at io.javaoperatorsdk.webhook.conversion.ConversionController.mapObject(ConversionController.java:62)
 at io.javaoperatorsdk.webhook.conversion.ConversionController.lambda$convertObjects$0(ConversionController.java:47)
 at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
 at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
 at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
 at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
 at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
 at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
 at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
 at io.javaoperatorsdk.webhook.conversion.ConversionController.convertObjects(ConversionController.java:48)
 at io.javaoperatorsdk.webhook.conversion.ConversionController.handle(ConversionController.java:35)
 at org.eclipse.theia.cloud.conversion.ConversionEndpoint.convertSession(ConversionEndpoint.java:93)
 at org.eclipse.theia.cloud.conversion.ConversionEndpoint$quarkusrestinvoker$convertSession_19a9a662301dbb0c1bb8aea62c16970c8be92c3b.invoke(Unknown Source)
 at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
 at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
 at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
 at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)
 at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
 at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
 at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
 at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
 at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 at java.base/java.lang.Thread.run(Unknown Source)

@sgraband
Copy link
Contributor Author

sgraband commented Mar 6, 2024

In order to avoid such problems in the future i added a safe guard always return a empty status, when the status is null. This way we do not need to check if the status is null everytime we use it. WDYT?

(I also reverted the previous change as it should no longer be necessary)

Update kubernetes-client and quarkus platform.
Also fix a deprecated warning.
To avoid endless restarting loops when k8s-client watcher keeps reconnecting.
Add getNonNullStatus() method, that returns an empty Status if none available.
This way you can check for values with out having to worry about NPEs.
Properly set the status via the provided method.
With simply edit the status is not applied.
Provide toString() methods for the status objects.
@sgraband
Copy link
Contributor Author

@jfaltermeier do you have an idea on why the test might fail? I just took a look and it seems like that specific failing test seems to not have the getNonNullStatus() method, while the others have it. I cannot spot the differences 🤔

Also, mocking the result for getNonNullStatus() does not seem to work.

@jfaltermeier
Copy link
Contributor

Adding Mockito.when(workspace.getNonNullStatus()).thenReturn(workspaceStatus); seems to work.
I think not all tests are using Mockito.mock(Workspace.class) and need/call the getNonNullStatus method.

@jfaltermeier
Copy link
Contributor

jfaltermeier commented Mar 15, 2024

I could not see errors in the service or the operator anymore.

In the conversion webhook there is still a NPE regarding Sessions. AppDefinitions and Workspaces seemed to work

2024-03-15 12:33:42,234 INFO  [org.ecl.the.clo.con.ConversionEndpoint] (executor-thread-1) [convert/appdefinition] [ef5c197d-cf77-412b-b9cb-c2308a24ff73] Converting AppDefinition (version: 'theia.cloud/v1beta9') to version 'theia.cloud/v1beta8'
2024-03-15 12:33:47,437 INFO  [org.ecl.the.clo.con.ConversionEndpoint] (executor-thread-1) [convert/appdefinition] [1445cf36-a6e7-44e3-b6aa-abf9531147c7] Converting AppDefinition (version: 'theia.cloud/v1beta9') to version 'theia.cloud/v1beta8'
2024-03-15 12:40:03,188 INFO  [org.ecl.the.clo.con.ConversionEndpoint] (executor-thread-2) [convert/workspace] [f27cccfd-00da-454f-84ba-1a3c5c827fbd] Converting Workspace (version: 'theia.cloud/v1beta4') to version 'theia.cloud/v1beta3'
2024-03-15 12:40:03,202 INFO  [org.ecl.the.clo.con.ConversionEndpoint] (executor-thread-2) [convert/workspace] [94bb4bba-0964-47d1-a9dc-74f33aba088a] Converting Workspace (version: 'theia.cloud/v1beta4') to version 'theia.cloud/v1beta3'
2024-03-15 12:35:13,467 INFO  [org.ecl.the.clo.con.ConversionEndpoint] (executor-thread-1) [convert/session] [d920bfd7-b5f1-4a85-aac4-a9fab4c48ccb] Converting Session (version: 'theia.cloud/v1beta7') to version 'theia.cloud/v1beta6'
2024-03-15 12:35:13,478 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-1) HTTP Request to /convert/session?timeout=30s failed, error id: 8697aa54-7132-4923-a8c5-fd8da248229f-1: java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "java.util.Optional.orElse(Object)" is null
	at org.eclipse.theia.cloud.common.k8s.resource.session.v1beta6.SessionV1beta6Spec.<init>(SessionV1beta6Spec.java:109)
	at org.eclipse.theia.cloud.common.k8s.resource.session.v1beta6.SessionV1beta6.<init>(SessionV1beta6.java:52)
	at org.eclipse.theia.cloud.conversion.mappers.session.SessionV1beta6Mapper.fromHub(SessionV1beta6Mapper.java:35)
	at org.eclipse.theia.cloud.conversion.mappers.session.SessionV1beta6Mapper.fromHub(SessionV1beta6Mapper.java:24)
	at io.javaoperatorsdk.webhook.conversion.ConversionController.mapObject(ConversionController.java:62)
	at io.javaoperatorsdk.webhook.conversion.ConversionController.lambda$convertObjects$0(ConversionController.java:47)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
	at io.javaoperatorsdk.webhook.conversion.ConversionController.convertObjects(ConversionController.java:48)
	at io.javaoperatorsdk.webhook.conversion.ConversionController.handle(ConversionController.java:35)
	at org.eclipse.theia.cloud.conversion.ConversionEndpoint.convertSession(ConversionEndpoint.java:93)
	at org.eclipse.theia.cloud.conversion.ConversionEndpoint$quarkusrestinvoker$convertSession_19a9a662301dbb0c1bb8aea62c16970c8be92c3b.invoke(Unknown Source)
	at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
	at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)
	at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Unknown Source)

@jfaltermeier
Copy link
Contributor

jfaltermeier commented Mar 15, 2024

I think this is the issue:

// the hub property looks like this:
Optional<Long> getLastActivity()

// the session/session status uses this
private long lastActivity;

// small long can't be null, so this fails:
this.lastActivity = fromHub.getLastActivity().orElse(null);

// we should use .orElse(0) I think

@sgraband
Copy link
Contributor Author

Thanks! I will take look 👍

Another question: Did the current state work for you? I totally forgot to open and link that PR, but i also needed these changes: eclipse-theia/theia-cloud-helm#51.

Without them i still recieved some errors, while creating sessions.

@jfaltermeier
Copy link
Contributor

Thanks! I will take look 👍

Another question: Did the current state work for you? I totally forgot to open and link that PR, but i also needed these changes: eclipsesource/theia-cloud-helm#51.

Without them i still recieved some errors, while creating sessions.

I pasted the error I saw, but I did no detailed testing after that.
I think the service was able to read the URL and do the redirect, but maybe I just checked the session contents directly.

@sgraband
Copy link
Contributor Author

This fixes the issue on my side. Also i updated the description, that eclipse-theia/theia-cloud-helm#51 should be used. Could you recheck?

@jfaltermeier
Copy link
Contributor

The 2-01_try-now test configuration works for me now. When I go on to 2-02_monitor all sessions (tried with vscode-extension and with theia-extension) get shut down. I did not see exceptions in the operator log.

This was with the vscode exception:

13:24:52.602 [pool-8-thread-1] TRACE org.eclipse.theia.cloud.operator.handler.impl.AddedHandlerUtil - [3d9c8417-eaca-47e0-8585-8e8896fc9fda] ws.192.168.59.118.nip.io/81385181-a7de-4949-a420-f915a5fd1a6b/ has response code 200
13:24:52.603 [pool-8-thread-1] INFO  org.eclipse.theia.cloud.operator.handler.impl.AddedHandlerUtil - [3d9c8417-eaca-47e0-8585-8e8896fc9fda] ws.192.168.59.118.nip.io/81385181-a7de-4949-a420-f915a5fd1a6b/ is available.
13:24:52.618 [-746394140-pool-6-thread-1] TRACE org.eclipse.theia.cloud.operator.SpecWatch - [session-watch-6b28e549-704f-40f7-868d-fcee6eeb1086] Session 81385181-a7de-4949-a420-f915a5fd1a6b : received an event: MODIFIED
13:24:52.618 [-746394140-pool-6-thread-1] TRACE org.eclipse.theia.cloud.operator.SpecWatch - [session-watch-6b28e549-704f-40f7-868d-fcee6eeb1086] Session 81385181-a7de-4949-a420-f915a5fd1a6b : already known. Check if outdated event
13:24:52.618 [-746394140-pool-6-thread-1] TRACE org.eclipse.theia.cloud.operator.SpecWatch - [session-watch-6b28e549-704f-40f7-868d-fcee6eeb1086] Session 81385181-a7de-4949-a420-f915a5fd1a6b : event is NOT outdated. Handle event
13:24:52.619 [pool-8-thread-1] INFO  org.eclipse.theia.cloud.operator.handler.impl.AddedHandlerUtil - [3d9c8417-eaca-47e0-8585-8e8896fc9fda] METRIC: Running session for theia-cloud-demo
13:25:18.692 [pool-7-thread-1] DEBUG org.eclipse.theia.cloud.operator.monitor.MonitorActivityTrackerImpl - Pinging sessions: [name=ws-theia-cloud-demo-foo-theia-cloud-io-session version=2360 value=SessionSpec [name=ws-theia-cloud-demo-foo-theia-cloud-io-session, appDefinition=theia-cloud-demo, user=foo@theia-cloud.io, workspace=null]]
13:25:18.718 [pool-7-thread-1] INFO  org.eclipse.theia.cloud.operator.monitor.MonitorActivityTrackerImpl - [ws-theia-cloud-demo-foo-theia-cloud-io-session] Pinging session at 10.109.169.211
13:25:18.721 [pool-7-thread-1] INFO  org.eclipse.theia.cloud.operator.monitor.MonitorActivityTrackerImpl - [ws-theia-cloud-demo-foo-theia-cloud-io-session] GET http://10.109.169.211:8081/monitor/activity/lastActivity
13:25:18.734 [-746394140-pool-6-thread-1] TRACE org.eclipse.theia.cloud.operator.SpecWatch - [session-watch-883a0c92-4aca-4034-816f-7efa50e8f045] Session 81385181-a7de-4949-a420-f915a5fd1a6b : received an event: MODIFIED
13:25:18.734 [-746394140-pool-6-thread-1] TRACE org.eclipse.theia.cloud.operator.SpecWatch - [session-watch-883a0c92-4aca-4034-816f-7efa50e8f045] Session 81385181-a7de-4949-a420-f915a5fd1a6b : already known. Check if outdated event
13:25:18.736 [-746394140-pool-6-thread-1] TRACE org.eclipse.theia.cloud.operator.SpecWatch - [session-watch-883a0c92-4aca-4034-816f-7efa50e8f045] Session 81385181-a7de-4949-a420-f915a5fd1a6b : event is NOT outdated. Handle event
13:25:18.737 [pool-7-thread-1] INFO  org.eclipse.theia.cloud.operator.monitor.MonitorActivityTrackerImpl - [ws-theia-cloud-demo-foo-theia-cloud-io-session] Last reported activity was: 1970-01-01T00:00:00.000Z (28512805 minutes ago)

This way we get the updated resource and can reassign the object.
Copy link
Contributor

@jfaltermeier jfaltermeier left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM! 🥳

@sgraband sgraband merged commit 5311e8b into main Mar 22, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants