Merge remote-tracking branch '4science-bitbucket/main' into CST-5587

This commit is contained in:
Luca Giamminonni
2022-06-07 14:37:42 +02:00
6 changed files with 30 additions and 8 deletions

View File

@@ -31,6 +31,11 @@ jobs:
# We turn off 'latest' tag by default.
TAGS_FLAVOR: |
latest=false
# Architectures / Platforms for which we will build Docker images
# If this is a PR, we ONLY build for AMD64. For PRs we only do a sanity check test to ensure Docker builds work.
# If this is NOT a PR (e.g. a tag or merge commit), also build for ARM64. NOTE: The ARM64 build takes MUCH
# longer (around 45mins or so) which is why we only run it when pushing a new Docker image.
PLATFORMS: linux/amd64${{ github.event_name != 'pull_request' && ', linux/arm64' || '' }}
steps:
# https://github.com/actions/checkout
@@ -42,7 +47,7 @@ jobs:
uses: docker/setup-buildx-action@v1
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
- name: Set up QEMU emulation to build for multiple architectures
uses: docker/setup-qemu-action@v2
# https://github.com/docker/login-action
@@ -74,7 +79,7 @@ jobs:
with:
context: .
file: ./Dockerfile.dependencies
platforms: linux/amd64,linux/arm64
platforms: ${{ env.PLATFORMS }}
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}
@@ -100,7 +105,7 @@ jobs:
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
platforms: ${{ env.PLATFORMS }}
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}
@@ -129,7 +134,7 @@ jobs:
with:
context: .
file: ./Dockerfile.test
platforms: linux/amd64,linux/arm64
platforms: ${{ env.PLATFORMS }}
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}
@@ -155,7 +160,7 @@ jobs:
with:
context: .
file: ./Dockerfile.cli
platforms: linux/amd64,linux/arm64
platforms: ${{ env.PLATFORMS }}
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
# but we ONLY do an image push to DockerHub if it's NOT a PR
push: ${{ github.event_name != 'pull_request' }}

View File

@@ -113,9 +113,11 @@ public abstract class IndexFactoryImpl<T extends IndexableObject, S> implements
log.info("Full text is larger than the configured limit (discovery.solr.fulltext.charLimit)."
+ " Only the first {} characters were indexed.", charLimit);
} else {
log.error("Tika parsing error. Could not index full text.", saxe);
throw new IOException("Tika parsing error. Could not index full text.", saxe);
}
} catch (TikaException ex) {
log.error("Tika parsing error. Could not index full text.", ex);
throw new IOException("Tika parsing error. Could not index full text.", ex);
}

View File

@@ -587,4 +587,9 @@ public class EPersonServiceImpl extends DSpaceObjectServiceImpl<EPerson> impleme
}
return find(context, UUIDUtils.fromString(owners.get(0).getAuthority()));
}
@Override
public String getName(EPerson dso) {
return dso.getName();
}
}

View File

@@ -829,4 +829,9 @@ public class GroupServiceImpl extends DSpaceObjectServiceImpl<Group> implements
final MetadataField metadataField) throws SQLException {
return groupDAO.findByMetadataField(context, searchValue, metadataField);
}
@Override
public String getName(Group dso) {
return dso.getName();
}
}

View File

@@ -72,7 +72,12 @@ public class DSpaceOAIDataProvider {
private DSpaceResumptionTokenFormatter resumptionTokenFormat = new DSpaceResumptionTokenFormatter();
@RequestMapping({"", "/"})
@RequestMapping("")
public void index(HttpServletResponse response, HttpServletRequest request) throws IOException {
response.sendRedirect(request.getRequestURI() + "/");
}
@RequestMapping({"/"})
public String indexAction(HttpServletResponse response, Model model) throws ServletException {
try {
XOAIManager manager = xoaiManagerResolver.getManager();

View File

@@ -63,9 +63,9 @@ public class OAIpmhIT extends AbstractControllerIntegrationTest {
private ConfigurationService configurationService;
// All OAI-PMH paths that we test against
private final String ROOT_PATH = "/oai";
private final String ROOT_PATH = "/oai/";
private final String DEFAULT_CONTEXT_PATH = "request";
private final String DEFAULT_CONTEXT = ROOT_PATH + "/" + DEFAULT_CONTEXT_PATH;
private final String DEFAULT_CONTEXT = ROOT_PATH + DEFAULT_CONTEXT_PATH;
// Mock to ensure XOAI caching is disabled for all tests (see @Before method)
@MockBean