Skip to content

Commit

Permalink
Merge branch 'IQSS:develop' into 9002_allow_direct_upload_setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ErykKul authored Sep 6, 2023
2 parents 03b1295 + 2246d66 commit 584bed4
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 14 deletions.
6 changes: 5 additions & 1 deletion doc/release-notes/9260-solr930.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ We assume that you already have a user called "solr" (from the instructions abov
```
su - solr
cd /usr/local/solr
wget https://archive.apache.org/dist/lucene/solr/9.3.0/solr-9.3.0.tgz
wget https://archive.apache.org/dist/solr/solr/9.3.0/solr-9.3.0.tgz
tar xvzf solr-9.3.0.tgz
cd solr-9.3.0
cp -r server/solr/configsets/_default server/solr/collection1
Expand All @@ -25,6 +25,10 @@ We assume that you already have a user called "solr" (from the instructions abov
cp /tmp/dvinstall/solrconfig.xml /usr/local/solr/solr-9.3.0/server/solr/collection1/conf
```

1. A Dataverse installation requires a change to the jetty.xml file that ships with Solr.

Edit /usr/local/solr/solr-9.3.0/server/etc/jetty.xml , increasing `requestHeaderSize` from `8192` to `102400`

1. Tell Solr to create the core "collection1" on startup.

```
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>29.0-jre</version>
<version>32.1.2-jre</version>
<type>jar</type>
</dependency>

Expand Down
20 changes: 10 additions & 10 deletions src/main/webapp/file-download-button-fragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
styleClass="btn-download"
process="@this"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
action="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'GlobusTransfer')}"
actionListener="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'GlobusTransfer')}"
update="@widgetVar(downloadPopup)" oncomplete="PF('downloadPopup').show();handleResizeDialog('downloadPopup');">
<f:setPropertyActionListener target="#{fileMetadataForAction}" value="#{fileMetadata}" />
<!-- guest book or terms of use, etc. enabled - open "download popup" first: -->
Expand All @@ -101,7 +101,7 @@
styleClass="btn-download"
process="@this"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
action="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'package')}"
actionListener="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'package')}"
update="@widgetVar(downloadPopup)" oncomplete="PF('downloadPopup').show();handleResizeDialog('downloadPopup');">
<f:actionListener binding="#{packagePopupFragmentBean.setFileMetadata(fileMetadata)}" />
<!-- package data file: -->
Expand All @@ -123,7 +123,7 @@
styleClass="btn-download"
process="@this"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
action="#{guestbookResponseService.modifyDatafile(guestbookResponse, fileMetadata)}"
actionListener="#{guestbookResponseService.modifyDatafile(guestbookResponse, fileMetadata)}"
update="@widgetVar(downloadPopup)" oncomplete="PF('downloadPopup').show();handleResizeDialog('downloadPopup');">
<f:setPropertyActionListener target="#{fileMetadataForAction}" value="#{fileMetadata}" />
<!-- guest book or terms of use, etc. enabled - open "download popup" first: -->
Expand All @@ -141,7 +141,7 @@
</p:commandLink>
<p:commandLink styleClass="highlightBold btn-download" rendered="#{downloadPopupRequired}"
process="@this"
action="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'bundle' )}"
actionListener="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'bundle' )}"
update="@widgetVar(downloadPopup)"
oncomplete="PF('downloadPopup').show();handleResizeDialog('downloadPopup');">
#{bundle['file.downloadBtn.format.all']}
Expand All @@ -161,7 +161,7 @@
<p:commandLink styleClass="btn-download" rendered="#{downloadPopupRequired and !(fileMetadata.dataFile.originalFormatLabel == 'UNKNOWN')}"
process="@this"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
action="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'original' )}"
actionListener="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'original' )}"
update="@widgetVar(downloadPopup)"
oncomplete="PF('downloadPopup').show();handleResizeDialog('downloadPopup');">
<f:setPropertyActionListener target="#{fileMetadataForAction}" value="#{fileMetadata}" />
Expand All @@ -178,7 +178,7 @@
#{bundle['file.downloadBtn.format.tab']}
</p:commandLink>
<p:commandLink styleClass="btn-download" rendered="#{downloadPopupRequired}"
action="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'tab' )}"
actionListener="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'tab' )}"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
update="@widgetVar(downloadPopup)"
oncomplete="PF('downloadPopup').show();handleResizeDialog('downloadPopup');">
Expand All @@ -197,7 +197,7 @@
<p:commandLink styleClass="btn-download" rendered="#{downloadPopupRequired}"
process="@this"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
action="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'RData' )}"
actionListener="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'RData' )}"
update="@widgetVar(downloadPopup)"
oncomplete="PF('downloadPopup').show();handleResizeDialog('downloadPopup');">
<f:setPropertyActionListener target="#{fileMetadataForAction}" value="#{fileMetadata}" />
Expand All @@ -224,7 +224,7 @@
<p:commandLink styleClass="btn-download" rendered="#{downloadPopupRequired}"
process="@this"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
action="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'var' )}"
actionListener="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'var' )}"
update="@widgetVar(downloadPopup)"
oncomplete="PF('downloadPopup').show();handleResizeDialog('downloadPopup');">
#{bundle['file.downloadBtn.format.var']}
Expand Down Expand Up @@ -311,7 +311,7 @@
</p:commandLink>
<!--The modifyDatafileAndFormat method below was added because on the dataset page, "tool" is null in the popup so we store it in the guestbookResponse because we know we'll need it later in the popup.-->
<p:commandLink rendered="#{downloadPopupRequired}"
action="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'externalTool', tool)}"
actionListener="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'externalTool', tool)}"
styleClass="btn-explore #{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload)}"
process="@this"
Expand Down Expand Up @@ -340,7 +340,7 @@
</p:commandLink>
<!--The modifyDatafileAndFormat method below was added because on the dataset page, "tool" is null in the popup so we store it in the guestbookResponse because we know we'll need it later in the popup.-->
<p:commandLink rendered="#{downloadPopupRequired}"
action="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'externalTool', tool)}"
actionListener="#{guestbookResponseService.modifyDatafileAndFormat(guestbookResponse, fileMetadata, 'externalTool', tool)}"
styleClass="btn-query #{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload)}"
process="@this"
Expand Down
14 changes: 14 additions & 0 deletions src/test/java/edu/harvard/iq/dataverse/api/AdminIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,13 @@ public void testMigrateHDLToDOI() {
.statusCode(OK.getStatusCode());
}

/**
* Disabled because once there are new fields in the database that Solr
* doesn't know about, dataset creation could be prevented, or at least
* subsequent search operations could fail because the dataset can't be
* indexed.
*/
@Disabled
@Test
public void testLoadMetadataBlock_NoErrorPath() {
Response createUser = UtilIT.createRandomUser();
Expand Down Expand Up @@ -778,6 +785,13 @@ public void testLoadMetadataBlock_NoErrorPath() {
assertEquals(244, (int) statistics.get("Controlled Vocabulary"));
}

/**
* Disabled because once there are new fields in the database that Solr
* doesn't know about, dataset creation could be prevented, or at least
* subsequent search operations could fail because the dataset can't be
* indexed.
*/
@Disabled
@Test
public void testLoadMetadataBlock_ErrorHandling() {
Response createUser = UtilIT.createRandomUser();
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/edu/harvard/iq/dataverse/api/MoveIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public void testMoveLinkedDataset() {
.statusCode(OK.getStatusCode())
.body("feed.entry[0].id", CoreMatchers.endsWith(datasetPid));

UtilIT.sleepForReindex(datasetPid, superuserApiToken, 10);
UtilIT.sleepForReindex(datasetPid, superuserApiToken, 20);
Response getLinksAfter = UtilIT.getDatasetLinks(datasetPid, superuserApiToken);
getLinksAfter.prettyPrint();
getLinksAfter.then().assertThat()
Expand Down
9 changes: 8 additions & 1 deletion src/test/java/edu/harvard/iq/dataverse/api/UtilIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,14 @@ static Response updateDatasetPIDMetadata(String persistentId, String apiToken)
.post("/api/datasets/:persistentId/modifyRegistrationMetadata/?persistentId=" + persistentId);
return response;
}


/**
* Deprecated because once there are new fields in the database that Solr
* doesn't know about, dataset creation could be prevented, or at least
* subsequent search operations could fail because the dataset can't be
* indexed.
*/
@Deprecated
static Response loadMetadataBlock(String apiToken, byte[] body) {
return given()
.header(API_TOKEN_HTTP_HEADER, apiToken)
Expand Down

0 comments on commit 584bed4

Please sign in to comment.