Skip to content

LifeCycle Policies - Squashed - #1571

Open
Arnei wants to merge 11 commits into
opencast:developfrom
Arnei:lifecycle-write-squashed
Open

Arnei wants to merge 11 commits into
opencast:developfrom
Arnei:lifecycle-write-squashed

Conversation

@Arnei

@Arnei Arnei commented Apr 8, 2026 •

Copy link
Copy Markdown
Member

Originally #1004.

The old PR for lifecycle policies was old, had many commits and many merges. Creating a squashed commit seemed like the simplest option to bring lifecycle policies from the old history to the new history.

Instead of only being able to view lifecycle policies, this commit lets you edit them, create new ones and even delete them.

Depends on changes to the backend: opencast/opencast#6139. These changes are currently pointed at develop.

To test this, you'll need an Opencast with backend changes mentioned above.

Demonstration:
Bildschirmaufzeichnung vom 2024-12-04 10-45-28.webm

@Arnei Arnei added the type:enhancement New feature or request label Apr 8, 2026
@github-actions

github-actions Bot commented Apr 8, 2026 •

Copy link
Copy Markdown
Contributor

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

podman run --rm -it -p 127.0.0.1:3000:3000 

Specify a different backend like stable.opencast.org:

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://stable.opencast.org 

It may take a few seconds for the interface to spin up.
It will then be available at http://127.0.0.1:3000.
For more options you can pass on to the proxy, take a look at the README.md.

@Arnei
Arnei force-pushed the lifecycle-write-squashed branch from 2270051 to 529113d Compare April 8, 2026 12:30
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@Arnei
Arnei force-pushed the lifecycle-write-squashed branch from d0fa2e2 to 58df430 Compare April 14, 2026 09:11
@github-actions

github-actions Bot commented Apr 14, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is deployed at test.admin-interface.opencast.org/1571/2026-12-04_14-04-11/ .
It might take a few minutes for it to become available.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@ferishili
ferishili self-requested a review April 20, 2026 11:26
@ferishili ferishili self-assigned this Apr 20, 2026
@ferishili

ferishili commented Apr 20, 2026 •

Copy link
Copy Markdown
Contributor

There are currently two major errors that prevent me from continuing with deeper testing:


  1. The sort parameter is undefined:
    GET | http://localhost:3000/api/lifecyclemanagement/policies?limit=10&offset=0&sort=undefined:undefined
Screenshot 2026-04-20 at 13 28 34
  1. In the Create modal, as soon as I navigate to the Access Policy step/tab, an error appears:

In HTML, <td> cannot be a child of <td>.

Screenshot 2026-04-20 at 13 31 09

That would nice to have a rebase here as well!

Thanks @Arnei

@Arnei
Arnei force-pushed the lifecycle-write-squashed branch from a7f07d3 to 8e01070 Compare April 21, 2026 07:46
@Arnei

Arnei commented Apr 21, 2026

Copy link
Copy Markdown
Member Author

For the first error, try clearing cookies and website data for the page.
For the second error, that currently appears in every Access Policy tab (not just lifecycle policies), even outside of this PR. It should not prevent you from testing.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

Comment thread src/slices/lifeCycleDetailsSlice.ts Resolved
Comment thread src/slices/lifeCycleDetailsSlice.ts Resolved
Comment thread src/slices/lifeCycleSlice.ts Resolved
Comment thread src/slices/lifeCycleSlice.ts Resolved

@ferishili ferishili left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While checking the browser dev console, I noticed several info logs that only show the response object from a request, for example:

Object { data: "", status: 200, statusText: "OK", headers: {...}, config: {...}, request: XMLHttpRequest }

Because of that, I commented out the console.info statements introduced in this PR so we can decide whether they should remain or be removed before merging.

Another issue I ran into: when editing an existing record and clicking Save, the dialog does not close, although the notification is displayed. Also, when specifically changing the "Active" parameter, the change is not applied.

Additionally, when clicking Cancel, I would expect the dialog to close.

Video reference:
https://github.com/user-attachments/assets/745d75eb-afeb-4124-9adf-d26527ce7e16

@Arnei
Arnei force-pushed the lifecycle-write-squashed branch from 6d6c3b8 to 8900982 Compare April 22, 2026 14:29
@Arnei
Arnei force-pushed the lifecycle-write-squashed branch from 8900982 to 68bbb0d Compare April 22, 2026 14:54
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@Arnei
Arnei force-pushed the lifecycle-write-squashed branch from c9677d3 to 905f2b3 Compare September 10, 2026 08:45
@gregorydlogan

Copy link
Copy Markdown
Member

Is this something you want to try and get into 21 still? Or leave the UI side for 22?

