Skip to content

Commit 11e14fc

Browse files
committed
Merge branch 'develop' into codeql #9252
2 parents 84c370b + 6bf262f commit 11e14fc

File tree

741 files changed

+70589
-11468
lines changed

Some content is hidden

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

741 files changed

+70589
-11468
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
APP_IMAGE=gdcc/dataverse:unstable
2-
POSTGRES_VERSION=16
2+
POSTGRES_VERSION=17
33
DATAVERSE_DB_USER=dataverse
4-
SOLR_VERSION=9.3.0
4+
SOLR_VERSION=9.8.0
55
SKIP_DEPLOY=0

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Thank you for contributing to the Dataverse Project through the creation of a bu
1414
WARNING: If this is a security issue it should be reported privately to [email protected]
1515
1616
More information on bug issues and contributions can be found in the "Contributing to Dataverse" page:
17-
https://github.com/IQSS/dataverse/blob/develop/CONTRIBUTING.md#bug-reportsissues
17+
https://guides.dataverse.org/en/latest/contributor/index.html
1818
1919
Please fill out as much of the template as you can.
2020
Start below this comment section.
@@ -44,7 +44,6 @@ Start below this comment section.
4444
**Any related open or closed issues to this bug report?**
4545

4646

47-
4847
**Screenshots:**
4948

5049
No matter the issue, screenshots are always welcome.
@@ -53,3 +52,7 @@ To add a screenshot, please use one of the following formats and/or methods desc
5352

5453
* https://help.github.com/en/articles/file-attachments-on-issues-and-pull-requests
5554
*
55+
56+
57+
**Are you thinking about creating a pull request for this issue?**
58+
Help is always welcome, is this bug something you or your organization plan to fix?

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Feature request
33
about: Suggest an idea or new feature for the Dataverse software!
4-
title: 'Feature Request/Idea:'
4+
title: 'Feature Request:'
55
labels: 'Type: Feature'
66
assignees: ''
77

@@ -11,7 +11,7 @@ assignees: ''
1111
Thank you for contributing to the Dataverse Project through the creation of a feature request!
1212
1313
More information on ideas/feature requests and contributions can be found in the "Contributing to Dataverse" page:
14-
https://github.com/IQSS/dataverse/blob/develop/CONTRIBUTING.md#ideasfeature-requests
14+
https://guides.dataverse.org/en/latest/contributor/index.html
1515
1616
Please fill out as much of the template as you can.
1717
Start below this comment section.
@@ -34,3 +34,6 @@ Start below this comment section.
3434

3535

3636
**Any open or closed issues related to this feature request?**
37+
38+
**Are you thinking about creating a pull request for this feature?**
39+
Help is always welcome, is this feature something you or your organization plan to implement?
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Idea proposal
3+
about: Propose a new idea for discussion to improve the Dataverse software!
4+
title: 'Suggestion:'
5+
labels: 'Type: Suggestion'
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
Thank you for contributing to the Dataverse Project through the creation of a feature request!
12+
13+
More information on ideas/feature requests and contributions can be found in the "Contributing to Dataverse" page:
14+
https://guides.dataverse.org/en/latest/contributor/index.html
15+
16+
Please fill out as much of the template as you can.
17+
Start below this comment section.
18+
-->
19+
20+
**Overview of the Suggestion**
21+
22+
23+
**What kind of user is the suggestion intended for?**
24+
(Example users roles: API User, Curator, Depositor, Guest, Superuser, Sysadmin)
25+
26+
27+
**What inspired this idea?**
28+
29+
30+
**What existing behavior do you want changed?**
31+
32+
33+
**Any brand new behavior do you want to add to Dataverse?**
34+
35+
36+
**Any open or closed issues related to this suggestion?**
37+
38+
39+
**Are you thinking about creating a pull request for this issue?**
40+
Help is always welcome, is this idea something you or your organization plan to implement?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Which issue(s) this PR closes**:
44

5-
Closes #
5+
- Closes #
66

