Skip to content

Commit 6c76282

Browse files
committed
Merge branch 'develop' into 11744-cors-echo-origin-vary
2 parents 83e4a10 + 53bff4c commit 6c76282

File tree

104 files changed

+5605
-587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+5605
-587
lines changed

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171

7272
# Initializes the CodeQL tools for scanning.
7373
- name: Initialize CodeQL
74-
uses: github/codeql-action/init@v3
74+
uses: github/codeql-action/init@v4
7575
with:
7676
languages: ${{ matrix.language }}
7777
build-mode: ${{ matrix.build-mode }}
@@ -99,6 +99,6 @@ jobs:
9999
exit 1
100100
101101
- name: Perform CodeQL Analysis
102-
uses: github/codeql-action/analyze@v3
102+
uses: github/codeql-action/analyze@v4
103103
with:
104104
category: "/language:${{matrix.language}}"

.github/workflows/container_app_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
:ship: [See on GHCR](https://github.com/orgs/gdcc/packages/container). Use by referencing with full name as printed above, mind the registry name.
8787
8888
# Leave a note when things have gone sideways
89-
- uses: peter-evans/create-or-update-comment@v4
89+
- uses: peter-evans/create-or-update-comment@v5
9090
if: ${{ failure() }}
9191
with:
9292
issue-number: ${{ github.event.client_payload.pull_request.number }}

.github/workflows/container_maintenance.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ jobs:
218218
cat "./modules/container-base/README.md"
219219
- name: Push description to DockerHub for base image
220220
if: ${{ ! inputs.dry_run && ! inputs.damp_run && toJSON(needs.base-image.outputs.rebuilt_images) != '[]' }}
221-
uses: peter-evans/dockerhub-description@v4
221+
uses: peter-evans/dockerhub-description@v5
222222
with:
223223
username: ${{ secrets.DOCKERHUB_USERNAME }}
224224
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -243,7 +243,7 @@ jobs:
243243
cat "./src/main/docker/README.md"
244244
- name: Push description to DockerHub for application image
245245
if: ${{ ! inputs.dry_run && ! inputs.damp_run && toJSON(needs.application-image.outputs.rebuilt_images) != '[]' }}
246-
uses: peter-evans/dockerhub-description@v4
246+
uses: peter-evans/dockerhub-description@v5
247247
with:
248248
username: ${{ secrets.DOCKERHUB_USERNAME }}
249249
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -268,7 +268,7 @@ jobs:
268268
cat "./modules/container-configbaker/README.md"
269269
- name: Push description to DockerHub for config baker image
270270
if: ${{ ! inputs.dry_run && ! inputs.damp_run && toJSON(needs.configbaker-image.outputs.rebuilt_images) != '[]' }}
271-
uses: peter-evans/dockerhub-description@v4
271+
uses: peter-evans/dockerhub-description@v5
272272
with:
273273
username: ${{ secrets.DOCKERHUB_USERNAME }}
274274
password: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/spi_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
with:
4343
java-version: '17'
4444
distribution: 'adopt'
45-
server-id: ossrh
45+
server-id: central
4646
server-username: MAVEN_USERNAME
4747
server-password: MAVEN_PASSWORD
4848
- uses: actions/cache@v4
@@ -80,7 +80,7 @@ jobs:
8080
with:
8181
java-version: '17'
8282
distribution: 'adopt'
83-
server-id: ossrh
83+
server-id: central
8484
server-username: MAVEN_USERNAME
8585
server-password: MAVEN_PASSWORD
8686
gpg-private-key: ${{ secrets.DATAVERSEBOT_GPG_KEY }}

conf/mdc/counter_weekly.sh

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
#!/bin/sh
2+
#counter_weekly.sh
3+
4+
# This script iterates through all published Datasets in all Dataverses and calls the Make Data Count API to update their citations from DataCite
5+
# Note: Requires curl and jq for parsing JSON responses form curl
6+
7+
# A recursive method to process each Dataverse
8+
processDV () {
9+
echo "Processing Dataverse ID#: $1"
10+
11+
#Call the Dataverse API to get the contents of the Dataverse (without credentials, this will only list published datasets and dataverses
12+
DVCONTENTS=$(curl -s http://localhost:8080/api/dataverses/$1/contents)
13+
14+
# Iterate over all datasets, pulling the value of their DOIs (as part of the persistentUrl) from the json returned
15+
for subds in $(echo "${DVCONTENTS}" | jq -r '.data[] | select(.type == "dataset") | .persistentUrl'); do
16+
17+
#The authority/identifier are preceded by a protocol/host, i.e. https://doi.org/
18+
DOI=`expr "$subds" : '.*:\/\/\doi\.org\/\(.*\)'`
19+
20+
# Call the Dataverse API for this dataset and capture both the response and HTTP status code
21+
HTTP_RESPONSE=$(curl -s -w "\n%{http_code}" -X POST "http://localhost:8080/api/admin/makeDataCount/:persistentId/updateCitationsForDataset?persistentId=doi:$DOI")
22+
23+
# Extract the HTTP status code from the last line
24+
HTTP_STATUS=$(echo "$HTTP_RESPONSE" | tail -n1)
25+
# Extract the response body (everything except the last line)
26+
RESPONSE_BODY=$(echo "$HTTP_RESPONSE" | sed '$d')
27+
28+
# Check the HTTP status code and report accordingly
29+
case $HTTP_STATUS in
30+
200)
31+
# Successfully queued
32+
# Extract status from the nested data object
33+
STATUS=$(echo "$RESPONSE_BODY" | jq -r '.data.status')
34+
35+
# Extract message from the nested data object
36+
if echo "$RESPONSE_BODY" | jq -e '.data.message' > /dev/null 2>&1 && [ "$(echo "$RESPONSE_BODY" | jq -r '.data.message')" != "null" ]; then
37+
MESSAGE=$(echo "$RESPONSE_BODY" | jq -r '.data.message')
38+
echo "[SUCCESS] doi:$DOI - $STATUS: $MESSAGE"
39+
else
40+
# If message is missing or null, just show the status
41+
echo "[SUCCESS] doi:$DOI - $STATUS: Citation update queued"
42+
fi
43+
;;
44+
400)
45+
# Bad request
46+
if echo "$RESPONSE_BODY" | jq -e '.message' > /dev/null 2>&1; then
47+
ERROR=$(echo "$RESPONSE_BODY" | jq -r '.message')
48+
echo "[ERROR 400] doi:$DOI - Bad request: $ERROR"
49+
else
50+
echo "[ERROR 400] doi:$DOI - Bad request"
51+
fi
52+
;;
53+
404)
54+
# Not found
55+
if echo "$RESPONSE_BODY" | jq -e '.message' > /dev/null 2>&1; then
56+
ERROR=$(echo "$RESPONSE_BODY" | jq -r '.message')
57+
echo "[ERROR 404] doi:$DOI - Not found: $ERROR"
58+
else
59+
echo "[ERROR 404] doi:$DOI - Not found"
60+
fi
61+
;;
62+
503)
63+
# Service unavailable (queue full)
64+
if echo "$RESPONSE_BODY" | jq -e '.message' > /dev/null 2>&1; then
65+
ERROR=$(echo "$RESPONSE_BODY" | jq -r '.message')
66+
echo "[ERROR 503] doi:$DOI - Service unavailable: $ERROR"
67+
elif echo "$RESPONSE_BODY" | jq -e '.data.message' > /dev/null 2>&1; then
68+
ERROR=$(echo "$RESPONSE_BODY" | jq -r '.data.message')
69+
echo "[ERROR 503] doi:$DOI - Service unavailable: $ERROR"
70+
else
71+
echo "[ERROR 503] doi:$DOI - Service unavailable: Queue is full"
72+
fi
73+
;;
74+
*)
75+
# Other error
76+
echo "[ERROR $HTTP_STATUS] doi:$DOI - Unexpected error"
77+
echo "Response: $RESPONSE_BODY"
78+
;;
79+
esac
80+
81+
done
82+
83+
# Now iterate over any child Dataverses and recursively process them
84+
for subdv in $(echo "${DVCONTENTS}" | jq -r '.data[] | select(.type == "dataverse") | .id'); do
85+
echo $subdv
86+
processDV $subdv
87+
done
88+
89+
}
90+
91+
# Call the function on the root dataverse to start processing
92+
processDV 1
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Role Assignment History Tracking
2+
3+
Dataverse can now track the history of role assignments, allowing administrators to see who assigned or revoked roles, when these actions occurred, and which roles were involved. This feature helps with auditing and understanding permission changes over time.
4+
5+
## Key components of this feature:
6+
7+
- **Feature Flag**: The functionality can be enabled/disabled via the `ROLE_ASSIGNMENT_HISTORY` feature flag (default is `off`)
8+
- **UI Integration**: New history panels on permission management pages showing the complete history of role assignments/revocations
9+
- **CSV Export**: Administrators can download the role assignment history for a given collection or dataset (or files in a dataset) as a CSV file directly from the new panels
10+
- **API Access**: New API endpoints provide access to role assignment history in both JSON and CSV formats:
11+
- `/api/dataverses/{identifier}/assignments/history`
12+
- `/api/datasets/{identifier}/assignments/history`
13+
- `/api/datasets/{identifier}/files/assignments/history`
14+
15+
All return JSON by default but will return an internationalized CSV if an `Accept: text/csv` header is adde
16+
17+
For more information, see #11612
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
- The optional Croissant exporter has been updated to 0.1.6 to prevent variable names, variable descriptions, and variable types from being exposed for restricted files. See https://github.com/gdcc/exporter-croissant/pull/20 and #11752.
2+
3+
## Upgrade Instructions
4+
5+
### Update Croissant exporter, if enabled, and reexport metadata
6+
7+
If you have enabled the Croissant dataset metadata exporter, you should upgrade to version 0.1.6.
8+
9+
- Stop Payara.
10+
- Delete the old Croissant exporter jar file. It will be located in the directory defined by the `dataverse.spi.exporters.directory` setting.
11+
- Download the updated Croissant jar from https://repo1.maven.org/maven2/io/gdcc/export/croissant/ and place it in the same directory.
12+
- Restart Payara.
13+
- Run reExportAll.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The ExportDataProvider framework in the dataverse-spi package has been extended, adding some extra options for developers of metadata exporter plugins.
2+
See the [documentation](https://guides.dataverse.org/en/latest/developers/metadataexport.html#building-an-exporter) in the Metadata Export guide for details.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## New Endpoint: `/datasets/{id}/access`
2+
3+
A new endpoint has been implemented to manage dataset terms of access for restricted files.
4+
5+
### Functionality
6+
- Updates the terms of access for a dataset by applying it to the draft version.
7+
- If no draft exists, a new one is automatically created.
8+
9+
### Usage
10+
11+
**Custom Terms of Access** – Provide a JSON body with the `customTermsOfAccess` object.
12+
- All fields are optional **except** if there are restricted files in which case `fileAccessRequest` must be set to true or `termsOfAccess` must be provided.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
The /api/admin/makeDataCount/{id}/updateCitationsForDataset endpoint, which allows citations for a dataset to be retrieved from DataCite, is often called periodically for all datasets. However, allowing calls for many datasets to be processed in parallel can cause performance problems in Dataverse and/or cause calls to DataCite to fail due to rate limiting. The existing implementation was also inefficient w.r.t. memory use when used on datasets with many (>~1K) files. This release configures Dataverse to queue calls to this api, processes them serially, adds optional throttling to avoid hitting DataCite rate limits and improves memory use.
2+
3+
New optional MPConfig setting:
4+
5+
dataverse.api.mdc.min-delay-ms - number of milliseconds to wait between calls to DataCite. A value of ~100 should conservatively address DataCite's current 3000/5 minute limit. A value of 250 may be required for their test service.
6+
7+
Backward compatibility: This api call is now asynchronous and will return an OK response when the call is queued or a 503 if the queue is full.

0 commit comments

Comments
 (0)