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

No exception when PUT is used with incorrect URI or missing file #2017

Closed
wheezil opened this issue Jan 2, 2025 · 5 comments
Closed

No exception when PUT is used with incorrect URI or missing file #2017

wheezil opened this issue Jan 2, 2025 · 5 comments
Assignees
Labels
duplicate status-triage_done Initial triage done, will be further handled by the driver team

Comments

@wheezil
Copy link

wheezil commented Jan 2, 2025

  1. What version of JDBC driver are you using?

3.19.* and later

  1. What operating system and processor architecture are you using?

Windows (any)

  1. What version of Java are you using?

JDK 17

  1. What did you do?

Using a PUT to upload to a stage from a Windows file path, if you send an invalid path like file://C:/this/path/is/garbage the PUT does nothing.

Please see the related issue as described in #1984.

This issue is basically a follow-on of "... and it should have thrown an exception instead of failing silently"

  1. What did you expect to see?

An exception is thrown when invalid path like file:///C:/path/to/file or file://C:/path/to/garbage is used instead of a valid path starting with file://...

  1. Can you set logging to DEBUG and collect the logs?

I have not tried that, but it doesn't matter. Driver should throw an exception.

@wheezil wheezil added the bug label Jan 2, 2025
@wheezil wheezil changed the title No error or exception when PUT is used with incorrect URI No exception when PUT is used with incorrect URI Jan 2, 2025
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Jan 2, 2025
@sfc-gh-dszmolka sfc-gh-dszmolka added duplicate status-triage_done Initial triage done, will be further handled by the driver team and removed bug labels Jan 2, 2025
@sfc-gh-dszmolka
Copy link
Contributor

hi - as you mentioned, this issue is #1984 . Please allow us some time to address it, and in the meantime you're invited to follow the work on the issue this duplicates.

@sfc-gh-dszmolka sfc-gh-dszmolka closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2025
@wheezil
Copy link
Author

wheezil commented Jan 2, 2025

Hi, the only reason I made this a separate issue, is that I'm not complaining about the requirement of using file:// instead of file:///. Rather this is about getting no error for an invalid path. I'm not sure if this extends to all invalid paths? Or just the two-vs-three-slash case. If you like, I can try with a completely invalid path and see if it still fails silently.

@sfc-gh-dszmolka
Copy link
Contributor

Your feedback on 24 December 2024 about the non-existing exception in scenario which #1984 describes has been already relied to the team the same day, so hopefully they'll consider when developing the fix for #1984.

@wheezil
Copy link
Author

wheezil commented Jan 2, 2025

Thanks, and for the record, I verified that a total garbage path also fails silently
Executing SQL: PUT 'file:///C:/this/path/is/crap' @load_79ed1fd741de4b909171907f5f930a3e/load parallel=10 auto_compress=false
All uploads complete.

Perhaps this warrants a separate issue as this looks like a distinct symptom from the file:// vs file:/// case

I suspect what is happening (having written this same kind of code) is that the PUT is treating the path as a wildcard pattern and uploading "all matching files", and of course there are none.

@wheezil wheezil changed the title No exception when PUT is used with incorrect URI No exception when PUT is used with incorrect URI or missing file Jan 2, 2025
@sfc-gh-dszmolka
Copy link
Contributor

Thank you for testing. We'll address this on #1984 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

2 participants