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

support optimistic locking for ResourceForm #4337

Merged
merged 1 commit into from
May 29, 2020
Merged

Conversation

no-reply
Copy link
Contributor

introduces a field and prepopulator for the (maybe confusingly named?) version
virtual attribute. Hyrax::WorkForm implements this by calling model.etag,
but we don't have that luxury here (since non-fedora backed valkyrie may not
have an etag at all). the logic added here is specific Wings adapter, pulling
out the etag for compatibility.

it's probably okay to keep this wings-specific indefinitely. other adapters
should support optimistic locking internally (indeed, so does Wings) so we can
phase out application-layer lock validation in favor of leaning on
Valkyrie/backend datastore features.

@samvera/hyrax-code-reviewers

introduces a field and prepopulator for the (maybe confusingly named?) `version`
virtual attribute. `Hyrax::WorkForm` implements this by calling `model.etag`,
but we don't have that luxury here (since non-fedora backed valkyrie may not
have an etag at all). the logic added here is specific Wings adapter, pulling
out the etag for compatibility.

it's probably okay to keep this wings-specific indefinitely. other adapters
should support optimistic locking internally (indeed, so does Wings) so we can
phase out application-layer lock validation in favor of leaning on
Valkyrie/backend datastore features.
# pending handling for #version/optimistic locking, and maybe other
# issues. a good way to make progress on ChangeSet forms is to enable
# this test, analyze the stacktrace, and try to patch.
it 'renders a form' do
Copy link
Contributor

Choose a reason for hiding this comment

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

Always great to see a xit become a run spec!

@jeremyf jeremyf merged commit 1eb6fa0 into master May 29, 2020
@jeremyf jeremyf deleted the wings-version-form branch May 29, 2020 15:24
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.

2 participants