A lot of tests started to fail with an error that `KernelService.getInstance` returns null
The problem is that `BackendKernelService` is not registered in these test due to the absent `intellij.platform.kernel.backend` module.
The proposed solution was to add `intellij.platform.monolith.main` dependency to `intellij.platform.resources` which should ensure platform services registration in all tests
GitOrigin-RevId: c3a8c3c51620497b0c8d23d5baeb2ba521df6c8f
If flag `rhizome.progress` is enabled, progress info is going to be reported via Rhizome DB rather than with `progressStarted`.
Under the flag no indicators are created right now - additional support has to be added on the side of `StatusBarImpl`
`PlatformTaskSupport` also subscribes to `taskInfo.statuses` to cancel a task if its status has been set to `CANCELED`. `RUNNING` and `PAUSED` statuses are going to be supported later
GitOrigin-RevId: a7b702eaf20260a641e928a95b413e2ba4c61d3b
`TaskManager` provides util methods to cancel, pause or resume a task.
The manager ensures that only valid transitions happen - for example, a canceled task cannot be resumed or paused.
Also, the manager ensures that non-cancelable tasks won't get canceled by checking `taskInfoEntity.cancellation` property
GitOrigin-RevId: d2a262b861dab310e314f304231da5103394843c
`TaskStorage` service is responsible for storing/updating/removing tasks from Rhizome DB.
There are two implementations of the service - backend (available in mononlith and backend.split) and frontend.split
The backend implementation stores `TaskInfoEntity` into a shared partition of DB, so the tasks can be available both on backend and all connected frontends.
Frontend split implementation stores `TaskInfoEntity` into a local partition of DB, so the tasks produced by one of the frontends won't be available for backend or other frontends.
Consider "Code With Me" case here: when one of the guests starts some tasks, it shouldn't be visible to other guests.
However, if the host starts a task - all guests should see it.
GitOrigin-RevId: a020d871d2f5f88809dfed551f511b116e8ff550
This module is going to contain implementation of backend services for progress API.
`com.intellij.platform.experimental.backend` dependency in `.xml` file indicates that the module should not be loaded in frontend-only builds (e.g. frontend split)
The module is going to be loaded in monolith and backend split.
GitOrigin-RevId: adfe37ab2d8f914c422daf02fdd8f71f020a3661
This entity is going to represent running progress in Rhizome DB.
The data is mostly copied from `PlatformTaskSupport.ProgressStartedEvent` structure.
Few differences here:
- No `CoroutineContext` in the entity
It's not possible to put the actual coroutine context to `SharedEntity` because it's not serializable.
The context is used mostly for cancellation of a job. The possibility to cancel a job will be provided through a different API.
- New `TaskStatus` field
The status represents the actual status of a task, whether it's running, paused or canceled.
Also:
- Added utils which should make working with `TasksInfoEntity` easier
The utils are queries, which allow avoiding writing the same `asQuery().getOne` in every place where tasks info needs to be retrieved.
- Marked classes used in `TaskInfoEntity` as `@Serializable`
All data used in `SharedEntities` have to be serializable, otherwise it won't be possible to put entity to shared DB
- Add `kotlinx/serialization/KSerializer` to `ideaProjectStructure/exposed-third-party`
With Rhizome `KSerializer` is going to be exposed in more places. Therefore, it makes sense to add this class to default `exposed-third-party-api`, so the tests won't fail because of the added `@Serializable` annotation.
GitOrigin-RevId: 1a1b979b7660d41879a40a4d28b6487b3205e743