Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions .github/workflows/s3-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,8 @@ jobs:
- name: Check for changes related to s3
id: check-changes
run: |
BASE_REF=${{ github.base_ref || github.event.merge_group.base_ref || github.ref }}
BASE_REF=${BASE_REF#refs/heads/}
git fetch origin "$BASE_REF" --depth 1
CHANGED_FILES=$(git diff origin/"$BASE_REF" --name-only)
if echo "$CHANGED_FILES" | grep -q -E '^core/|^services/s3/|^services-custom/s3-transfer-manager/|^http-client-spi/|^http-clients/'; then
echo "Detected changes in S3, HTTP client, or core modules"
echo "has_s3_related_changes=true" >> $GITHUB_OUTPUT
else
echo "No changes detected in S3, HTTP client, or core modules"
echo "has_s3_related_changes=false" >> $GITHUB_OUTPUT
fi
Comment on lines -25 to -35
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to force s3-tests to run

echo "Detected changes in S3, HTTP client, or core modules"
echo "has_s3_related_changes=true" >> $GITHUB_OUTPUT

s3-regression-tests-download:
needs: check-s3-related-changes
Expand Down
1 change: 0 additions & 1 deletion buildspecs/s3-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ phases:
exit 0
fi
mvn clean install -P s3-regression-tests -pl :s3-tests -am -T1C -Dregression.test="$REGRESSION_TEST" $MAVEN_OPTIONS
echo $MAVEN_OPTIONS
finally:
- mkdir -p codebuild-test-reports
- find ./ -name 'TEST-*.xml' -type f -exec cp {} codebuild-test-reports/ \;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ void putObject(UploadConfig config) throws Exception {

// For testing purposes, ContentProvider is Publisher<ByteBuffer> for async clients
// Async java based clients don't currently support unknown content-length bodies
Assumptions.assumeFalse(config.getBodyType() == BodyType.CONTENT_PROVIDER_NO_LENGTH
|| config.getBodyType() == BodyType.INPUTSTREAM_NO_LENGTH,
"Async Java based support unknown content length");
Assumptions.assumeTrue(config.getBodyType().isContentLengthAvailable(),
"Async Java based support unknown content length");

LOG.info(() -> "Running UploadAsyncRegressionTesting putObject with config: " + config);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,29 +397,40 @@ void performWriteIfNeeded(TestAsyncBody requestBody) throws IOException {
}

protected enum BodyType {
INPUTSTREAM_RESETABLE,
INPUTSTREAM_NOT_RESETABLE,
INPUTSTREAM_NO_LENGTH,
INPUTSTREAM_RESETABLE(true),
INPUTSTREAM_NOT_RESETABLE(true),
INPUTSTREAM_NO_LENGTH(false),

STRING,
STRING(true),

FILE,
FILE(true),

CONTENT_PROVIDER_WITH_LENGTH,
CONTENT_PROVIDER_WITH_LENGTH(true),

CONTENT_PROVIDER_NO_LENGTH,
CONTENT_PROVIDER_NO_LENGTH(false),

BYTES,
BYTE_BUFFER,
REMAINING_BYTE_BUFFER,
BYTES(true),
BYTE_BUFFER(true),
REMAINING_BYTE_BUFFER(true),

BUFFERS,
BUFFERS_REMAINING,
BUFFERS(true),
BUFFERS_REMAINING(true),

BLOCKING_INPUT_STREAM,
BLOCKING_OUTPUT_STREAM,
BUFFERED_SPLITTABLE_KNOWN_CONTENT_LENGTH,
BUFFERED_SPLITTABLE_UNKNOWN_CONTENT_LENGTH
BLOCKING_INPUT_STREAM(true),
BLOCKING_OUTPUT_STREAM(true),
BUFFERED_SPLITTABLE_KNOWN_CONTENT_LENGTH(true),
BUFFERED_SPLITTABLE_UNKNOWN_CONTENT_LENGTH(false)
;

private final boolean contentLengthAvailable;

BodyType(boolean contentLengthAvailable) {
this.contentLengthAvailable = contentLengthAvailable;
}

public boolean isContentLengthAvailable() {
return contentLengthAvailable;
}
}

protected enum ContentSize {
Expand Down
Loading