77
**Special notes for your reviewer**:
88

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: "Setup Maven and Caches"
3+
description: "Determine Java version and setup Maven, including necessary caches."
4+
inputs:
5+
git-reference:
6+
description: 'The git reference (branch/tag) to check out'
7+
required: false
8+
default: '${{ github.ref }}'
9+
pom-paths:
10+
description: "List of paths to Maven POM(s) for cache dependency setup"
11+
required: false
12+
default: 'pom.xml'
13+
runs:
14+
using: composite
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
ref: ${{ inputs.git-reference }}
20+
- name: Determine Java version by reading the Maven property
21+
shell: bash
22+
run: |
23+
echo "JAVA_VERSION=$(grep '<target.java.version>' ${GITHUB_WORKSPACE}/modules/dataverse-parent/pom.xml | cut -f2 -d'>' | cut -f1 -d'<')" | tee -a ${GITHUB_ENV}
24+
- name: Set up JDK ${{ env.JAVA_VERSION }}
25+
id: setup-java
26+
uses: actions/setup-java@v4
27+
with:
28+
java-version: ${{ env.JAVA_VERSION }}
29+
distribution: 'temurin'
30+
cache: 'maven'
31+
cache-dependency-path: ${{ inputs.pom-paths }}
32+
- name: Download common cache on branch cache miss
33+
if: ${{ steps.setup-java.outputs.cache-hit != 'true' }}
34+
uses: actions/cache/restore@v4
35+
with:
36+
key: dataverse-maven-cache
37+
path: ~/.m2/repository

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Set update schedule for GitHub Actions
2+
# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot
3+
4+
version: 2
5+
updates:
6+
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
# Check for updates to GitHub Actions daily
11+
interval: "daily"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Properties Check"
2+
on:
3+
pull_request:
4+
paths:
5+
- "src/**/*.properties"
6+
- "scripts/api/data/metadatablocks/*"
7+
jobs:
8+
duplicate_keys:
9+
name: Duplicate Keys
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Run duplicates detection script
14+
shell: bash
15+
run: tests/check_duplicate_properties.sh
16+
17+
metadata_blocks_properties:
18+
name: Metadata Blocks Properties
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Setup GraalVM + Native Image
23+
uses: graalvm/setup-graalvm@v1
24+
with:
25+
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
java-version: '21'
27+
distribution: 'graalvm-community'
28+
- name: Setup JBang
29+
uses: jbangdev/setup-jbang@main
30+
- name: Run metadata block properties verification script
31+
shell: bash
32+
run: tests/verify_mdb_properties.sh

.github/workflows/container_app_pr.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,29 @@ jobs:
2020
if: ${{ github.repository_owner == 'IQSS' }}
2121
steps:
2222
# Checkout the pull request code as when merged
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
with:
2525
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
26-
- uses: actions/setup-java@v3
26+
- uses: actions/setup-java@v4
2727
with:
2828
java-version: "17"
2929
distribution: 'adopt'
30-
- uses: actions/cache@v3
30+
- uses: actions/cache@v4
3131
with:
3232
path: ~/.m2
3333
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3434
restore-keys: ${{ runner.os }}-m2
3535

3636
# Note: Accessing, pushing tags etc. to GHCR will only succeed in upstream because secrets.
3737
- name: Login to Github Container Registry
38-
uses: docker/login-action@v2
38+
uses: docker/login-action@v3
3939
with:
4040
registry: ghcr.io
4141
username: ${{ secrets.GHCR_USERNAME }}
4242
password: ${{ secrets.GHCR_TOKEN }}
4343

4444
- name: Set up QEMU for multi-arch builds
45-
uses: docker/setup-qemu-action@v2
45+
uses: docker/setup-qemu-action@v3
4646

4747
# Get the image tag from either the command or default to branch name (Not used for now)
4848
#- name: Get the target tag name
@@ -87,7 +87,7 @@ jobs:
8787
:ship: [See on GHCR](https://github.com/orgs/gdcc/packages/container). Use by referencing with full name as printed above, mind the registry name.
8888
8989
# Leave a note when things have gone sideways
90-
- uses: peter-evans/create-or-update-comment@v3
90+
- uses: peter-evans/create-or-update-comment@v4
9191
if: ${{ failure() }}
9292
with:
9393
issue-number: ${{ github.event.client_payload.pull_request.number }}

.github/workflows/container_app_push.yml

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ on:
55
# We are deliberately *not* running on push events here to avoid double runs.
66
# Instead, push events will trigger from the base image and maven unit tests via workflow_call.
77
workflow_call:
8+
inputs:
9+
base-image-ref:
10+
type: string
11+
description: "Reference of the base image to build on in full qualified form [<registry>/]<namespace>/<repo>:<tag>"
12+
required: false
13+
default: "gdcc/base:unstable"
814
pull_request:
915
branches:
1016
- develop
@@ -16,7 +22,6 @@ on:
1622

1723
env:
1824
IMAGE_TAG: unstable
19-
BASE_IMAGE_TAG: unstable
2025
REGISTRY: "" # Empty means default to Docker Hub
2126
PLATFORMS: "linux/amd64,linux/arm64"
2227
MASTER_BRANCH_TAG: alpha
@@ -33,20 +38,24 @@ jobs:
3338
if: ${{ github.repository_owner == 'IQSS' }}
3439

3540
steps:
36-
- name: Checkout repository
37-
uses: actions/checkout@v3
38-
39-
- name: Set up JDK
40-
uses: actions/setup-java@v3
41+
- name: Checkout and Setup Maven
42+
uses: IQSS/dataverse/.github/actions/setup-maven@develop
4143
with:
42-
java-version: "17"
43-
distribution: temurin
44-
cache: maven
44+
pom-paths: |
45+
pom.xml
46+
modules/container-configbaker/pom.xml
47+
modules/dataverse-parent/pom.xml
48+
49+
# TODO: Add a filter step here, that avoids building the image if this is a PR and there are other files touched than declared above.
50+
# Use https://github.com/dorny/paths-filter to solve this. This will ensure we do not run this twice if this workflow
51+
# will be triggered by the other workflows already (base image or java changes)
52+
# To become a part of #10618.
4553

4654
- name: Build app and configbaker container image with local architecture and submodules (profile will skip tests)
4755
run: >
4856
mvn -B -f modules/dataverse-parent
4957
-P ct -pl edu.harvard.iq:dataverse -am
58+
$( [[ -n "${{ inputs.base-image-ref }}" ]] && echo "-Dbase.image=${{ inputs.base-image-ref }}" )
5059
install
5160
5261
# TODO: add smoke / integration testing here (add "-Pct -DskipIntegrationTests=false")
@@ -59,15 +68,15 @@ jobs:
5968
if: ${{ github.event_name != 'pull_request' && github.ref_name == 'develop' && github.repository_owner == 'IQSS' }}
6069
runs-on: ubuntu-latest
6170
steps:
62-
- uses: actions/checkout@v3
63-
- uses: peter-evans/dockerhub-description@v3
71+
- uses: actions/checkout@v4
72+
- uses: peter-evans/dockerhub-description@v4
6473
with:
6574
username: ${{ secrets.DOCKERHUB_USERNAME }}
6675
password: ${{ secrets.DOCKERHUB_TOKEN }}
6776
repository: gdcc/dataverse
6877
short-description: "Dataverse Application Container Image providing the executable"
6978
readme-filepath: ./src/main/docker/README.md
70-
- uses: peter-evans/dockerhub-description@v3
79+
- uses: peter-evans/dockerhub-description@v4
7180
with:
7281
username: ${{ secrets.DOCKERHUB_USERNAME }}
7382
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -106,29 +115,31 @@ jobs:
106115
if: needs.check-secrets.outputs.available == 'true' &&
107116
( github.event_name != 'push' || ( github.event_name == 'push' && contains(fromJSON('["develop", "master"]'), github.ref_name)))
108117
steps:
109-
- uses: actions/checkout@v3
110-
- uses: actions/setup-java@v3
118+
- name: Checkout and Setup Maven
119+
uses: IQSS/dataverse/.github/actions/setup-maven@develop
111120
with:
112-
java-version: "17"
113-
distribution: temurin
121+
pom-paths: |
122+
pom.xml
123+
modules/container-configbaker/pom.xml
124+
modules/dataverse-parent/pom.xml
114125
115126
# Depending on context, we push to different targets. Login accordingly.
116127
- if: github.event_name != 'pull_request'
117128
name: Log in to Docker Hub registry
118-
uses: docker/login-action@v2
129+
uses: docker/login-action@v3
119130
with:
120131
username: ${{ secrets.DOCKERHUB_USERNAME }}
121132
password: ${{ secrets.DOCKERHUB_TOKEN }}
122133
- if: ${{ github.event_name == 'pull_request' }}
123134
name: Login to Github Container Registry
124-
uses: docker/login-action@v2
135+
uses: docker/login-action@v3
125136
with:
126137
registry: ghcr.io
127138
username: ${{ secrets.GHCR_USERNAME }}
128139
password: ${{ secrets.GHCR_TOKEN }}
129140

130141
- name: Set up QEMU for multi-arch builds
131-
uses: docker/setup-qemu-action@v2
142+
uses: docker/setup-qemu-action@v3
132143

133144
- name: Re-set image tag based on branch (if master)
134145
if: ${{ github.ref_name == 'master' }}
@@ -146,11 +157,13 @@ jobs:
146157
run: >
147158
mvn -B -f modules/dataverse-parent
148159
-P ct -pl edu.harvard.iq:dataverse -am
160+
$( [[ -n "${{ inputs.base-image-ref }}" ]] && echo "-Dbase.image=${{ inputs.base-image-ref }}" )
149161
install
150162
- name: Deploy multi-arch application and configbaker container image
151163
run: >
152164
mvn
153-
-Dapp.image.tag=${{ env.IMAGE_TAG }} -Dbase.image.tag=${{ env.BASE_IMAGE_TAG }}
165+
-Dapp.image.tag=${{ env.IMAGE_TAG }}
166+
$( [[ -n "${{ inputs.base-image-ref }}" ]] && echo "-Dbase.image=${{ inputs.base-image-ref }}" )
154167
${{ env.REGISTRY }} -Ddocker.platforms=${{ env.PLATFORMS }}
155168
-P ct deploy
156169

0 commit comments

Comments
 (0)