Skip to content

Fix clean metadata#1235

Merged
Arnei merged 4 commits intoopencast:developfrom
priya-tik:fix-clean-metadata
Nov 11, 2025
Merged

Fix clean metadata#1235
Arnei merged 4 commits intoopencast:developfrom
priya-tik:fix-clean-metadata

Conversation

@priya-tik
Copy link
Contributor

Refactored the "transformMetadataForUpdate" function to clean the metadata payload and ensure only the essential fields (id and value) are included in the request.

This change reduces the size of the payload and ensures it aligns with the backend's expected structure.

@github-actions
Copy link
Contributor

Hi @priya-tik
Thank you for contributing to the Opencast Admin UI.
We noticed that you have not yet filed an Individual Contributor License Agreement. Doing that (once) helps us to ensure that Opencast stays free for all. If you make your contribution on behalf of an institution, you might also want to file a Corporate Contributor License Agreement (giving you as individual contributor a bit more security as well). It can take a while for this bot to find out about new filings, so if you just filed one or both of the above do not worry about this message!
Please let us know if you have any questions regarding the CLA.

@github-actions
Copy link
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 ghcr.io/opencast/opencast-admin-interface:pr-1235

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 ghcr.io/opencast/opencast-admin-interface:pr-1235

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.

@github-actions
Copy link
Contributor

github-actions bot commented May 13, 2025

This pull request is deployed at test.admin-interface.opencast.org/1235/2025-11-10_16-14-56/ .
It might take a few minutes for it to become available.

@Arnei Arnei added the type:bug Something isn't working label May 13, 2025
Copy link
Contributor

@ppettit ppettit left a comment

Choose a reason for hiding this comment

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

This helps with #1230 a little. It only requests /admin-ng/event/new/metadata once each time you click "create event", but now it looks like nothing is happening for several seconds while it loads. Closing the dialog also takes a couple of seconds.

metadata.fix.mp4

Also for opening an existing event metadata there are still 2 requests

metadata.fix.existing.mp4

It also looks like there are a bunch of unrelated changes in this PR.

@ppettit
Copy link
Contributor

ppettit commented May 13, 2025

on further testing I don't think this PR has an effect on #1230 at all. @priya-tik did you comment on the correct issue?

@priya-tik
Copy link
Contributor Author

@ppettit, Thanks for the feedback! You're right — this looks like a separate issue. My PR focuses on reducing the amount of unnecessary series data fetched from /admin-ng/event/{id}/metadata, but it doesn’t address the number of times the endpoint is called. I agree that repeated calls on open and close are a performance concern — I can look into that next as a follow-up task.

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

@priya-tik priya-tik force-pushed the fix-clean-metadata branch from 8b3f6e9 to 8f72174 Compare May 22, 2025 06:18
Copy link
Member

@Arnei Arnei left a comment

Choose a reason for hiding this comment

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

Does very significantly reduce the payload when sending updated event or series metadata to the backend. Code looks generally good and from my testing nothing else seems to break.

Mostly nitpicks below.

@Arnei
Copy link
Member

Arnei commented May 23, 2025

While you're latest commit addressed some of the style issues, it also applied style changes to a bunch of unrelated code. It would be nice if you could avoid that.

@github-actions
Copy link
Contributor

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

Copy link
Member

@Arnei Arnei left a comment

Choose a reason for hiding this comment

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

Fixed the merge conflicts and my outstanding nitpicks myself. As they were minor, I am fine with merging this now. Should probably be squash-merged.

@Arnei Arnei merged commit 8c3a29c into opencast:develop Nov 11, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants