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

Additions to the Locks API #8445

Merged
merged 6 commits into from
Feb 24, 2022
Merged

Additions to the Locks API #8445

merged 6 commits into from
Feb 24, 2022

Conversation

landreev
Copy link
Contributor

What this PR does / why we need it:
This is the code part of IQSS/dataverse.harvard.edu#135, the local issue opened for dealing with the backlog of dataset locks in production.
This PR extends the existing locks API by adding an end point for listing all the locks that are present (the old API is limited to checking for locks on specific datasets). Going forward this API can be used to monitor locks without having to run database queries.
Listing can be filtered by lock type and user with the optional query parameters.

Which issue(s) this PR closes:

Closes IQSS/dataverse.harvard.edu#135

Special notes for your reviewer:
The new API is superuser-only. I briefly considered placing it under /api/admin, but decided to keep it under /api/datasets with the existing locks APIs. In practice we will want this new API to be used by admin users who may not have access to localhost.
The rest of it is very straightforward.

Suggestions on how to test this:
Should be self-explanatory based on the documentation section in the API guide.

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

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

Additional documentation:

@sekmiller sekmiller self-assigned this Feb 23, 2022

.. code-block:: bash

curl -H "X-Dataverse-key: xxx" "http://localhost:8080/api/datasets/locks?type=Ingest&userIdentifier=davis4ever"
Copy link
Contributor

Choose a reason for hiding this comment

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

davis4ever

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good eye! 😄

Copy link
Member

Choose a reason for hiding this comment

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

7773392

Copy link
Contributor

@sekmiller sekmiller left a comment

Choose a reason for hiding this comment

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

looks good. moving to QA

@sekmiller sekmiller removed their assignment Feb 23, 2022
@kcondon kcondon self-assigned this Feb 24, 2022
@kcondon kcondon merged commit ee7cc4b into develop Feb 24, 2022
@kcondon kcondon deleted the local135 branch February 24, 2022 17:02
@pdurbin pdurbin added this to the 5.10 milestone Mar 2, 2022
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.

Investigate Increase in the Number of Tickets Related to Publishing Locks, add API to show locked datasets
4 participants