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

Touch related resources #7

Merged
merged 5 commits into from Sep 1, 2020
Merged

Touch related resources #7

merged 5 commits into from Sep 1, 2020

Conversation

pwinckles
Copy link
Collaborator

@pwinckles pwinckles commented Aug 24, 2020

Jira: https://jira.lyrasis.org/browse/FCREPO-3404

What does this PR do?

  1. When AG parts are updated their containing AG is touched so that they are versioned together
  2. When binaries or binary descriptions are updated their related resource is touched so that they are versioned together
  3. An exception is thrown if the actual content size differs from a provided content size
  4. Staged resources are deleted if a write operation fails

Interested Parties

@fcrepo4/committers

Copy link
Contributor

@bbpennel bbpennel left a comment

Choose a reason for hiding this comment

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

This looks good over all, left a few questions and suggestions

// Touch the AG for non-ACL AG part updates
if (isArchivalGroup
&& !Objects.equals(rootResourceId(), headers.getId())
&& !InteractionModel.ACL.getUri().equals(headers.getInteractionModel())) {
Copy link
Contributor

Choose a reason for hiding this comment

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

ACLs are persisted in the OCFL with the rest of the objects, what is the reason to exclude ACL updates from touching the root object here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the way that Fedora currently works. The reason is that ACLs are never versioned from Fedora's perspective. That is to say, when accessing a memento, the most recent ACL is always applied.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, okay, it will still be versioned but that's invisible from fedora perspective I guess, so its probably reasonable for it to not be reflected on the versions of the AG. We don't need to be able to surface the historic version of acls as they existed at a particular version of the AG, so unless versioning of ACLs from the fedora API perspective becomes a use case, then this should be fine.

Co-authored-by: Ben Pennell <ben.pennell@gmail.com>
@bbpennel bbpennel merged commit 00cc75d into fcrepo:main Sep 1, 2020
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