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

Fix for #8053 - avoid setting lock on as-yet-uncomitted dataset #8056

Merged

Conversation

qqmyers
Copy link
Member

@qqmyers qqmyers commented Aug 5, 2021

What this PR does / why we need it: Fixes the Dataverses datasets/:import and :importddi API calls when release=yes

Which issue(s) this PR closes:

Closes #8053

Special notes for your reviewer: These two API calls, with release=yes appear to be the only two cases where a dataset is being created and published within the same transaction. Unfortunately, updates to the Publish command to create a DatasetLock in a separate transaction (which allow setting the lock earlier than waiting for the Publish (and potential workflow starting) to complete) fail as shown in the issue in this case - as the dataset has not yet been committed. The solution here just avoids trying to set a lock in this case (as no one can be editing the Dataset yet anyway). Alternately, I did verify that running the initial Import/CreateDataset command in a separate transaction, so that it completes before Publish is called, would also work. This would mean that any real problem in the Publish command would result in the dataset being imported but not released/published - that might be useful, but it's a change in functionality, whereas avoiding the lock appears to not affect anything aside from fixing the bug.

Suggestions on how to test this: Use release=true in the :import and :importddi API calls

Does this PR introduce a user interface change? If mockups are available, please link/include them here: no

Is there a release notes update needed for this change?: no

Additional documentation: I added notes in the code

IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from Review 🦁 to QA 🔎✅ Aug 9, 2021
@kcondon kcondon self-assigned this Aug 11, 2021
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0003%) to 19.144% when pulling 99a761e on GlobalDataverseCommunityConsortium:IQSS/8053-fix_import into 72c26e3 on IQSS:develop.

@kcondon kcondon merged commit c6c355a into IQSS:develop Aug 11, 2021
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from QA 🔎✅ to Done 🚀 Aug 11, 2021
@djbrooke djbrooke added this to the 5.7 milestone Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Version 5.5 – Cannot import datasets anymore
5 participants