Skip to content

Commit

Permalink
Merge back develop (#105)
Browse files Browse the repository at this point in the history
* initial semantic API endpoint

* merge new fields with existing ones

* differences from IQSS/develop that break compilation

* Add jsonld lib to compact to local context

* use expand/compact, refactor, add :startmigration endpoint

* try fix for parse error

* log value

* return dataset

* manage versionState, add debug output

* move debug ore generation after configuring dataset

* set versionstate, simplify, move terms init outside loop

* parse version number

* fix toStrings

* debug null pointer in DataverseFieldTypeInputLevel

* add support for fields with their own formal URI

* allow non-published to support debugging and future use

* refactor, use expanded version directly

* add modification time

* expanded has array with 1 val - handle it

* log compound values to start

* compact with no context for decontextualize

* handle appending and compound fields

* sort compound field children by display order

* parse date/time correctly

* Revert "sort compound field children by display order"

This reverts commit 8596ac8.

* typo

* now use Uri instead of label when matching terms

* set dsfield of dsfvalue

* additional debug, always set display order

* generate URIs for child types to match current ore maps

* allow oremap to work w/o modified date for debug

* null check on date itself

* fix compound value iteration

don't replace existing value - always add a new value, but, if not
appending, clear the list of values to start

* fix ttype map for terms with no uri - use title not name

as is done currently in generating the ORE map

* handle date format variations, including DV internal ones

see note in Dataverses - using Date() versus Timestamp() causes a
difference in precision and, perhaps surprisingly, a difference in the
response from version.getLastUpdateTime().toString() in creating the
OREmap.

* and the format in current published bags

* initial endpoint to release a migrated dataset

* create metadataOnOrig field

* add metadataOnOrig to solr

* use Finalize Publication command

Curate is for cases with an existing published version and migrated
datasets only have 1 version

Also - don't want to go through Publish command since it creates new
version numbers, etc.

* add debug, allow more details in 400 responses

* fix date-time issue

* typos

* create transfer bag type with orig files

handle no checksums on orig files

* missing tab

* add type param

* add semantic metadata api call only

* remove OREMap parameter

* fix error handling

FWIW: We have an error handler for the
edu.harvard.iq.dataverse.util.json.JsonParseException class but not for
javax.json.stream.JsonParsingException which was getting caught by the
Throwable handler and returned as a 500 error with json message {}

* append to current terms

* add replace param

* handle append on terms - fix cut/paste errors

* fix logic

* specify default

* make replace still append for multiple val fields

* add migrating switch

* expose uri in datasetField api

* track defined namespaces

and avoid having contexts with specific entries for terms that are in a
namespace already

* define equals, avoid duplicates in list

* replace string with const

* constant for CC0_URI

* GET/DELETE endpoints

* 7130-handle missing contact name

* Fix multiple description logic for info file

* put is always for :draft version

* don't cast to String[]

* add more logging

* handle unpublished versions

* add method that can return JsonObjectBuilder

which can be used with existing AbstractApiBean.ok()

* log details on failure

* multiple updates/fixes, added logging

* fix terms retrieval

* date test fixes for locale

* Java 11 update and test fixes inc. for different exception mesg

* update pom for v11 and running tests under 11

* fix for edu.harvard.iq.dataverse.api.AdminIT test fail in Java 11

The DV code tested in testLoadMetadataBlock_ErrorHandling assumed it
could parse the message of an ArrayOutOfBounds exception as an it to
determine the column that fails. This message is now a String. Rather
than parse it (and fail if it changes), I modified the code so that the
length of the values array is visible in the catch and can be sent
directly (the first out of bounds index is if/when the index is
values.length).

* flyway script adding the new constraint (IQSS#7451)

* A diagnostics script, to check and fix any duplicated harvested storageidentifiers, and re-check the local ones for any new dupes, just in case. (IQSS#7451)

* A pre-release text for the new diagnostics script (will discuss the approach in the PR/dv-tech) (IQSS#7451)

* Arming the script bomb... (IQSS#7451)

* switched to a conditional constraint. (IQSS#7451)

* Update PRE-RELEASE-INFO.txt

* update StringUtils package

* Do not count thumbnails and prep downloads, when redirecting to S3 (similarly to how these downloads are treated when done internally, without redirecting to the remote bucket, in line 457). IQSS#7924

* Implement usage of user supplied handle for authentication. This is an optional parameter.

* Fix mising ";" coding error.

* move metadataOnOrig out of citation block

which makes it optional

* IQSS#7431 remove XML prolog from the individual records of OAI-PMH ListRecords response

* IQSS#7431 adding integration tests

* Bump httpclient from 4.5.5 to 4.5.13

Bumps httpclient from 4.5.5 to 4.5.13.

---
updated-dependencies:
- dependency-name: org.apache.httpcomponents:httpclient
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* More forceful language in the "pre-release note" about the dvobject constraint
being enforced on existing databases in the next release. (IQSS#7451)

* renamed the flyway script for the dvobject constraint (since it didn't make it into 5.5) (IQSS#7451)

* Better check HandleAuthHandle for default value of null. If unequal to null then use it.

* Change "string" to "String" with uppercase first character

* build(ci): atempt to fix coveralls report. IQSS#7977

* Change parameter "HandleAuthHandle" so it start with a lower case character when it is being assigned.

* Update 5.3-release-notes.md

Removed incorrect statement: (If you are using a PostgreSQL server on `localhost:5432`, you can omit `dataverse.db.host` and `dataverse.db.port`.)

* sync with migration api branch (tests, docs, bug fixes)

* rename SQL update script IQSS#7451

* prevent page from blowing up if no remind msg in bundle IQSS#7975

* get "create dataset" working again IQSS#7986

* remove TODO IQSS#7986

Per comment from Jim: "This works and doesn't break the anonymized
access functionality as I thought it might."

* add anonymized access methods

* fix test

* Update doc/release-notes/6497-semantic-api.md

Co-authored-by: Philip Durbin <philipdurbin@gmail.com>

* Update doc/sphinx-guides/source/developers/dataset-semantic-metadata-api.rst

Co-authored-by: Philip Durbin <philipdurbin@gmail.com>

* add create example, remove solr schema copies file

* removed debug logging

* missing header

* Added an extra clause for some IQSS-specific harvested identifiers.
Extremely unlikely to be encountered anywhere else; but need to be
included to be able to QA on a copy of the prod. db.
Plus some extr diagnostics. (IQSS#7451)

* IQSS#7893 link Rserve documentation to necessary files in Dataverse repo

* IQSS#7893 remove redundant script mention per feedback from Leonid

* Adding -H + API token to curl commands

Without ``-H`` and the API token in these curl commands, the native API rejects the user's requests on the ground that they are a 'guest'.

* remove metadataOnOrig per review

* IQSS#7893 use fixedwidthplain text instead, clone master instead of develop

* fixes the small formatting issue with the link (IQSS#7893)

* Update doc/sphinx-guides/source/api/native-api.rst

Co-authored-by: Philip Durbin <philip_durbin@harvard.edu>

* Update doc/sphinx-guides/source/api/native-api.rst

Co-authored-by: Philip Durbin <philip_durbin@harvard.edu>

* Update doc/sphinx-guides/source/api/native-api.rst

Co-authored-by: Philip Durbin <philip_durbin@harvard.edu>

* Update doc/sphinx-guides/source/api/native-api.rst

Co-authored-by: Philip Durbin <philip_durbin@harvard.edu>

* Update documentation to be more consise about the handle and give a better example.

* IQSS#7936 append deaccessionDialog.reasons with periods for proper display

* add missing create method (in migrate PR)

* No "@id" npe fix

* avoid npe in logging

* only require "@id" when migrating

* fix logging in create case

* WIP

* Temporary conflict solution

* Added marker comments where code must be revised/fixed later '// TODO: FIX FOR MULTI-LICENSE'

Co-authored-by: qqmyers <qqmyers@hotmail.com>
Co-authored-by: Leonid Andreev <leonid@hmdc.harvard.edu>
Co-authored-by: Gustavo Durand <scolapasta+github@gmail.com>
Co-authored-by: Robert Verkerk <robert.verkerk@surfsara.nl>
Co-authored-by: pkiraly <pkiraly@gwdg.de>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Oliver Bertuch <o.bertuch@fz-juelich.de>
Co-authored-by: Kevin Condon <kcondon@hmdc.harvard.edu>
Co-authored-by: Philip Durbin <philip_durbin@harvard.edu>
Co-authored-by: Philip Durbin <philipdurbin@gmail.com>
Co-authored-by: Don Sizemore <don.sizemore@gmail.com>
Co-authored-by: Benjamin Peuch <benjamin.peuch@gmail.com>
Co-authored-by: Jan van Mansum <janvanmansum@users.noreply.github.com>
  • Loading branch information
14 people authored Jul 14, 2021
1 parent 4518fd6 commit 19f3eac
Show file tree
Hide file tree
Showing 46 changed files with 1,950 additions and 251 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/maven_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.jdk }}
Expand All @@ -38,8 +38,5 @@ jobs:
- name: Maven Code Coverage
env:
CI_NAME: github
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }}
CI_BUILD_NUMBER: ${{ github.run_id }}
CI_BUILD_URL: https://github.com/${{ github.repository }}/commit/${{ github.event.after }}/checks
COVERALLS_SECRET: ${{ secrets.GITHUB_TOKEN }}
run: mvn -V -B jacoco:report coveralls:report -DrepoToken=${{ secrets.COVERALLS_TOKEN }}
run: mvn -V -B jacoco:report coveralls:report -DrepoToken=${COVERALLS_SECRET} -DpullRequest=${{ github.event.number }}
1 change: 0 additions & 1 deletion doc/release-notes/5.3-release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ If you are still using pre-5.0 version of Dataverse, and Glassfish version 4, pl
3\. Update your database connection.

Please configure your connection details, replacing all the `${DB_...}`.
(If you are using a PostgreSQL server on `localhost:5432`, you can omit `dataverse.db.host` and `dataverse.db.port`.)

- `<payara install path>/bin/asadmin create-system-properties "dataverse.db.user=${DB_USER}"`
- `<payara install path>/bin/asadmin create-system-properties "dataverse.db.host=${DB_HOST}"`
Expand Down
7 changes: 7 additions & 0 deletions doc/release-notes/6497-semantic-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Release Highlights

### Dataset Semantic API (Experimental)

Dataset metadata can be retrieved/set/updated using a new, flatter JSON-LD format - following the format of an OAI-ORE export (RDA-conformant Bags), allowing for easier transfer of metadata to/from other systems (i.e. without needing to know Dataverse's metadata block and field storage architecture). This new API also allows for the update of terms metadata (#5899).

This development was supported by the [Research Data Alliance](https://rd-alliance.org), DANS, and Sciences PO and follows the recommendations from the [Research Data Repository Interoperability Working Group](http://dx.doi.org/10.15497/RDA00025).
15 changes: 15 additions & 0 deletions doc/sphinx-guides/source/_static/api/dataset-create.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"http://purl.org/dc/terms/title": "Darwin's Finches",
"http://purl.org/dc/terms/subject": "Medicine, Health and Life Sciences",
"http://purl.org/dc/terms/creator": {
"https://dataverse.org/schema/citation/author#Name": "Finch, Fiona",
"https://dataverse.org/schema/citation/author#Affiliation": "Birds Inc."
},
"https://dataverse.org/schema/citation/Contact": {
"https://dataverse.org/schema/citation/datasetContact#E-mail": "finch@mailinator.com",
"https://dataverse.org/schema/citation/datasetContact#Name": "Finch, Fiona"
},
"https://dataverse.org/schema/citation/Description": {
"https://dataverse.org/schema/citation/dsDescription#Text": "Darwin's finches (also known as the Galápagos finches) are a group of about fifteen species of passerine birds."
}
}
8 changes: 4 additions & 4 deletions doc/sphinx-guides/source/api/native-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -631,13 +631,13 @@ Example: Getting the dataset whose DOI is *10.5072/FK2/J8SJZB*:
export SERVER_URL=https://demo.dataverse.org
export PERSISTENT_IDENTIFIER=doi:10.5072/FK2/J8SJZB
curl $SERVER_URL/api/datasets/:persistentId/?persistentId=$PERSISTENT_IDENTIFIER
curl -H "X-Dataverse-key:$API_TOKEN" $SERVER_URL/api/datasets/:persistentId/?persistentId=$PERSISTENT_IDENTIFIER
The fully expanded example above (without environment variables) looks like this:
.. code-block:: bash
curl https://demo.dataverse.org/api/datasets/:persistentId/?persistentId=doi:10.5072/FK2/J8SJZB
curl -H "X-Dataverse-key:$API_TOKEN" https://demo.dataverse.org/api/datasets/:persistentId/?persistentId=doi:10.5072/FK2/J8SJZB
Getting its draft version:
Expand All @@ -646,13 +646,13 @@ Getting its draft version:
export SERVER_URL=https://demo.dataverse.org
export PERSISTENT_IDENTIFIER=doi:10.5072/FK2/J8SJZB
curl http://$SERVER/api/datasets/:persistentId/versions/:draft?persistentId=$PERSISTENT_IDENTIFIER
curl -H "X-Dataverse-key:$API_TOKEN" http://$SERVER/api/datasets/:persistentId/versions/:draft?persistentId=$PERSISTENT_IDENTIFIER
The fully expanded example above (without environment variables) looks like this:
.. code-block:: bash
curl https://demo.dataverse.org/api/datasets/:persistentId/versions/:draft?persistentId=doi:10.5072/FK2/J8SJZB
curl -H "X-Dataverse-key:$API_TOKEN" https://demo.dataverse.org/api/datasets/:persistentId/versions/:draft?persistentId=doi:10.5072/FK2/J8SJZB
|CORS| Show the dataset whose id is passed:
Expand Down
103 changes: 103 additions & 0 deletions doc/sphinx-guides/source/developers/dataset-semantic-metadata-api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
Dataset Semantic Metadata API
=============================

The OAI_ORE metadata export format represents Dataset metadata using json-ld (see the :doc:`/admin/metadataexport` section). As part of an RDA-supported effort to allow import of Datasets exported as Bags with an included OAI_ORE metadata file,
an experimental API has been created that provides a json-ld alternative to the v1.0 API calls to get/set/delete Dataset metadata in the :doc:`/api/native-api`.

You may prefer to work with this API if you are building a tool to import from a Bag/OAI-ORE source or already work with json-ld representations of metadata, or if you prefer the flatter json-ld representation to Dataverse software's json representation (which includes structure related to the metadata blocks involved and the type/multiplicity of the metadata fields.)
You may not want to use this API if you need stability and backward compatibility (the 'experimental' designation for this API implies that community feedback is desired and that, in future Dataverse software versions, the API may be modified based on that feedback).

Note: The examples use the 'application/ld+json' mimetype. For compatibility reasons, the APIs also be used with mimetype "application/json-ld"

Get Dataset Metadata
--------------------

To get the json-ld formatted metadata for a Dataset, specify the Dataset ID (DATASET_ID) or Persistent identifier (DATASET_PID), and, for specific versions, the version number.

.. code-block:: bash
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
export DATASET_ID='12345'
export DATASET_PID='doi:10.5072/FK2A1B2C3'
export VERSION='1.0'
export SERVER_URL=https://demo.dataverse.org
Example 1: Get metadata for version '1.0'
curl -H X-Dataverse-key:$API_TOKEN -H 'Accept: application/ld+json' "$SERVER_URL/api/datasets/$DATASET_ID/versions/$VERSION/metadata"
Example 2: Get metadata for the latest version using the DATASET PID
curl -H X-Dataverse-key:$API_TOKEN -H 'Accept: application/ld+json' "$SERVER_URL/api/datasets/:persistentId/metadata?persistentId=$DATASET_PID"
You should expect a 200 ("OK") response and JSON-LD mirroring the OAI-ORE representation in the returned 'data' object.


Add Dataset Metadata
--------------------

To add json-ld formatted metadata for a Dataset, specify the Dataset ID (DATASET_ID) or Persistent identifier (DATASET_PID). Adding '?replace=true' will overwrite an existing metadata value. The default (replace=false) will only add new metadata or add a new value to a multi-valued field.

.. code-block:: bash
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
export DATASET_ID='12345'
export DATASET_PID='doi:10.5072/FK2A1B2C3'
export VERSION='1.0'
export SERVER_URL=https://demo.dataverse.org
Example: Change the Dataset title
curl -X PUT -H X-Dataverse-key:$API_TOKEN -H 'Content-Type: application/ld+json' -d '{"Title": "Submit menu test", "@context":{"Title": "http://purl.org/dc/terms/title"}}' "$SERVER_URL/api/datasets/$DATASET_ID/metadata?replace=true"
Example 2: Add a description using the DATASET PID
curl -X PUT -H X-Dataverse-key:$API_TOKEN -H 'Content-Type: application/ld+json' -d '{"citation:Description": {"dsDescription:Text": "New description"}, "@context":{"citation": "https://dataverse.org/schema/citation/","dsDescription": "https://dataverse.org/schema/citation/dsDescription#"}}' "$SERVER_URL/api/datasets/:persistentId/metadata?persistentId=$DATASET_PID"
You should expect a 200 ("OK") response indicating whether a draft Dataset version was created or an existing draft was updated.


Delete Dataset Metadata
-----------------------

To delete metadata for a Dataset, send a json-ld representation of the fields to delete and specify the Dataset ID (DATASET_ID) or Persistent identifier (DATASET_PID).

.. code-block:: bash
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
export DATASET_ID='12345'
export DATASET_PID='doi:10.5072/FK2A1B2C3'
export VERSION='1.0'
export SERVER_URL=https://demo.dataverse.org
Example: Delete the TermsOfUseAndAccess 'restrictions' value 'No restrictions' for the latest version using the DATASET PID
curl -X PUT -H X-Dataverse-key:$API_TOKEN -H 'Content-Type: application/ld+json' -d '{"https://dataverse.org/schema/core#restrictions":"No restrictions"}' "$SERVER_URL/api/datasets/:persistentId/metadata/delete?persistentId=$DATASET_PID"
Note, this example uses the term URI directly rather than adding an '@context' element. You can use either form in any of these API calls.

You should expect a 200 ("OK") response indicating whether a draft Dataset version was created or an existing draft was updated.


Create a Dataset
----------------

Specifying the Content-Type as application/ld+json with the existing /api/dataverses/{id}/datasets API call (see :ref:`create-dataset-command`) supports using the same metadata format when creating a Dataset.

With curl, this is done by adding the following header:

.. code-block:: bash
-H 'Content-Type: application/ld+json'
.. code-block:: bash
export API_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
export SERVER_URL=https://demo.dataverse.org
export DATAVERSE_ID=root
export PERSISTENT_IDENTIFIER=doi:10.5072/FK27U7YBV
curl -H X-Dataverse-key:$API_TOKEN -H 'Content-Type: application/ld+json' -X POST $SERVER_URL/api/dataverses/$DATAVERSE_ID/datasets --upload-file dataset-create.jsonld
An example jsonld file is available at :download:`dataset-create.jsonld <../_static/api/dataset-create.jsonld>`

1 change: 1 addition & 0 deletions doc/sphinx-guides/source/developers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ Developer Guide
big-data-support
aux-file-support
s3-direct-upload-api
dataset-semantic-metadata-api
workflows
12 changes: 12 additions & 0 deletions doc/sphinx-guides/source/installation/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ Here are the configuration options for handles:
- :ref:`:IdentifierGenerationStyle <:IdentifierGenerationStyle>` (optional)
- :ref:`:DataFilePIDFormat <:DataFilePIDFormat>` (optional)
- :ref:`:IndependentHandleService <:IndependentHandleService>` (optional)
- :ref:`:HandleAuthHandle <:HandleAuthHandle>` (optional)

Note: If you are **minting your own handles** and plan to set up your own handle service, please refer to `Handle.Net documentation <http://handle.net/hnr_documentation.html>`_.

Expand Down Expand Up @@ -1543,6 +1544,17 @@ By default this setting is absent and the Dataverse Software assumes it to be fa

``curl -X PUT -d 'true' http://localhost:8080/api/admin/settings/:IndependentHandleService``

.. _:HandleAuthHandle:

:HandleAuthHandle
+++++++++++++++++++++++++

Specific for Handle PIDs. Set this setting to <prefix>/<suffix> to be used on a global handle service when the public key is NOT stored in the default handle.
By default this setting is absent and the Dataverse Software assumes it to be not set. If the public key for instance is stored in handle: 21.T12996/USER01.
For this handle the prefix is '21.T12996' and the suffix is 'USER01'. The command to execute is then:

``curl -X PUT -d '21.T12996/USER01' http://localhost:8080/api/admin/settings/:HandleAuthHandle``

.. _:FileValidationOnPublishEnabled:

:FileValidationOnPublishEnabled
Expand Down
9 changes: 8 additions & 1 deletion doc/sphinx-guides/source/installation/prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,14 @@ The Dataverse Software uses `Rserve <https://rforge.net/Rserve/>`_ to communicat
to R. Rserve is installed as a library package, as described in the
step above. It runs as a daemon process on the server, accepting
network connections on a dedicated port. This requires some extra
configuration and we provide a script (:fixedwidthplain:`scripts/r/rserve/rserve-setup.sh`) for setting it up.
configuration and we provide a script for setting it up.

You'll want to obtain local copies of the Rserve setup files found in
https://github.com/IQSS/dataverse/tree/master/scripts/r/rserve
either by cloning a local copy of the IQSS repository:
:fixedwidthplain:`git clone -b master https://github.com/IQSS/dataverse.git`
or by downloading the files individually.

Run the script as follows (as root)::

cd <DATAVERSE SOURCE TREE>/scripts/r/rserve
Expand Down
21 changes: 19 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<aws.version>1.11.762</aws.version>
<commons.logging.version>1.2</commons.logging.version>
<commons.lang3.version>3.12.0</commons.lang3.version>
<httpcomponents.client.version>4.5.5</httpcomponents.client.version>
<httpcomponents.client.version>4.5.13</httpcomponents.client.version>
<junit.version>4.13.1</junit.version>
<junit.jupiter.version>5.7.0</junit.jupiter.version>
<junit.vintage.version>${junit.jupiter.version}</junit.vintage.version>
Expand Down Expand Up @@ -173,9 +173,21 @@
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.0.4</version>
<version>1.1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>1.5.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
Expand Down Expand Up @@ -218,6 +230,11 @@
<artifactId>aws-java-sdk-s3</artifactId>
<!-- no version here as managed by BOM above! -->
</dependency>
<dependency>
<groupId>com.apicatalog</groupId>
<artifactId>titanium-json-ld</artifactId>
<version>0.8.6</version>
</dependency>
<dependency>
<!-- required by org.swordapp.server.sword2-server -->
<groupId>org.apache.abdera</groupId>
Expand Down
39 changes: 39 additions & 0 deletions scripts/issues/7451/PRE-RELEASE-INFO.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
In the next release another constraint is being added to existing
databases, to prevent any possibility of creating datafile objects
referencing the same file. This was originally planned for v4.20, but
in that release the constraint was only added to newly created
databases, and was not forced on the databases that had already
existed. If your current database was originally created by version
4.20 or newer, you don't need to do anything.

If you do have an older database, it MUST BE RE-CHECKED for any
existing duplicates before the next release (5.6, presumably) can be
deployed. Hopefully there are no such inconsistencies in your
database, but if there are any, they will need to be resolved, or the
next version of the application WILL FAIL TO DEPLOY, with an error
message from FlyWay. Please run the following script:

https://github.com/IQSS/dataverse/raw/develop/scripts/issues/7451/check_datafiles_7451.sh

The script relies on the PostgreSQL utility psql to access the
database. You will need to edit the credentials at the top of the script
to match your database configuration.

The script will check your database for any duplicated storage
identifiers that would violate the new constraint.

For harvested files, it will directly resolve any conflicts.

For local files, rather than attempt to make any changes right away
(this being an issue of data integrity with a potential to affect your
users) it will instruct you to send the produced diagnostic
information to support@dataverse.org so that we can assist you
in resolving the issues in your database.

If no inconsistencies are found, the script will report that the database
is ready to be upgraded to the next release.

(Please note that there's a very good chance that your database does
not have any conflicts of this nature. But we want to do this to be
absolutely sure. We apologize for any inconvenience.)

Loading

0 comments on commit 19f3eac

Please sign in to comment.