Skip to content

Commit c7dfbb3

Browse files
committed
Merge branch 'develop' into 11198-list-file-versions-api
2 parents 2b7483f + 1a4a43c commit c7dfbb3

39 files changed

+808
-252
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Globus framework improvements
2+
3+
The improvements and optimizations in this release build on top of the earlier work (such as PR #10781). They are based on the experience gained at IQSS as part of the production rollout of the Large Data Storage services that utilizes Globus.
4+
5+
The changes in this PR (#11125) focus on improving Globus *downloads* (i.e., transfers from Dataverse-linked Globus volumes to users' Globus collections). Most importantly, th mechanism of "Asynchronous Task Monitoring", first introduced in #10781 for *uploads*, has been extended to handle downloads as well. This generally makes downloads more reliable (specifically, in how Dataverse manages temporary access rules granted to users, minimizing the risk of consequent downloads failing because of stale access rules left in place).
6+
7+
See `globus-use-experimental-async-framework` under [Feature Flags](https://guides.dataverse.org/en/latest/installation/config.html#feature-flags) and [dataverse.files.globus-monitoring-server](https://guides.dataverse.org/en/latest/installation/config.html#dataverse-files-globus-monitoring-server) in the Installation Guide.
8+
9+
Multiple other improvements have been made making the underlying Globus framework more reliable and robust.
10+
11+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
- Payara application server has been upgraded to version 6.2025.2. See #11126 and #11128.
2+
3+
## Installation
4+
5+
The following assumes the standard instructions to `export PAYARA=/usr/local/payara6`, undeploy v6.5, stop payara have been done already.
6+
7+
### Upgrade to Payara 6.2025.2
8+
9+
The steps below reuse your existing domain directory with the new distribution. You may also want to review the Payara upgrade instructions as it could be helpful during any troubleshooting:
10+
[Payara Release Notes](https://docs.payara.fish/community/docs/6.2025.2/Release%20Notes/Release%20Notes%206.2025.2.html).
11+
We also recommend you ensure you followed all update instructions from the past releases regarding Payara.
12+
(The most recent Payara update was for [v6.3](https://github.com/IQSS/dataverse/releases/tag/v6.3).)
13+
14+
Move the current Payara directory out of the way:
15+
16+
```shell
17+
mv $PAYARA $PAYARA.6.2024.6
18+
```
19+
20+
Download the new Payara version 6.2025.2 (from https://www.payara.fish/downloads/payara-platform-community-edition/ or https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2025.2/payara-6.2025.2.zip), and unzip it in its place:
21+
22+
```shell
23+
cd /usr/local
24+
unzip payara-6.2025.2.zip
25+
```
26+
27+
Replace the brand new `payara/glassfish/domains/domain1` with your old, preserved domain1:
28+
29+
```shell
30+
mv payara6/glassfish/domains/domain1 payara6/glassfish/domains/domain1_DIST
31+
mv payara6.6.2024.6/glassfish/domains/domain1 payara6/glassfish/domains/
32+
```
33+
34+
Deploy/install as normal
35+

doc/sphinx-guides/source/developers/classic-dev-env.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ On Linux, install ``jq`` from your package manager or download a binary from htt
9393
Install Payara
9494
~~~~~~~~~~~~~~
9595

96-
Payara 6.2024.6 or higher is required.
96+
Payara 6.2025.2 or higher is required.
9797

9898
To install Payara, run the following commands:
9999

100100
``cd /usr/local``
101101

102-
``sudo curl -O -L https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.6/payara-6.2024.6.zip``
102+
``sudo curl -O -L https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2025.2/payara-6.2025.2.zip``
103103

104-
``sudo unzip payara-6.2024.6.zip``
104+
``sudo unzip payara-6.2025.2.zip``
105105

106106
``sudo chown -R $USER /usr/local/payara6``
107107

doc/sphinx-guides/source/developers/tips.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,3 +296,14 @@ with the following code in ``SettingsWrapper.java``:
296296
A more serious example would be direct calls to PermissionServiceBean methods used in render logic expressions. This is something that has happened and caused some problems in real life. A simple permission service lookup (for example, whether a user is authorized to create a dataset in the current dataverse) can easily take 15 database queries. Repeated multiple times, this can quickly become a measurable delay in rendering the page. PermissionsWrapper must be used exclusively for any such lookups from JSF pages.
297297

298298
See also :doc:`performance`.
299+
300+
JSF1103 Errors
301+
~~~~~~~~~~~~~~
302+
303+
Errors of the form ``JSF1103: The metadata facet must be a direct child of the view in viewId /dataverse.xhtml`` come from use of the f:metadata tag at the wrong depth in the .xhtml.
304+
305+
Most/all known instances of the problem were corrected in https://github.com/IQSS/dataverse/pull/11128.
306+
307+
Any page that used <ui:composition template="/dataverse_template.xhtml"> was including the f:metadata farther down in the tree rather than as a direct child of the view.
308+
As of Payara 6.2025.2, it is not clear that this error was resulting in changes to UI behavior, but the error messages were in the log.
309+
If you see these errors, this note and the examples in the PR will hopefully provide some insight as to how to fix them.

doc/sphinx-guides/source/installation/config.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3501,7 +3501,7 @@ please find all known feature flags below. Any of these flags can be activated u
35013501
- Turns off automatic selection of a dataset thumbnail from image files in that dataset. When set to ``On``, a user can still manually pick a thumbnail image or upload a dedicated thumbnail image.
35023502
- ``Off``
35033503
* - globus-use-experimental-async-framework
3504-
- Activates a new experimental implementation of Globus polling of ongoing remote data transfers that does not rely on the instance staying up continuously for the duration of the transfers and saves the state information about Globus upload requests in the database. Added in v6.4. Affects :ref:`:GlobusPollingInterval`. Note that the JVM option :ref:`dataverse.files.globus-monitoring-server` described above must also be enabled on one (and only one, in a multi-node installation) Dataverse instance.
3504+
- Activates a new experimental implementation of Globus polling of ongoing remote data transfers that does not rely on the instance staying up continuously for the duration of the transfers and saves the state information about Globus upload requests in the database. Added in v6.4; extended in v6.6 to cover download transfers, in addition to uploads. Affects :ref:`:GlobusPollingInterval`. Note that the JVM option :ref:`dataverse.files.globus-monitoring-server` described above must also be enabled on one (and only one, in a multi-node installation) Dataverse instance.
35053505
- ``Off``
35063506
* - index-harvested-metadata-source
35073507
- Index the nickname or the source name (See the optional ``sourceName`` field in :ref:`create-a-harvesting-client`) of the harvesting client as the "metadata source" of harvested datasets and files. If enabled, the Metadata Source facet will show separate groupings of the content harvested from different sources (by harvesting client nickname or source name) instead of the default behavior where there is one "Harvested" grouping for all harvested content.

doc/sphinx-guides/source/installation/prerequisites.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ On RHEL/derivative you can make Java 17 the default with the ``alternatives`` co
4444
Payara
4545
------
4646

47-
Payara 6.2024.6 is recommended. Newer versions might work fine. Regular updates are recommended.
47+
Payara 6.2025.2 is recommended. Newer versions might work fine. Regular updates are recommended.
4848

4949
Installing Payara
5050
=================
@@ -55,8 +55,8 @@ Installing Payara
5555

5656
- Download and install Payara (installed in ``/usr/local/payara6`` in the example commands below)::
5757

58-
# wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.6/payara-6.2024.6.zip
59-
# unzip payara-6.2024.6.zip
58+
# wget https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2025.2/payara-6.2025.2.zip
59+
# unzip payara-6.2025.2.zip
6060
# mv payara6 /usr/local
6161

6262
If nexus.payara.fish is ever down for maintenance, Payara distributions are also available from https://repo1.maven.org/maven2/fish/payara/distributions/payara/

doc/sphinx-guides/source/qa/test-automation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Go to the end of the log and then scroll up, looking for the failure. A failed A
5252

5353
```
5454
TASK [dataverse : download payara zip] *****************************************
55-
fatal: [localhost]: FAILED! => {"changed": false, "dest": "/tmp/payara.zip", "elapsed": 10, "msg": "Request failed: <urlopen error timed out>", "url": "https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2024.6/payara-6.2024.6.zip"}
55+
fatal: [localhost]: FAILED! => {"changed": false, "dest": "/tmp/payara.zip", "elapsed": 10, "msg": "Request failed: <urlopen error timed out>", "url": "https://nexus.payara.fish/repository/payara-community/fish/payara/distributions/payara/6.2025.2/payara-6.2025.2.zip"}
5656
```
5757

5858
In the example above, if Payara can't be downloaded, we're obviously going to have problems deploying Dataverse to it!

modules/dataverse-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
<argLine>-Duser.timezone=${project.timezone} -Dfile.encoding=${project.build.sourceEncoding} -Duser.language=${project.language} -Duser.region=${project.region}</argLine>
149149

150150
<!-- Major system components and dependencies -->
151-
<payara.version>6.2024.6</payara.version>
151+
<payara.version>6.2025.2</payara.version>
152152
<postgresql.version>42.7.4</postgresql.version>
153153
<solr.version>9.8.0</solr.version>
154154
<aws.version>1.12.748</aws.version>

src/main/java/edu/harvard/iq/dataverse/DatasetPage.java

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5867,13 +5867,12 @@ public List<DatasetField> getDatasetSummaryFields() {
58675867
return DatasetUtil.getDatasetSummaryFields(workingVersion, customFields);
58685868
}
58695869

5870-
public boolean isShowPreviewButton(Long fileId) {
5871-
List<ExternalTool> previewTools = getPreviewToolsForDataFile(fileId);
5870+
public boolean isShowPreviewButton(DataFile dataFile) {
5871+
List<ExternalTool> previewTools = getPreviewToolsForDataFile(dataFile);
58725872
return previewTools.size() > 0;
58735873
}
58745874

5875-
public boolean isShowQueryButton(Long fileId) {
5876-
DataFile dataFile = datafileService.find(fileId);
5875+
public boolean isShowQueryButton(DataFile dataFile) {
58775876

58785877
if(dataFile.isRestricted()
58795878
|| !dataFile.isReleased()
@@ -5882,26 +5881,28 @@ public boolean isShowQueryButton(Long fileId) {
58825881
return false;
58835882
}
58845883

5885-
List<ExternalTool> fileQueryTools = getQueryToolsForDataFile(fileId);
5884+
List<ExternalTool> fileQueryTools = getQueryToolsForDataFile(dataFile);
58865885
return fileQueryTools.size() > 0;
58875886
}
58885887

5889-
public List<ExternalTool> getPreviewToolsForDataFile(Long fileId) {
5890-
return getCachedToolsForDataFile(fileId, ExternalTool.Type.PREVIEW);
5888+
public List<ExternalTool> getPreviewToolsForDataFile(DataFile dataFile) {
5889+
return getCachedToolsForDataFile(dataFile, ExternalTool.Type.PREVIEW);
58915890
}
58925891

5893-
public List<ExternalTool> getQueryToolsForDataFile(Long fileId) {
5894-
return getCachedToolsForDataFile(fileId, ExternalTool.Type.QUERY);
5892+
public List<ExternalTool> getQueryToolsForDataFile(DataFile dataFile) {
5893+
return getCachedToolsForDataFile(dataFile, ExternalTool.Type.QUERY);
58955894
}
5896-
public List<ExternalTool> getConfigureToolsForDataFile(Long fileId) {
5897-
return getCachedToolsForDataFile(fileId, ExternalTool.Type.CONFIGURE);
5895+
5896+
public List<ExternalTool> getConfigureToolsForDataFile(DataFile dataFile) {
5897+
return getCachedToolsForDataFile(dataFile, ExternalTool.Type.CONFIGURE);
58985898
}
58995899

5900-
public List<ExternalTool> getExploreToolsForDataFile(Long fileId) {
5901-
return getCachedToolsForDataFile(fileId, ExternalTool.Type.EXPLORE);
5900+
public List<ExternalTool> getExploreToolsForDataFile(DataFile dataFile) {
5901+
return getCachedToolsForDataFile(dataFile, ExternalTool.Type.EXPLORE);
59025902
}
59035903

5904-
public List<ExternalTool> getCachedToolsForDataFile(Long fileId, ExternalTool.Type type) {
5904+
public List<ExternalTool> getCachedToolsForDataFile(DataFile dataFile, ExternalTool.Type type) {
5905+
Long fileId = dataFile.getId();
59055906
Map<Long, List<ExternalTool>> cachedToolsByFileId = new HashMap<>();
59065907
List<ExternalTool> externalTools = new ArrayList<>();
59075908
switch (type) {
@@ -5928,7 +5929,6 @@ public List<ExternalTool> getCachedToolsForDataFile(Long fileId, ExternalTool.Ty
59285929
if (cachedTools != null) { //if already queried before and added to list
59295930
return cachedTools;
59305931
}
5931-
DataFile dataFile = datafileService.find(fileId);
59325932
cachedTools = externalToolService.findExternalToolsByFile(externalTools, dataFile);
59335933
cachedToolsByFileId.put(fileId, cachedTools); //add to map so we don't have to do the lifting again
59345934
return cachedTools;
@@ -6235,7 +6235,7 @@ public String getEffectiveMetadataLanguage(boolean ofParent) {
62356235

62366236
public String getLocaleDisplayName(String code) {
62376237
String displayName = settingsWrapper.getBaseMetadataLanguageMap(false).get(code);
6238-
if(displayName==null && !code.equals(DvObjectContainer.UNDEFINED_CODE)) {
6238+
if(displayName==null && code!=null && !code.equals(DvObjectContainer.UNDEFINED_CODE)) {
62396239
//Default (for cases such as :when a Dataset has a metadatalanguage code but :MetadataLanguages is no longer defined).
62406240
displayName = new Locale(code).getDisplayName();
62416241
}
@@ -6251,6 +6251,11 @@ public List<String> getVocabScripts() {
62516251
}
62526252

62536253
public String getFieldLanguage(String languages) {
6254+
//Prevent NPE in Payara 6-2024-12 with CVoc
6255+
logger.info("Languages: " + languages);
6256+
if(languages==null) {
6257+
languages="";
6258+
}
62546259
return fieldService.getFieldLanguage(languages,session.getLocaleCode());
62556260
}
62566261

@@ -6723,6 +6728,7 @@ public boolean isGlobusTransferRequested() {
67236728
* valid files to transfer.
67246729
*/
67256730
public void startGlobusTransfer(boolean transferAll, boolean popupShown) {
6731+
logger.fine("inside startGlobusTransfer; "+(transferAll ? "transferAll" : "NOTtransferAll") + " " + (popupShown ? "popupShown" : "NOTpopupShown"));
67266732
if (transferAll) {
67276733
this.setSelectedFiles(workingVersion.getFileMetadatas());
67286734
}

src/main/java/edu/harvard/iq/dataverse/DataverseSession.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -209,19 +209,17 @@ public String getLocaleTitle() {
209209

210210
public void initLocale() {
211211

212-
if(FacesContext.getCurrentInstance() == null) {
213-
localeCode = "en";
214-
}
215-
else if (FacesContext.getCurrentInstance().getViewRoot() == null ) {
216-
localeCode = FacesContext.getCurrentInstance().getExternalContext().getRequestLocale().getLanguage();
217-
}
218-
else if (FacesContext.getCurrentInstance().getViewRoot().getLocale().getLanguage().equals("en_US")) {
219-
localeCode = "en";
220-
}
221-
else {
222-
localeCode = FacesContext.getCurrentInstance().getViewRoot().getLocale().getLanguage();
212+
213+
localeCode = "en";
214+
if (FacesContext.getCurrentInstance() != null) {
215+
if (FacesContext.getCurrentInstance().getViewRoot() == null) {
216+
localeCode = FacesContext.getCurrentInstance().getExternalContext().getRequestLocale().getLanguage();
217+
} else if (FacesContext.getCurrentInstance().getViewRoot().getLocale().getLanguage().equals("en_US")) {
218+
localeCode = "en";
219+
} else {
220+
localeCode = FacesContext.getCurrentInstance().getViewRoot().getLocale().getLanguage();
221+
}
223222
}
224-
225223
logger.fine("init: locale set to "+localeCode);
226224
}
227225

0 commit comments

Comments
 (0)