Skip to content

Initial E2E Tests #387

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

Merged
merged 13 commits into from
Mar 26, 2025
Merged

Initial E2E Tests #387

merged 13 commits into from
Mar 26, 2025

Conversation

jfaltermeier
Copy link
Contributor

@jfaltermeier jfaltermeier commented Dec 18, 2024

Use squash on merge

This PR establishes a foundation for implementing E2E tests.

It has a matrix GitHub workflow that combines different configurations: Kubernetes versions, ephemeral vs. persistent storage, subdomain vs. path-based routing, and Keycloak enablement.

Currently, the tests are just checking login/logout and starting a session, but this provides a base that can be extended with additional tests.

It also fixes an issue with the MinikubePersistentVolumeCreator that caused an error.

Test Run: https://github.com/eclipse-theia/theia-cloud/actions/runs/12413770653

Contributed on behalf of STMicroelectronics

@jfaltermeier jfaltermeier force-pushed the e2e-testing branch 2 times, most recently from 27e2119 to c4232a9 Compare December 19, 2024 13:35
@jfaltermeier jfaltermeier marked this pull request as ready for review December 19, 2024 15:06
@lucas-koehler lucas-koehler removed the request for review from sgraband January 13, 2025 11:44
Copy link
Contributor

@lucas-koehler lucas-koehler left a comment

Choose a reason for hiding this comment

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

Hi @jfaltermeier , Thanks for providing this vast improvement in testing 🥳

The changes already look pretty good to me. I only have a few small remarks inline.


name = "theia-cloud-crds"
chart = "../../../theia-cloud-helm/charts/theia-cloud-crds"
namespace = "theiacloud"
Copy link
Contributor

Choose a reason for hiding this comment

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

Small detail: AFAIK since we aligned all namings, our default namespace name is theia-cloud. Should we adapt this here for the sake of consistency?
If yes, also adapt below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

adapted

