Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 causes an issue when no hostname is set. #45637

Closed
thelfensdrfer opened this issue Jun 3, 2024 · 3 comments · Fixed by #45649
Closed

S3 causes an issue when no hostname is set. #45637

thelfensdrfer opened this issue Jun 3, 2024 · 3 comments · Fixed by #45649

Comments

@thelfensdrfer
Copy link

$params['s3-accelerate'] = $params['hostname'] == 's3-accelerate.amazonaws.com' || $params['hostname'] == 's3-accelerate.dualstack.amazonaws.com';

But according to the docs, a hostname doesn't have to be set.

Message in the log: Undefined array key "hostname" at /var/www/html/lib/private/Files/ObjectStore/S3ConnectionTrait.php#74

Version: 29.0.1

@kesselb
Copy link
Contributor

kesselb commented Jun 3, 2024

I guess we need a isset check.
Mind to send a pull request?

cc @icewind1991 @artonge

@joshtrichards joshtrichards self-assigned this Jun 3, 2024
joshtrichards added a commit that referenced this issue Jun 3, 2024
Fixes #45637 

The support for s3-accelerate added in #44496 introduced a regression in AWS S3 environments when `hostname` is blank (which is a valid configuration w/ AWS since the hostname gets auto-generated).

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards
Copy link
Member

joshtrichards commented Jun 3, 2024

Our integration tests didn't catch it I guess because we test against Minio with a hostname set rather than AWS. Don't see a good way to improve the tests at the moment, unless we start running them against AWS directly (which is outside my purview, but wouldn't be too challenging in theory...).

Fix pending in #45649.

Thanks for reporting @thelfensdrfer.

If you are able, appreciate a test of the fix in your environment.

@joshtrichards joshtrichards added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Jun 3, 2024
joshtrichards added a commit that referenced this issue Jun 3, 2024
Fixes #45637

The support for s3-accelerate added in #44496 introduced a regression in AWS S3 environments when `hostname` is blank (which is a valid configuration w/ AWS since the hostname gets auto-generated).

Signed-off-by: Josh <josh.t.richards@gmail.com>
joshtrichards added a commit that referenced this issue Jun 3, 2024
Fixes #45637

The support for s3-accelerate added in #44496 introduced a regression in AWS S3 environments when `hostname` is blank (which is a valid configuration w/ AWS since the hostname gets auto-generated).

Signed-off-by: Josh <josh.t.richards@gmail.com>
joshtrichards added a commit that referenced this issue Jun 4, 2024
Fixes #45637

The support for s3-accelerate added in #44496 introduced a regression in AWS S3 environments when `hostname` is blank (which is a valid configuration w/ AWS since the hostname gets auto-generated).

Signed-off-by: Josh <josh.t.richards@gmail.com>
@stszap
Copy link

stszap commented Jun 12, 2024

We are on 29.0.1 too and are having the same problem. We can't do a clean install, unfortunately, but I was able to manually patch the file in question the same way as in the PR above and the error messages stopped.

kesselb pushed a commit that referenced this issue Jun 12, 2024
Fixes #45637

The support for s3-accelerate added in #44496 introduced a regression in AWS S3 environments when `hostname` is blank (which is a valid configuration w/ AWS since the hostname gets auto-generated).

Signed-off-by: Josh <josh.t.richards@gmail.com>
@susnux susnux closed this as completed in 6388614 Jun 12, 2024
backportbot bot pushed a commit that referenced this issue Jun 12, 2024
Fixes #45637

The support for s3-accelerate added in #44496 introduced a regression in AWS S3 environments when `hostname` is blank (which is a valid configuration w/ AWS since the hostname gets auto-generated).

Signed-off-by: Josh <josh.t.richards@gmail.com>
backportbot bot pushed a commit that referenced this issue Jun 12, 2024
Fixes #45637

The support for s3-accelerate added in #44496 introduced a regression in AWS S3 environments when `hostname` is blank (which is a valid configuration w/ AWS since the hostname gets auto-generated).

Signed-off-by: Josh <josh.t.richards@gmail.com>
backportbot bot pushed a commit that referenced this issue Jun 12, 2024
Fixes #45637

The support for s3-accelerate added in #44496 introduced a regression in AWS S3 environments when `hostname` is blank (which is a valid configuration w/ AWS since the hostname gets auto-generated).

Signed-off-by: Josh <josh.t.richards@gmail.com>
susnux pushed a commit that referenced this issue Jun 13, 2024
Fixes #45637

The support for s3-accelerate added in #44496 introduced a regression in AWS S3 environments when `hostname` is blank (which is a valid configuration w/ AWS since the hostname gets auto-generated).

Signed-off-by: Josh <josh.t.richards@gmail.com>
kesselb pushed a commit that referenced this issue Jun 13, 2024
Fixes #45637

The support for s3-accelerate added in #44496 introduced a regression in AWS S3 environments when `hostname` is blank (which is a valid configuration w/ AWS since the hostname gets auto-generated).

Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants