Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/xhr-allow-authorization-header
Browse files Browse the repository at this point in the history
  • Loading branch information
ksclarke authored Sep 11, 2024
2 parents b6236e7 + 1bffd1f commit fe5c06e
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 44 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
java: [jdk11, jdk17, jdk18, jdk21, graalvm]
java: [jdk11, jdk17, jdk21, jdk22, graalvm]
fail-fast: false
steps:
- name: Check out the repository
Expand All @@ -22,9 +22,9 @@ jobs:
- name: Test in Linux JDK 17 (LTS)
if: matrix.os == 'ubuntu-latest' && matrix.java == 'jdk17'
run: docker compose -f docker/Linux-JDK17/compose.yaml up --build --exit-code-from cantaloupe
- name: Test in Linux JDK 18
if: matrix.os == 'ubuntu-latest' && matrix.java == 'jdk18'
run: docker compose -f docker/Linux-JDK18/docker-compose.yml up --build --exit-code-from cantaloupe
- name: Test in Linux JDK 22 (non-LTS)
if: matrix.os == 'ubuntu-latest' && matrix.java == 'jdk22'
run: docker compose -f docker/Linux-JDK22/compose.yaml up --build --exit-code-from cantaloupe
- name: Test in Linux JDK 21 (LTS)
if: matrix.os == 'ubuntu-latest' && matrix.java == 'jdk21'
run: docker compose -f docker/Linux-JDK21/compose.yaml up --build --exit-code-from cantaloupe
Expand All @@ -37,9 +37,9 @@ jobs:
- name: Test in Windows JDK 17 (LTS)
if: matrix.os == 'windows-latest' && matrix.java == 'jdk17'
run: docker compose -f docker/Windows-JDK17/compose.yaml up --build --exit-code-from cantaloupe
- name: Test in Windows JDK 18
if: matrix.os == 'windows-latest' && matrix.java == 'jdk18'
run: docker compose -f docker/Windows-JDK18/docker-compose.yml up --build --exit-code-from cantaloupe
- name: Test in Windows JDK 22 (non-LTS)
if: matrix.os == 'windows-latest' && matrix.java == 'jdk22'
run: docker compose -f docker/Windows-JDK22/compose.yaml up --build --exit-code-from cantaloupe
- name: Test in Windows JDK 21 (LTS)
if: matrix.os == 'windows-latest' && matrix.java == 'jdk21'
run: docker compose -f docker/Windows-JDK21/compose.yaml up --build --exit-code-from cantaloupe
Expand Down
13 changes: 4 additions & 9 deletions docker/Linux-JDK18/Dockerfile → docker/Linux-JDK22/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:noble
FROM ubuntu:lunar

ENV JAVA_HOME=/opt/jdk
ENV PATH=$PATH:/opt/jdk/bin:/opt/maven/bin
Expand Down Expand Up @@ -36,15 +36,10 @@ COPY docker/image_files/libjpeg-turbo/lib64 /opt/libjpeg-turbo/lib
COPY dist/deps/Linux-x86-64/lib/* /usr/lib/

# Install various other dependencies that aren't in apt
# Install GrokProcessor dependencies
#RUN wget -q https://github.com/GrokImageCompression/grok/releases/download/v7.6.5/libgrokj2k1_7.6.5-1_amd64.deb \
# && wget -q https://github.com/GrokImageCompression/grok/releases/download/v7.6.5/grokj2k-tools_7.6.5-1_amd64.deb \
# && dpkg -i ./libgrokj2k1_7.6.5-1_amd64.deb \
# && dpkg -i --ignore-depends=libjpeg62-turbo ./grokj2k-tools_7.6.5-1_amd64.deb \
# Install OpenJDK
RUN wget -q https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_linux-x64_bin.tar.gz \
&& tar xfz openjdk-18_linux-x64_bin.tar.gz \
&& mv jdk-18 /opt/jdk \
RUN wget -q https://download.java.net/java/GA/jdk22.0.2/c9ecb94cd31b495da20a27d4581645e8/9/GPL/openjdk-22.0.2_linux-x64_bin.tar.gz \
&& tar xfz openjdk-22.0.2_linux-x64_bin.tar.gz \
&& mv jdk-22.0.2 /opt/jdk \
# Install a newer Maven than the one in apt
&& wget -q https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz \
&& tar xfz apache-maven-3.8.8-bin.tar.gz \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#
# N.B.: docker-compose must be invoked from the project root directory:
# N.B.: docker compose must be invoked from the project root directory:
#
# docker-compose -f path/to/docker-compose.yml up --exit-code-from cantaloupe
# docker compose -f path/to/compose.yaml up --exit-code-from cantaloupe
#
version: '3'
services:
cantaloupe:
build:
context: ../../
dockerfile: $PWD/docker/Linux-JDK18/Dockerfile
dockerfile: $PWD/docker/Linux-JDK22/Dockerfile
minio:
image: minio/minio
environment:
Expand Down
19 changes: 0 additions & 19 deletions docker/Windows-JDK18/docker-compose.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN powershell -Command \
# Install various dependencies
# TODO: openjpeg
RUN choco install -y maven ffmpeg
RUN choco install -y openjdk --version=18.0.2
RUN choco install -y openjdk --version=22.0.2

# Install TurboJpegProcessor dependencies TODO: libjpeg-turbo
#RUN mkdir -p /opt/libjpeg-turbo/lib
Expand Down
File renamed without changes.
18 changes: 18 additions & 0 deletions docker/Windows-JDK22/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# N.B.: docker compose must be invoked from the project root directory:
#
# docker compose -f path/to/compose.yaml up --exit-code-from cantaloupe
#
services:
cantaloupe:
build:
context: ../../
dockerfile: docker/Windows-JDK22/Dockerfile
minio:
build:
context: ../../
dockerfile: docker/Windows-JDK22/Dockerfile-minio
environment:
MINIO_ACCESS_KEY: MinioUser
MINIO_SECRET_KEY: OpenSesame
hostname: minio
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ private S3ObjectAttributes getObjectAttributes() throws IOException {
.build());
objectAttributes = new S3ObjectAttributes();
objectAttributes.length = response.contentLength();
objectAttributes.contentType = response.contentType();
objectAttributes.lastModified = response.lastModified();
} catch (NoSuchBucketException | NoSuchKeyException e) {
throw new NoSuchFileException(info.toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@
import java.nio.file.Path;
import java.util.Arrays;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.junit.jupiter.api.Assertions.*;
import static org.junit.jupiter.api.Assumptions.*;

public class S3CacheTest extends AbstractCacheTest {
private static final Logger LOGGER = LoggerFactory.getLogger(S3CacheTest.class);

private enum Service {
AWS("aws"), MINIO("minio");
Expand Down Expand Up @@ -323,10 +327,14 @@ void testPurge() throws Exception {
// purge everything
instance.purge();

// Allow time for purge but not as long as upload
Thread.sleep(ASYNC_WAIT / 2);

// assert that the info has been purged
int tries = 0;
while (tries < 5 && instance.getInfo(identifier).isPresent()) {
LOGGER.debug("Identifier " + identifier + " is still present. Try: " + tries);
// Allow time for purge but not as long as upload
Thread.sleep(ASYNC_WAIT / 2);
tries++;
}
// If reached here then identifier is probably not going to be deleted async
assertFalse(instance.getInfo(identifier).isPresent());

// assert that the image has been purged
Expand Down

0 comments on commit fe5c06e

Please sign in to comment.