kubectl -n ingress-nginx delete pod -l app.kubernetes.io/name=ingress-nginx
```

Adapt your environment so that all docker images are built in minikube. Build all Theia Cloud docker images + Demos with tag `minikube-ci-e2e`, e.g. `theiacloud/theia-cloud-service:minikube-ci-e2e`.
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add a note that the docker build commands need to be executed in the repository root to avoid confusioon

Copy link
Contributor Author

Choose a reason for hiding this comment

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

adapted

@jfaltermeier
Copy link
Contributor Author

ephemeral false, keycloak true tests seem to fail atm, I'll check

@jfaltermeier
Copy link
Contributor Author

jfaltermeier commented Jan 24, 2025

Locally I can reproduce the errors. Nice to see that the tests are helping :D

14:56:59.220 [-1717433286-pool-6-thread-1] ERROR org.eclipse.theia.cloud.operator.handler.session.LazySessionHandler - [fdc4ef7b-a0ee-4d1e-aaf5-963c27bd3219] An unexpected exception occurred while adding Session: name=ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session version=3190 value=SessionSpec [name=ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session, appDefinition=theia-cloud-monitor-theia, [email protected], workspace=ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io]
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://10.96.0.1:443/api/v1/namespaces/theia-cloud/services. Message: Service "session-foo-theia-cloud-monit-8e3bcf8dedab" is invalid: metadata.labels: Invalid value: "ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session": must be no more than 63 characters. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=metadata.labels, message=Invalid value: "ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session": must be no more than 63 characters, reason=FieldValueInvalid, additionalProperties={})], group=null, kind=Service, name=session-foo-theia-cloud-monit-8e3bcf8dedab, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Service "session-foo-theia-cloud-monit-8e3bcf8dedab" is invalid: metadata.labels: Invalid value: "ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session": must be no more than 63 characters, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
	at io.fabric8.kubernetes.client.KubernetesClientException.copyAsCause(KubernetesClientException.java:238) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.waitForResult(OperationSupport.java:507) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.handleResponse(OperationSupport.java:524) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.handleCreate(OperationSupport.java:340) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.handleCreate(BaseOperation.java:754) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.handleCreate(BaseOperation.java:98) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.dsl.internal.CreateOnlyResourceOperation.create(CreateOnlyResourceOperation.java:42) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.create(BaseOperation.java:1155) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.create(BaseOperation.java:98) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at org.eclipse.theia.cloud.operator.util.K8sUtil.loadAndCreateTypeWithOwnerReference(K8sUtil.java:198) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at org.eclipse.theia.cloud.operator.util.K8sUtil.loadAndCreateServiceWithOwnerReference(K8sUtil.java:125) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at org.eclipse.theia.cloud.operator.handler.session.LazySessionHandler.createAndApplyService(LazySessionHandler.java:394) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at org.eclipse.theia.cloud.operator.handler.session.LazySessionHandler.doSessionAdded(LazySessionHandler.java:208) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at org.eclipse.theia.cloud.operator.handler.session.LazySessionHandler.sessionAdded(LazySessionHandler.java:98) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at org.eclipse.theia.cloud.operator.BasicTheiaCloudOperator.handleSessionEvent(BasicTheiaCloudOperator.java:188) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at org.eclipse.theia.cloud.operator.util.SpecWatch.eventReceived(SpecWatch.java:86) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at org.eclipse.theia.cloud.operator.util.SpecWatch.eventReceived(SpecWatch.java:32) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.utils.internal.WatcherToggle.eventReceived(WatcherToggle.java:48) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.dsl.internal.AbstractWatchManager$SerialWatcher.lambda$eventReceived$0(AbstractWatchManager.java:70) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.utils.internal.SerialExecutor.lambda$execute$0(SerialExecutor.java:57) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
	at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://10.96.0.1:443/api/v1/namespaces/theia-cloud/services. Message: Service "session-foo-theia-cloud-monit-8e3bcf8dedab" is invalid: metadata.labels: Invalid value: "ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session": must be no more than 63 characters. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=metadata.labels, message=Invalid value: "ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session": must be no more than 63 characters, reason=FieldValueInvalid, additionalProperties={})], group=null, kind=Service, name=session-foo-theia-cloud-monit-8e3bcf8dedab, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Service "session-foo-theia-cloud-monit-8e3bcf8dedab" is invalid: metadata.labels: Invalid value: "ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session": must be no more than 63 characters, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.requestFailure(OperationSupport.java:660) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.requestFailure(OperationSupport.java:640) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.assertResponseCode(OperationSupport.java:589) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.lambda$handleResponse$0(OperationSupport.java:549) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) ~[?:?]
	at java.util.concurrent.CompletableFuture.complete(Unknown Source) ~[?:?]
	at io.fabric8.kubernetes.client.http.StandardHttpClient.lambda$completeOrCancel$10(StandardHttpClient.java:141) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) ~[?:?]
	at java.util.concurrent.CompletableFuture.complete(Unknown Source) ~[?:?]
	at io.fabric8.kubernetes.client.http.ByteArrayBodyHandler.onBodyDone(ByteArrayBodyHandler.java:51) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	at java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source) ~[?:?]
	at java.util.concurrent.CompletableFuture.postComplete(Unknown Source) ~[?:?]
	at java.util.concurrent.CompletableFuture.complete(Unknown Source) ~[?:?]
	at io.fabric8.kubernetes.client.okhttp.OkHttpClientImpl$OkHttpAsyncBody.doConsume(OkHttpClientImpl.java:136) ~[defaultoperator-1.1.0-SNAPSHOT-jar-with-dependencies.jar:?]
	... 3 more
14:56:59.236 [-1717433286-pool-6-thread-3] TRACE org.eclipse.theia.cloud.operator.util.SpecWatch - [session-watch-a7c2700f-0a4b-4111-9303-d1160c89c0ec] Session 168f36ef-4e6b-449f-a840-8e3bcf8dedab : received an event: MODIFIED
14:56:59.236 [-1717433286-pool-6-thread-3] TRACE org.eclipse.theia.cloud.operator.util.SpecWatch - [session-watch-a7c2700f-0a4b-4111-9303-d1160c89c0ec] Session 168f36ef-4e6b-449f-a840-8e3bcf8dedab : already known. Check if outdated event
14:56:59.236 [-1717433286-pool-6-thread-3] TRACE org.eclipse.theia.cloud.operator.util.SpecWatch - [session-watch-a7c2700f-0a4b-4111-9303-d1160c89c0ec] Session 168f36ef-4e6b-449f-a840-8e3bcf8dedab : event is NOT outdated. Handle event
14:56:59.236 [-1717433286-pool-6-thread-1] TRACE org.eclipse.theia.cloud.operator.util.SpecWatch - [session-watch-6d0c4a5a-3192-4d75-9b69-e6dcbe25703a] Session 168f36ef-4e6b-449f-a840-8e3bcf8dedab : received an event: MODIFIED
14:56:59.236 [-1717433286-pool-6-thread-1] TRACE org.eclipse.theia.cloud.operator.util.SpecWatch - [session-watch-6d0c4a5a-3192-4d75-9b69-e6dcbe25703a] Session 168f36ef-4e6b-449f-a840-8e3bcf8dedab : already known. Check if outdated event
14:56:59.236 [-1717433286-pool-6-thread-1] TRACE org.eclipse.theia.cloud.operator.util.SpecWatch - [session-watch-6d0c4a5a-3192-4d75-9b69-e6dcbe25703a] Session 168f36ef-4e6b-449f-a840-8e3bcf8dedab : event is NOT outdated. Handle event
14:57:52.492 [pool-7-thread-1] DEBUG org.eclipse.theia.cloud.operator.plugins.MonitorActivityTracker - Pinging sessions: []
14:57:52.514 [pool-5-thread-1] TRACE org.eclipse.theia.cloud.operator.BasicTheiaCloudOperator - [timeout-d1b10702-0648-49cb-a991-d08a3fc7a6a2] App Definition watch was idle for 109445 ms
14:57:52.514 [pool-5-thread-1] TRACE org.eclipse.theia.cloud.operator.BasicTheiaCloudOperator - [timeout-d1b10702-0648-49cb-a991-d08a3fc7a6a2] Workspace watch was idle for 53537 ms
14:57:52.514 [pool-5-thread-1] TRACE org.eclipse.theia.cloud.operator.BasicTheiaCloudOperator - [timeout-d1b10702-0648-49cb-a991-d08a3fc7a6a2] Session watch was idle for 53278 ms
14:57:52.518 [pool-4-thread-1] TRACE org.eclipse.theia.cloud.operator.BasicTheiaCloudOperator - [f835c09d-4cba-455a-90f6-e2e3c869172b] Checking ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session. minutesSinceLastActivity: 0. limit: 6
14:57:52.519 [pool-4-thread-1] TRACE org.eclipse.theia.cloud.operator.BasicTheiaCloudOperator - [timeout-f835c09d-4cba-455a-90f6-e2e3c869172b] Session ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session will keep running until the limit of 6 is hit.

Looks like some labels may grow too long now.

I think it tries to apply this:

apiVersion: "v1"
kind: "Service"
metadata:
  labels:
    app: "ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-sess"
    theia-cloud.io/app-definition: "theia-cloud-monitor-theia"
    app.kubernetes.io/part-of: "theia-cloud"
    theia-cloud.io/user: "foo_at_theia_cloud_io"
    theia-cloud.io/session: "ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session"
    app.kubernetes.io/component: "session"
  name: "session-foo-theia-cloud-monit-8e3bcf8dedab"
  namespace: "theia-cloud"
  ownerReferences:
  - apiVersion: "theia.cloud/v1beta8"
    kind: "Session"
    name: "ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session"
    uid: "168f36ef-4e6b-449f-a840-8e3bcf8dedab"
spec:
  ports:
  - name: "http"
    port: 3000
    protocol: "TCP"
    targetPort: "web"
  selector:
    app: "ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-sess"
  type: "ClusterIP"

Session spec for reference:

 apiVersion: theia.cloud/v1beta8
kind: Session
metadata:
  creationTimestamp: '2025-01-24T15:01:59Z'
  generation: 1
  managedFields:
    - apiVersion: theia.cloud/v1beta8
      fieldsType: FieldsV1
      fieldsV1:
        f:spec:
          .: {}
          f:appDefinition: {}
          f:envVars: {}
          f:envVarsFromConfigMaps: {}
          f:envVarsFromSecrets: {}
          f:name: {}
          f:sessionSecret: {}
          f:user: {}
          f:workspace: {}
      manager: fabric8-kubernetes-client
      operation: Update
      time: '2025-01-24T15:01:59Z'
    - apiVersion: theia.cloud/v1beta8
      fieldsType: FieldsV1
      fieldsV1:
        f:status:
          .: {}
          f:lastActivity: {}
          f:operatorMessage: {}
          f:operatorStatus: {}
      manager: fabric8-kubernetes-client
      operation: Update
      subresource: status
      time: '2025-01-24T15:01:59Z'
  name: ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session
  namespace: theia-cloud
  resourceVersion: '3833'
  uid: 7e4b093a-88fe-484f-a5de-3b2f8429cf44
spec:
  appDefinition: theia-cloud-monitor-theia
  envVars: {}
  envVarsFromConfigMaps: []
  envVarsFromSecrets: []
  name: ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io-session
  sessionSecret: f027708d-4f38-43b6-b25a-82a124c7ad4e
  user: [email protected]
  workspace: ws-asdfghjkl-theia-cloud-monitor-theia-foo-theia-cloud-io
status:
  lastActivity: 0
  operatorMessage: >-
    Unexpected error. Please check the logs for correlationId:
    cf0acace-6de9-4242-9c21-ab8641302626
  operatorStatus: ERROR

@jfaltermeier jfaltermeier force-pushed the e2e-testing branch 3 times, most recently from 231b110 to a0741c2 Compare March 21, 2025 15:03
* include yarn.lock to make build more reproducible
Copy link
Contributor

@lucas-koehler lucas-koehler left a comment

Choose a reason for hiding this comment

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

LGTM now, thanks ✨

@jfaltermeier jfaltermeier merged commit d9bc7ef into main Mar 26, 2025
42 checks passed
@jfaltermeier jfaltermeier deleted the e2e-testing branch March 26, 2025 10:27
jfaltermeier added a commit that referenced this pull request Mar 26, 2025
jfaltermeier added a commit that referenced this pull request Mar 26, 2025
Mtze pushed a commit to ls1intum/theia-cloud that referenced this pull request May 6, 2025
* Update to Theia IDE 1.53.200

Contributed on behalf of STMicroelectronics

* Updated Helm URLs and added devcontainer definition (eclipse-theia#353)

* Changed helm URLs to new eclipse-theia location.
* Created devcontainer config for GKE Getting Started with Terraform

Co-authored-by: Johannes Faltermeier <[email protected]>

* Improve and document debugging of operator and service

* Minor improvement: Local testing values should only pull IfNotPresent

I would assume that this is the most common use case.

* Fix lastActivity not being initialized properly

We need to set it after the resource has been created.
Therefore it is now handled by the operator not the service.
Add warning in case resources are edited before being applied to the cluster.
Only check HANDLED sessions from the activity tracking.
Other resources should be cleaned up differently.

* Add review suggestions

* Fix maven repository

This should fix the maven builds.

* Update old eclipsesource urls to eclipse-theia urls

* Value update for configuration snippet feature

eclipse-theia/theia-cloud-helm#76

* eclipse-theiaGH-349: Extend service with a list app definitions endpoint

### App definition endpoint
- Add AppDefinitionResource with endpoint to list all app definitions.
  The endpoint is restricted to authenticated users but is still available in anonymous mode

### Sensitive data redaction
- Add `SensitiveData` annotation to mark properties that should not be serialized publicly by Jackson.
- Add a corresponding serializer and serializer modifiert for Jackson and register the modifier in the service
- Add unit tests for the serializer

### Javascript API
- Update openapi.json from service
- Regenerate api code
- Add AppDefinitions namespace with function to list app definitions

### Testing Page
- Add button to get app definitions
- Apply formatting rules to App.tsx by saving it
- Minor fix in example keycloak URL to remove obsolete `/auth`

### Misc
- Add mockito dependency to the common maven module

* Add REST API markdown docs based on openapi definition

Use the openapi-generator-cli to generate markdown docs from the openapi.json.
Also document how this works and add a hint that the generator supports
various doc and code languages.

* Document naming conventions & Naming alignment (eclipse-theia#368)

Contributed on behalf of STMicroelectronics

Co-authored-by: Simon Graband <[email protected]>
Co-authored-by: Lucas Koehler <[email protected]>

* Prepare 0.12.0 Release (eclipse-theia#369)

* move devcontainer to gke directory
* create changelog
* update versions
* update vsix

* Update versions to 1.0.0-next/SNAPSHOT

Contributed on behalf of STMicroelectronics

* Update Demos to Theia 1.55.0

Contributed on behalf of STMicroelectronics

* Add Automated License Check Workflow

Contributed on behalf of STMicroelectronics

* Improve session pod labels (eclipse-theia#362)

org.eclipse.theia.cloud.common.util.LabelsUtil is added to encapsulate
creation of labels.

To indicate that a pod is a user session, its
'app.kubernetes.io/component' label is set to 'session'.

For custom labels, we use the prefix 'theia-cloud.io'.

This is currently used for:
- Identifying a session pods associated with a user:
  'theia-cloud.io/user' = '$username'
- Identifying a session pod by appdefinition name:
  'theia-cloud.io/app-definition' = $appdefinitionname

Signed-off-by: Olaf Lessenich <[email protected]>
Co-authored-by: Johannes Faltermeier <[email protected]>
Co-authored-by: Lucas Koehler <[email protected]>

* Update dependencies (eclipse-theia#371)

* Update dependencies
  * rollup
  * vite
  * body-parser
  * express
  * path-to-regexp
  * send
  * serve-static
  * micromatch
  * webpack
  * cookie
  * junit in demos
* update workflow actions (use sha for non github actions)
* update helm dependencies to latest version
  * except keycloak
* add license information to internal pages

Co-authored-by: Lucas Koehler <[email protected]>

* Prepare 1.0.0 Release

* update changelog
* update to release versions
* update terraform helm charts

Contributed on behalf of STMicroelectronics

* Prepare 1.0.0 Release

pin inversify in demo application.
eclipse-theia/theia#14431 (comment)

* Prepare 1.0.0 Release

pin inversify in demo application.
eclipse-theia/theia#14431 (comment)

* Update versions to 1.1.0-next/SNAPSHOT

Contributed on behalf of STMicroelectronics

* Update Demos to Theia 1.56.1

* Remove unneccessary files from demos

Contributed on behalf of STMicroelectronics

Signed-off-by: Simon Graband <[email protected]>

* Cleanup dockerfiles and update monitor-theia demo to 1.56.0

Contributed on behalf of STMicroelectronics

Signed-off-by: Simon Graband <[email protected]>

* Update dependencies

* update npm dependencies
  * cross-spawn
  * express
  * socket.io
  * engine.io
  * theia
  * vite
  * webpack
* update maven dependencies
* install libsecret-1-dev in workflows that need it

Contributed on behalf of STMicroelectronics

* Fix NPM Publish

* Fix name handling for eager start

- Fix endless loop and a NPE in the NamingUtil's methods for eager start name creation (based on an app definition)
- Fix id extraction from generated names for the adapted name generation in an earlier PR.

* Trigger instance pod email ConfigMap update via annotation

Add an annotation to an eagerly started instance pod after the email config map was updated.
This is necessary to trigger a sync with the Kubelet.
Otherwise, the pod might not be updated with the new email list for the OAuth proxy in time.
This is the case because ConfigMap changes are not propagated to the pod immediately but during a periodic sync.

* Add terraform test configuration for eager start

* Implement session delete handling for eager start

- Rename EagerSessionStartHandler to EagerSessionHandler
- Implement `sessionDeleted` method to clean up and make the instance available for another user.
  This includes restarting the pod to get a new temporary workspace.

* Fix service max instances and session pod checks in K8sUtil

Check whether max instances are reached by counting sessions relevant to the app definition that are not in error state.
This makes it unnecessary to analyze all pods belonging to the session. Thus, performance for large amounts of pods is increased.

K8sUtil#getPodForSession now finds a pod belonging to a session via owner references instead of ENV variables.
With this, the pod can also be resolved in eager mode where the session name cannot be injected as an env variable.

Also adds some logging to K8sUtil#reportPerformance and increases the log level for exceptions
in the performance REST handler method.

* Extend testing page with getting session performance data

* Fix eager session delete handling for already removed owner references

- Extend LabelsUtil to add the session name to session labels
- Find service from session via labels instead of owner references in eager session delete handler
  With this, the handling also works if the owner reference has been removed automatically
- Add minor clarifying comments

* Setup theia folder with example app and config-store skeleton (eclipse-theia#389)

## Setup new theia folder with example app and config-store extension skeleton

- Create a new root-level folder `theia` for all theia extensions,
  corresponding example extensions and a test browser app.
- The theia folder uses a copied version of the tsconfig and eslint settings of the node folder.
- Initial setup of config-store extension, service and client
- Add license check for theia folder
- Depend on the exact version in the example app to avoid pulling older versions from the registry
- Add Theia CI workflow to build all Theia extensions and the example app
- Add reusable theia extension publish workflow

## Move monitor-theia extension to theia folder and setup Theia CI

- Move monitor-theia extension from node/ to theia/extensions/
- Add monitor-theia to Theia example app
- Adapt monitor theia Demo docker file
- Adapt monitor extension workflow to only do the publishing

* Fix reusable-theia-extension workflow

Remove hardcoded extensions/ prefix to align with the other commands using workflow input package_workspace

* Stabilize service cleanup for eager start

Removing the labels and owner reference fails for rare cases when cleaning an eager instance's service after a session was removed.
This adds retries to stabilize the sessionDeleted handling.

* service: Add admin user concept and app def scaling endpoint (eclipse-theia#400)

* service: Add admin user support via annotation

- Introduce the `@AdminOnly` annotation to mark REST resources or methods as accessible only to admin users.
- Implement AdminOnlyFilter that intercepts requests and aborts non-admin users with a 403 Forbidden response.
- Update ApplicationProperties to include a configurable admin group name property ("theia.cloud.auth.admin.group")
  with a default value of "theia-cloud/admin".
- Enhance TheiaCloudUser by adding an admin flag.
- Modify TheiaCloudUserProducer to derive the admin status from the MicroProfile JWT's groups claim.
- Add tests for the new admin-only filter, properties, and user producer functionality.
- Extend service Dockerfile to allow configuring the admin group name via environment variable.

* service: Add admin endpoint to update app def's min/max instances

- Add new resource AdminAppDefinitionAdminResource for all admin endpoints regarding app definitions
- Minor extensions in K8SUtil, AppDefinitionSpec to allow editing min/max instances
- Add tests for AdminAppDefintionAdminResource
- Add RootAdminResource with a ping endpoint that only returns if the user is an admin
- Regenerate OpenAPI definition, docs and common code

* terrafom: Add admin user group and outputs for Keycloak module

Extend Keycloak terraform module:
- Define an admin group with the default name
- Export realm, admin group and test users via outputs

Test setup:
- Add test user foo to the admin group
- Document how to get a Keycloak access token on the command line

* fix: Update Keycloak URL in tasks.json to include realm path

This is required for the Quarkus dev server to discover the OIDC config.
Also see the official documentation:
https://quarkus.io/guides/security-oidc-configuration-properties-reference#quarkus-oidc_quarkus-oidc-auth-server-url

* Theia Cloud Image for ARM64 eclipse-theia#403

* Theia Cloud Image for ARM64 eclipse-theia#403

* use JRE/JDK 21 base images because image are available for arm64

* Truncate labels longer than 63 chars

Signed-off-by: Olaf Lessenich <[email protected]>

* Truncate labels longer than 63 chars

Signed-off-by: Olaf Lessenich <[email protected]>

* Prepare 1.0.1 Release

* Prepare 1.0.1 Release

* Initial E2E Tests (eclipse-theia#387)

* add initial E2E tests
* Dont' add workspace as owner reference on persistent volume
* Fix theia monitor demo build: include yarn.lock to make build more reproducible

Contributed on behalf of STMicroelectronics

* Initial E2E Tests (eclipse-theia#387)

* fix branch

* Update NginX

* Add session-uuid label + accept AppDefinition instead of AppDefinitionSpec

* Add the session-specific label theia-cloud.io/session-uuid
* Pass the AppDefinition object instead of its Spec
* Add missing license header in LabelsUtil

Signed-off-by: Olaf Lessenich <[email protected]>

* Reload cert in conversion webhook (eclipse-theia#410)

Co-authored-by: Olaf Lessenich <[email protected]>

* allow blank issues

---------

Signed-off-by: Olaf Lessenich <[email protected]>
Signed-off-by: Simon Graband <[email protected]>
Co-authored-by: Johannes Faltermeier <[email protected]>
Co-authored-by: Harmen Wessels <[email protected]>
Co-authored-by: Simon Graband <[email protected]>
Co-authored-by: Lucas Koehler <[email protected]>
Co-authored-by: Olaf Lessenich <[email protected]>
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