Skip to content

Commit e2021d3

Browse files
authored
Merge pull request #12056 from IQSS/develop
merge develop into master for 6.9 release
2 parents d63a7b1 + 5ad50ac commit e2021d3

File tree

295 files changed

+16331
-2745
lines changed

Some content is hidden

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

295 files changed

+16331
-2745
lines changed

.github/actions/setup-maven/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ runs:
2323
echo "JAVA_VERSION=$(grep '<target.java.version>' ${GITHUB_WORKSPACE}/modules/dataverse-parent/pom.xml | cut -f2 -d'>' | cut -f1 -d'<')" | tee -a ${GITHUB_ENV}
2424
- name: Set up JDK ${{ env.JAVA_VERSION }}
2525
id: setup-java
26-
uses: actions/setup-java@v4
26+
uses: actions/setup-java@v5
2727
with:
2828
java-version: ${{ env.JAVA_VERSION }}
2929
distribution: 'temurin'

.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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/checkout@v5
2424
with:
2525
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
26-
- uses: actions/setup-java@v4
26+
- uses: actions/setup-java@v5
2727
with:
2828
java-version: "17"
2929
distribution: 'adopt'
@@ -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/deploy_beta_testing.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v5
1818

19-
- uses: actions/setup-java@v4
19+
- uses: actions/setup-java@v5
2020
with:
2121
distribution: 'zulu'
2222
java-version: '17'
@@ -36,7 +36,7 @@ jobs:
3636
run: echo "war_file=$(ls *.war | head -1)">> $GITHUB_ENV
3737

3838
- name: Upload war artifact
39-
uses: actions/upload-artifact@v4
39+
uses: actions/upload-artifact@v5
4040
with:
4141
name: built-app
4242
path: ./target/${{ env.war_file }}
@@ -50,7 +50,7 @@ jobs:
5050
- uses: actions/checkout@v5
5151

5252
- name: Download war artifact
53-
uses: actions/download-artifact@v5
53+
uses: actions/download-artifact@v6
5454
with:
5555
name: built-app
5656
path: ./
@@ -69,7 +69,7 @@ jobs:
6969
overwrite: true
7070

7171
- name: Execute payara war deployment remotely
72-
uses: appleboy/[email protected].2
72+
uses: appleboy/[email protected].3
7373
env:
7474
INPUT_WAR_FILE: ${{ env.war_file }}
7575
with:

.github/workflows/maven_cache_management.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Determine Java version from Parent POM
3737
run: echo "JAVA_VERSION=$(grep '<target.java.version>' modules/dataverse-parent/pom.xml | cut -f2 -d'>' | cut -f1 -d'<')" >> ${GITHUB_ENV}
3838
- name: Set up JDK ${{ env.JAVA_VERSION }}
39-
uses: actions/setup-java@v4
39+
uses: actions/setup-java@v5
4040
with:
4141
java-version: ${{ env.JAVA_VERSION }}
4242
distribution: temurin

.github/workflows/maven_unit_test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
# Basic setup chores
4040
- uses: actions/checkout@v5
4141
- name: Set up JDK ${{ matrix.jdk }}
42-
uses: actions/setup-java@v4
42+
uses: actions/setup-java@v5
4343
with:
4444
java-version: ${{ matrix.jdk }}
4545
distribution: temurin
@@ -62,7 +62,7 @@ jobs:
6262

6363
# Upload the built war file. For download, it will be wrapped in a ZIP by GitHub.
6464
# See also https://github.com/actions/upload-artifact#zipped-artifact-downloads
65-
- uses: actions/upload-artifact@v4
65+
- uses: actions/upload-artifact@v5
6666
with:
6767
name: dataverse-java${{ matrix.jdk }}.war
6868
path: target/dataverse*.war
@@ -72,7 +72,7 @@ jobs:
7272
- run: |
7373
tar -cvf java-builddir.tar target
7474
tar -cvf java-m2-selection.tar ~/.m2/repository/io/gdcc/dataverse-*
75-
- uses: actions/upload-artifact@v4
75+
- uses: actions/upload-artifact@v5
7676
with:
7777
name: java-artifacts
7878
path: |
@@ -105,14 +105,14 @@ jobs:
105105
# Basic setup chores
106106
- uses: actions/checkout@v5
107107
- name: Set up JDK ${{ matrix.jdk }}
108-
uses: actions/setup-java@v4
108+
uses: actions/setup-java@v5
109109
with:
110110
java-version: ${{ matrix.jdk }}
111111
distribution: temurin
112112
cache: maven
113113

114114
# Get the build output from the unit test job
115-
- uses: actions/download-artifact@v5
115+
- uses: actions/download-artifact@v6
116116
with:
117117
name: java-artifacts
118118
- run: |
@@ -124,7 +124,7 @@ jobs:
124124

125125
# Wrap up and send to coverage job
126126
- run: tar -cvf java-reportdir.tar target/site
127-
- uses: actions/upload-artifact@v4
127+
- uses: actions/upload-artifact@v5
128128
with:
129129
name: java-reportdir
130130
path: java-reportdir.tar
@@ -138,14 +138,14 @@ jobs:
138138
# TODO: As part of #10618 change to setup-maven custom action
139139
# Basic setup chores
140140
- uses: actions/checkout@v5
141-
- uses: actions/setup-java@v4
141+
- uses: actions/setup-java@v5
142142
with:
143143
java-version: '17'
144144
distribution: temurin
145145
cache: maven
146146

147147
# Get the build output from the integration test job
148-
- uses: actions/download-artifact@v5
148+
- uses: actions/download-artifact@v6
149149
with:
150150
name: java-reportdir
151151
- run: tar -xvf java-reportdir.tar

.github/workflows/spi_release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838
if: github.event_name == 'pull_request' && needs.check-secrets.outputs.available == 'true'
3939
steps:
4040
- uses: actions/checkout@v5
41-
- uses: actions/setup-java@v4
41+
- uses: actions/setup-java@v5
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
@@ -64,7 +64,7 @@ jobs:
6464
if: github.event_name == 'push' && needs.check-secrets.outputs.available == 'true'
6565
steps:
6666
- uses: actions/checkout@v5
67-
- uses: actions/setup-java@v4
67+
- uses: actions/setup-java@v5
6868
with:
6969
java-version: '17'
7070
distribution: 'adopt'
@@ -76,11 +76,11 @@ jobs:
7676

7777
# Running setup-java again overwrites the settings.xml - IT'S MANDATORY TO DO THIS SECOND SETUP!!!
7878
- name: Set up Maven Central Repository
79-
uses: actions/setup-java@v4
79+
uses: actions/setup-java@v5
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/keycloak/builtin-users-spi/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
</build>
101101

102102
<properties>
103-
<keycloak.version>26.3.2</keycloak.version>
103+
<keycloak.version>26.3.4</keycloak.version>
104104
<java.version>17</java.version>
105105
<jakarta.persistence.version>3.2.0</jakarta.persistence.version>
106106
<mindrot.jbcrypt.version>0.4</mindrot.jbcrypt.version>

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

0 commit comments

Comments
 (0)