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

Remove series ACL file from workspaces #5840

Merged
merged 2 commits into from
May 23, 2024

Conversation

wsmirnow
Copy link
Contributor

On series ACL update all events of the series will be updated too. This results in a event handler call, where the series ACL should be written to the workspace for snapshotting. But the file will never be deleted. This patch fixes that.

This patch is successfully tested in production for some semesters.

Your pull request should…

On series ACL update all events of the series will be updated too. This results in a event handler call, where the series ACL should be written to the workspace for snapshotting. But the file will never be deleted. This patch fixes that.
workspace.delete(mpAclAttachmentTuple.getB().getURI());
} catch (Exception ex) {
// We only want to clean up. If the file is gone, that is fine too.
logger.debug("Unable to delete series acl attachment for media package {} after updating it.",
Copy link
Member

Choose a reason for hiding this comment

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

Why not use IOUtils.deleteQuietly? If we don't care that the file is gone, we shouldn't be logging a stack trace, even at debug.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree with the log message.

We can't use IOUtils.deleteQuietly because mpAclAttachmentTuple contains the URL to the file in workspace (e.g. https://…) and not a file path on local storage.

Copy link
Member

@gregorydlogan gregorydlogan left a comment

Choose a reason for hiding this comment

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

Approved. Are we going to see another 14.x release? Otherwise this should be repointed at 15.x,

@wsmirnow
Copy link
Contributor Author

Yes, the june release will be the last one.

@gregorydlogan gregorydlogan self-assigned this May 23, 2024
@gregorydlogan gregorydlogan merged commit 39d13b6 into opencast:r/14.x May 23, 2024
3 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.

None yet

2 participants