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

Unseekable S3 StreamWrapper says it is seekable #2788

Closed
driskell opened this issue Oct 4, 2023 · 2 comments
Closed

Unseekable S3 StreamWrapper says it is seekable #2788

driskell opened this issue Oct 4, 2023 · 2 comments
Assignees
Labels
bug This issue is a bug. wont-fix We have determined that we will not resolve the issue.

Comments

@driskell
Copy link

driskell commented Oct 4, 2023

Describe the bug

When using a S3 stream wrapper and opening a file, without setting seekable, so it is unseekable, the stream meta data says it is seekable.

Expected Behavior

Stream metadata should say not seekable

Current Behavior

Stream metadata says it is seekable when it is not

Reproduction Steps

$file = fopen('s3://...', 'r');
echo json_encode(stream_get_meta_data($file));
{"timed_out":false,"blocked":true,"eof":false,"wrapper_data":{"context":null},"wrapper_type":"user-space","stream_type":"user-space","mode":"r","unread_bytes":0,"seekable":true,"uri":"s3://..."}

Possible Solution

No response

Additional Information/Context

No response

SDK version used

3.279.1

Environment details (Version of PHP (php -v)? OS name and version, etc.)

PHP 8.0.30 (cli) (built: Aug 3 2023 17:13:08) ( NTS ) / MacBook Apple Sillicon M1

@driskell driskell added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 4, 2023
@stobrien89 stobrien89 self-assigned this Oct 5, 2023
@stobrien89 stobrien89 added wont-fix We have determined that we will not resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Oct 5, 2023
@stobrien89
Copy link
Member

Hi @driskell,

Thanks for reaching out. This is an unfortunate quirk of the streamwrapper customization and it doesn't look like there's a great way for us to override this.

We've documented our reasoning behind making streams opened in r unseekable by default and outline the steps needed to make a stream opened in r mode seekable.

@github-actions
Copy link

github-actions bot commented Oct 5, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. wont-fix We have determined that we will not resolve the issue.
Projects
None yet
Development

No branches or pull requests

2 participants