@Arnei

Arnei commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

I don't think we currently have any plans for what to do with the UI side.

@mtneug

mtneug commented Oct 19, 2026

Copy link
Copy Markdown
Member

Does this introduce breaking config changes? Otherwise, it would be great to have this in 21.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@mtneug

mtneug commented Nov 3, 2026

Copy link
Copy Markdown
Member

@Arnei do you have a status update for this especially regarding Opencast 21?

@Arnei

Arnei commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

We have someone taking a look at this, but we are not stressing to get this into 21.

@jduehring
jduehring self-requested a review November 11, 2026 09:20
@jduehring

jduehring commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Nice work, tested against current develop, mostly seems to work fine, but I ran into a few issues:

  • For REPEATING timing the cron trigger selection won't let me select a date/time (tested in Firefox). It looks like the selection window is rendered behind the modal. Screencapture for reference:
Screencast.from.2026-11-12.13-50-56.webm
  • I managed to create an endless publishing loop by:

    • Creating a policy to retract a recording (filtered by title) at a specific date/time and waiting for that to happen
    • Creating a second policy with timing "Always" to publish the same recording
    • According to the docs the second policy should only be applied once if it hasn't been in the past, but instead it just repeats endlessly.
  • Filter for languages and licences seem to be shown as variable names (EVENTS.LICENCE.CC0, LANGUAGES.DUTCH etc.)

  • Sorting the policies in the UI by clicking on "Timing" results in an error and no policies shown

Some less important notes while testing the user experience:

  • There is no feedback whats wrong, when I forget to specify a workflow, filter or any of the other required fields. Clicking "Next" just does nothing in that case.

  • This is probably both front/backend related and debatable, but I would disallow the creation for lifecyle policies in the past. If someone selects a past date, imo it most likely is a user error and I would not want to have for example all my videos deleted instantly just because I mistakenly set "2026" instead of "2027". But maybe I am missing a use case here.

  • When setting the target filters it was not immediately obvious to me what the "Type" selection between Search and Wildcard meant. Maybe add a brief explanation in the docs.

  • In the target filter dropdown you can search for a field and if it doesn't match you can "create" the filter. Is there a use case for this?

  • Policies created from the config files seem to be editable at first, but saving fails. I understand why they should not be editable, but maybe in this case disallow any changes in the modal in the first place?

@jduehring jduehring left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Apart from the already mentioned bugs, I didn't find any major issues, but found some mostly minor nitpicks.

Comment thread src/slices/lifeCycleDetailsSlice.ts Resolved
Comment thread src/utils/dropDownUtils.ts Resolved
Arnei added 11 commits December 4, 2026 10:52
The old PR for lifecycle policies was old, had many commits and
many merges. Creating a squashed commit seemed like
the simplest option to bring lifecycle policies from the old
history to the new history.
The general lifecycle policy should now behave similar
to events and series in regards to how the save button, the resulting
notification and the cancel button works.
It is not supposed to be user controlled.
When setting a filter for a lifecycle policy to "isPartOf", the value
dropdown would be empty,
so you could not select any series. This fixes that.
When changing the filter for a lifecycle policy, the filters
type was reset to undefined.
Undefined is never a legal value, so it would always have to be
manually set afterwards.
This changes it so that instead of undefined, one of the legal
values for the filters type is already filled in.
Since we are not refetching lifecycle metadata all the time,
we need to make sure our state is up to date. This should help
in ensuring that.
No need to show ACLs if they don't do anything. Not kicking out
the code in case ACLs make a return at some point.
Lazy-loads the cron editor and shows its dropdowns inside the modal, offers only filters the backend supports, translates the remaining texts and makes policies from config files read-only.

This commit was AI generated
Removes a leftover log, fixes a notification key, shows workflow descriptions again and restores a translation that is still in use.

This commit was AI generated
@Arnei
Arnei force-pushed the lifecycle-write-squashed branch from 905f2b3 to a123bfb Compare December 4, 2026 14:03
@Arnei

Arnei commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

Thanks for the extensive review and testing. Most of your concerns and feedback should be addressed now.

I managed to create an endless publishing loop

That looks to be an issue in the backend, nothing I can fix here right now.

There is no feedback whats wrong, when I forget to specify a workflow, filter or any of the other required fields. Clicking "Next" just does nothing in that case.

This is only fixed in the sense that "Next" should now be properly disabled when not all required fields are filled out. The admin ui not giving proper feedback on required-but-not-filled-out fields is a more general problem that this PR does not need to solve I think.

This is probably both front/backend related and debatable, but I would disallow the creation for lifecyle policies in the past.

I didn't disallow it, but added a warning about it having immediate effects.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants