Skip to content

Commit ded5d12

Browse files
committed
Merge branch 'develop' into 9570-untranslated-error-ingest-message #9570
2 parents 98e5fc4 + d18ee51 commit ded5d12

135 files changed

Lines changed: 14689 additions & 676 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
name: Preview Application Container Image
3+
4+
on:
5+
# We only run the push commands if we are asked to by an issue comment with the correct command.
6+
# This workflow is always taken from the default branch and runs in repo context with access to secrets.
7+
repository_dispatch:
8+
types: [ push-image-command ]
9+
10+
env:
11+
IMAGE_TAG: unstable
12+
BASE_IMAGE_TAG: unstable
13+
PLATFORMS: "linux/amd64,linux/arm64"
14+
15+
jobs:
16+
deploy:
17+
name: "Package & Push"
18+
runs-on: ubuntu-latest
19+
# Only run in upstream repo - avoid unnecessary runs in forks
20+
if: ${{ github.repository_owner == 'IQSS' }}
21+
steps:
22+
# Checkout the pull request code as when merged
23+
- uses: actions/checkout@v3
24+
with:
25+
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
26+
- uses: actions/setup-java@v3
27+
with:
28+
java-version: "11"
29+
distribution: 'adopt'
30+
- uses: actions/cache@v3
31+
with:
32+
path: ~/.m2
33+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
34+
restore-keys: ${{ runner.os }}-m2
35+
36+
# Note: Accessing, pushing tags etc. to GHCR will only succeed in upstream because secrets.
37+
- name: Login to Github Container Registry
38+
uses: docker/login-action@v2
39+
with:
40+
registry: ghcr.io
41+
username: ${{ secrets.GHCR_USERNAME }}
42+
password: ${{ secrets.GHCR_TOKEN }}
43+
44+
- name: Set up QEMU for multi-arch builds
45+
uses: docker/setup-qemu-action@v2
46+
47+
# Get the image tag from either the command or default to branch name (Not used for now)
48+
#- name: Get the target tag name
49+
# id: vars
50+
# run: |
51+
# tag=${{ github.event.client_payload.slash_command.args.named.tag }}
52+
# if [[ -z "$tag" ]]; then tag=$(echo "${{ github.event.client_payload.pull_request.head.ref }}" | tr '\\/_:&+,;#*' '-'); fi
53+
# echo "IMAGE_TAG=$tag" >> $GITHUB_ENV
54+
55+
# Set image tag to branch name of the PR
56+
- name: Set image tag to branch name
57+
run: |
58+
echo "IMAGE_TAG=$(echo "${{ github.event.client_payload.pull_request.head.ref }}" | tr '\\/_:&+,;#*' '-')" >> $GITHUB_ENV
59+
60+
- name: Deploy multi-arch application container image
61+
run: mvn -Pct deploy -Dapp.image.tag=${{ env.IMAGE_TAG }} -Dbase.image.tag=${{ env.BASE_IMAGE_TAG }} -Ddocker.registry=ghcr.io -Ddocker.platforms=${{ env.PLATFORMS }}
62+
63+
- uses: marocchino/sticky-pull-request-comment@v2
64+
with:
65+
header: app-registry-push
66+
hide_and_recreate: true
67+
hide_classify: "OUTDATED"
68+
number: ${{ github.event.client_payload.pull_request.number }}
69+
message: |
70+
:package: Pushed preview application image as
71+
```
72+
ghcr.io/gdcc/dataverse:${{ env.IMAGE_TAG }}
73+
```
74+
:ship: [See on GHCR](https://github.com/orgs/gdcc/packages/container/package/dataverse). Use by referencing with full name as printed above, mind the registry name.
75+
76+
# Leave a note when things have gone sideways
77+
- uses: peter-evans/create-or-update-comment@v3
78+
if: ${{ failure() }}
79+
with:
80+
issue-number: ${{ github.event.client_payload.pull_request.number }}
81+
body: >
82+
:package: Could not push preview image :disappointed:.
83+
See [log](https://github.com/IQSS/dataverse/actions/runs/${{ github.run_id }}) for details.

.github/workflows/container_app_push.yml

Lines changed: 61 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ env:
1818
BASE_IMAGE_TAG: unstable
1919
REGISTRY: "" # Empty means default to Docker Hub
2020
PLATFORMS: "linux/amd64,linux/arm64"
21+
MASTER_BRANCH_TAG: alpha
2122

2223
jobs:
2324
build:
24-
name: Build & deploy
25+
name: "Build & Test"
2526
runs-on: ubuntu-latest
2627
permissions:
2728
contents: read
@@ -49,19 +50,64 @@ jobs:
4950
- name: Build app container image with local architecture
5051
run: mvn -Pct package
5152

52-
# Note: Accessing, pushing tags etc. to DockerHub or GHCR will only succeed in upstream because secrets.
53+
# TODO: add smoke / integration testing here
5354

54-
# Run this when triggered via push or schedule as reused workflow from base / maven unit tests
55-
- if: ${{ github.event_name != 'pull_request' && github.ref_name == 'develop' }}
56-
name: Push description to DockerHub
57-
uses: peter-evans/dockerhub-description@v3
55+
hub-description:
56+
needs: build
57+
name: Push image description to Docker Hub
58+
# Run this when triggered via push or schedule as reused workflow from base / maven unit tests.
59+
# Excluding PRs here means we will have no trouble with secrets access. Also avoid runs in forks.
60+
if: ${{ github.event_name != 'pull_request' && github.ref_name == 'develop' && github.repository_owner == 'IQSS' }}
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v3
64+
- uses: peter-evans/dockerhub-description@v3
5865
with:
5966
username: ${{ secrets.DOCKERHUB_USERNAME }}
6067
password: ${{ secrets.DOCKERHUB_TOKEN }}
6168
repository: gdcc/dataverse
6269
short-description: "Dataverse Application Container Image providing the executable"
6370
readme-filepath: ./src/main/docker/README.md
6471

72+
# Note: Accessing, pushing tags etc. to DockerHub or GHCR will only succeed in upstream because secrets.
73+
# We check for them here and subsequent jobs can rely on this to decide if they shall run.
74+
check-secrets:
75+
needs: build
76+
name: Check for Secrets Availability
77+
runs-on: ubuntu-latest
78+
outputs:
79+
available: ${{ steps.secret-check.outputs.available }}
80+
steps:
81+
- id: secret-check
82+
# perform secret check & put boolean result as an output
83+
shell: bash
84+
run: |
85+
if [ "${{ secrets.DOCKERHUB_TOKEN }}" != '' ]; then
86+
echo "available=true" >> $GITHUB_OUTPUT;
87+
else
88+
echo "available=false" >> $GITHUB_OUTPUT;
89+
fi
90+
91+
deploy:
92+
needs: check-secrets
93+
name: "Package & Publish"
94+
runs-on: ubuntu-latest
95+
# Only run this job if we have access to secrets. This is true for events like push/schedule which run in
96+
# context of main repo, but for PRs only true if coming from the main repo! Forks have no secret access.
97+
if: needs.check-secrets.outputs.available == 'true'
98+
steps:
99+
- uses: actions/checkout@v3
100+
- uses: actions/setup-java@v3
101+
with:
102+
java-version: "11"
103+
distribution: 'adopt'
104+
- uses: actions/cache@v3
105+
with:
106+
path: ~/.m2
107+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
108+
restore-keys: ${{ runner.os }}-m2
109+
110+
# Depending on context, we push to different targets. Login accordingly.
65111
- if: ${{ github.event_name != 'pull_request' }}
66112
name: Log in to Docker Hub registry
67113
uses: docker/login-action@v2
@@ -82,8 +128,8 @@ jobs:
82128
- name: Re-set image tag based on branch (if master)
83129
if: ${{ github.ref_name == 'master' }}
84130
run: |
85-
echo "IMAGE_TAG=alpha" >> $GITHUB_ENV
86-
echo "BASE_IMAGE_TAG=alpha" >> $GITHUB_ENV
131+
echo "IMAGE_TAG=${{ env.MASTER_BRANCH_TAG }}" >> $GITHUB_ENV
132+
echo "BASE_IMAGE_TAG=${{ env.MASTER_BRANCH_TAG }}" >> $GITHUB_ENV
87133
- name: Re-set image tag and container registry when on PR
88134
if: ${{ github.event_name == 'pull_request' }}
89135
run: |
@@ -97,6 +143,11 @@ jobs:
97143
if: ${{ github.event_name == 'pull_request' }}
98144
with:
99145
header: app-registry-push
146+
hide_and_recreate: true
147+
hide_classify: "OUTDATED"
100148
message: |
101-
Pushed preview application image as [`ghcr.io/gdcc/dataverse:${{ env.IMAGE_TAG }}`](https://github.com/orgs/gdcc/packages/container/package/dataverse).
102-
Use it by referencing it with its full name as printed above.
149+
:package: Pushed preview application image as
150+
```
151+
ghcr.io/gdcc/dataverse:${{ env.IMAGE_TAG }}
152+
```
153+
:ship: [See on GHCR](https://github.com/orgs/gdcc/packages/container/package/dataverse). Use by referencing with full name as printed above, mind the registry name.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: PR Comment Commands
2+
on:
3+
issue_comment:
4+
types: [created]
5+
jobs:
6+
dispatch:
7+
# Avoid being triggered by forks in upstream
8+
if: ${{ github.repository_owner == 'IQSS' }}
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Dispatch
12+
uses: peter-evans/slash-command-dispatch@v3
13+
with:
14+
# This token belongs to @dataversebot and has sufficient scope.
15+
token: ${{ secrets.GHCR_TOKEN }}
16+
commands: |
17+
push-image
18+
repository: IQSS/dataverse
19+
# Commenter must have at least write permission to repo to trigger dispatch
20+
permission: write

.readthedocs.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2
2+
3+
# HTML is always built, these are additional formats only
4+
formats:
5+
- pdf
6+
7+
build:
8+
os: ubuntu-22.04
9+
tools:
10+
python: "3.10"
11+
apt_packages:
12+
- graphviz
13+
14+
python:
15+
install:
16+
- requirements: doc/sphinx-guides/requirements.txt
17+
18+
19+
sphinx:
20+
configuration: doc/sphinx-guides/source/conf.py
21+
fail_on_warning: true

conf/keycloak/oidc-keycloak-auth-provider.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"factoryAlias": "oidc",
44
"title": "OIDC-Keycloak",
55
"subtitle": "OIDC-Keycloak",
6-
"factoryData": "type: oidc | issuer: http://localhost:8090/auth/realms/oidc-realm | clientId: oidc-client | clientSecret: ss6gE8mODCDfqesQaSG3gwUwZqZt547E",
6+
"factoryData": "type: oidc | issuer: http://keycloak.mydomain.com:8090/realms/oidc-realm | clientId: oidc-client | clientSecret: ss6gE8mODCDfqesQaSG3gwUwZqZt547E",
77
"enabled": true
88
}

conf/solr/8.11.1/schema.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@
233233
<field name="geolocation" type="location_rpt" multiValued="true" stored="true" indexed="true"/>
234234
<!-- https://solr.apache.org/guide/8_11/spatial-search.html#bboxfield -->
235235
<field name="boundingBox" type="bbox" multiValued="true" stored="true" indexed="true"/>
236+
237+
<!-- incomplete datasets issue 8822 -->
238+
<field name="datasetValid" type="boolean" stored="true" indexed="true" multiValued="false"/>
236239

237240
<!--
238241
METADATA SCHEMA FIELDS
@@ -470,6 +473,8 @@
470473
<!-- <copyField source="*_ss" dest="_text_" maxChars="3000"/> -->
471474
<!-- <copyField source="*_i" dest="_text_" maxChars="3000"/> -->
472475

476+
<copyField source="datasetValid" dest="_text_" maxChars="3000"/>
477+
473478
<!--
474479
METADATA SCHEMA FIELDS
475480
Now following: copyFields to copy the contents of the metadata fields above to a
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### Creating datasets with incomplete metadata through API
2+
3+
The create dataset API call (POST to /api/dataverses/#dataverseId/datasets) is extended with the "doNotValidate" parameter. However, in order to be able to create a dataset with incomplete metadata, the solr configuration must be updated first with the new "schema.xml" file (do not forget to run the metadata fields update script when you use custom metadata). Reindexing is optional, but recommended. Also, even when this feature is not used, it is recommended to update the solar configuration and reindex the metadata. Finally, this new feature can be activated with the "dataverse.api.allow-incomplete-metadata" JVM option.
4+
5+
You can also enable a valid/incomplete metadata filter in the "My Data" page using the "dataverse.ui.show-validity-filter" JVM option. By default, this filter is not shown. When you wish to use this filter, you must reindex the datasets first, otherwise datasets with valid metadata will not be shown in the results.
6+
7+
It is not possible to publish datasets with incomplete or incomplete metadata. By default, you also cannot send such datasets for review. If you wish to enable sending for review of datasets with incomplete metadata, turn on the "dataverse.ui.allow-review-for-incomplete" JVM option.
8+
9+
In order to customize the wording and add translations to the UI sections extended by this feature, you can edit the "Bundle.properties" file and the localized versions of that file. The property keys used by this feature are:
10+
- incomplete
11+
- valid
12+
- dataset.message.incomplete.warning
13+
- mydataFragment.validity
14+
- dataverses.api.create.dataset.error.mustIncludeAuthorName
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Changes made in v5.13 and v5.14 in multiple PRs to improve the embedded Schema.org metadata in dataset pages will only be propagated to the Schema.Org JSON-LD metadata export if a reExportAll() is done.
2+
3+
The 5.14 release notes should include the standard instructions for doing a reExportAll after updating the code.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# License management via API
2+
3+
See https://github.com/IQSS/dataverse/issues/9148.
4+
5+
When publishing a dataset via API, it now requires the dataset to either have a standard license configured, or have valid Custom Terms of Use (if allowed by the instance). Attempting to publish a dataset without such **will fail with an error message**. This introduces a backward incompatibility, and if you have scripts that automatically create, update and publish datasets, this last step may start failing. Because, unfortunately, there were some problems with the datasets APIs that made it difficult to manage licenses, so an API user was likely to end up with a dataset missing either of the above. In this release we have addressed it by making the following fixes:
6+
7+
We fixed the incompatibility between the format in which license information was *exported* in json, and the format the create and update APIs were expecting it for *import* (https://github.com/IQSS/dataverse/issues/9155). This means that the following json format can now be imported:
8+
```
9+
"license": {
10+
"name": "CC0 1.0",
11+
"uri": "http://creativecommons.org/publicdomain/zero/1.0"
12+
}
13+
```
14+
However, for the sake of backward compatibility the old format
15+
```
16+
"license" : "CC0 1.0"
17+
```
18+
will be accepted as well.
19+
20+
We have added the default license (CC0) to the model json file that we provide and recommend to use as the model in the Native API Guide (https://github.com/IQSS/dataverse/issues/9364).
21+
22+
And we have corrected the misleading language in the same guide where we used to recommend to users that they select, edit and re-import only the `.metadataBlocks` fragment of the json metadata representing the latest version. There are in fact other useful pieces of information that need to be preserved in the update (such as the `"license"` section above). So the recommended way of creating base json for updates via the API is to select *everything but* the `"files"` section, with (for example) the following `jq` command:
23+
24+
```
25+
jq '.data | del(.files)'
26+
```
27+
28+
Please see the [Update Metadata For a Dataset](https://guides.dataverse.org/en/latest/api/native-api.html#update-metadata-for-a-dataset) section of our Native Api guide for more information.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Contact Email Improvements
2+
3+
Email sent from the contact forms to the contact(s) for a collection, dataset, or datafile can now optionally be cc'd to a support email address. The support email address can be changed from the default :SystemEmail address to a separate :SupportEmail address. When multiple contacts are listed, the system will now send one email to all contacts (with the optional cc if configured) instead of separate emails to each contact. Contact names with a comma that refer to Organizations will no longer have the name parts reversed in the email greeting. A new protected feedback API has been added.
4+
5+
## Backward Incompatibilities
6+
7+
When there are multiple contacts, the system will now send one email with all of the contacts in the To: header instead of sending one email to each contact (with no indication that others have been notified).
8+
9+
## New JVM/MicroProfile Settings
10+
11+
dataverse.mail.support-email - allows a separate email, distinct from the :SystemEmail to be used as the to address in emails from the contact form/ feedback api.
12+
dataverse.mail.cc-support-on-contact-emails - include the support email address as a CC: entry when contact/feedback emails are sent to the contacts for a collection, dataset, or datafile.

0 commit comments

Comments
 (0)