Skip to content

Conversation

carlopi
Copy link
Contributor

@carlopi carlopi commented Oct 8, 2024

Idea is that if .info files ends up being corrupt, you will be stuck in a loop like:

duckdb -c "FORCE INSTALL x"
IO Error: Failed to read info file for 'x' extension: ...
....
Try reinstalling the extension using 'FORCE INSTALL x;'

And given in the force_install codepath (that is either in case of FORCE INSTALL or in case of UPDATE EXTENSIONS) the info file will be rewritten in any case I think this is OK, and there is no need to notify user that this happened.
In the LOAD codepath this will still be visible, we only need a way to get unblocked (yes, removing the file works, but it's not super cool).

Note that we could also just avoid the read (but only in the case of proper FORCE INSTALL), but I wanted avoid yet another slightly different codepath.

…_install)

Idea is that if `.info` files ends up being corrupt, you will be stuck in a loop like:
duckdb -c "FORCE INSTALL x"
IO Error: Failed to read info file for 'x' extension:
Try reinstalling the extension using 'FORCE INSTALL x;'

And given in the force_install codepath (that is either in case of `FORCE INSTALL` or in
case of `UPDATE EXTENSIONS`) the info file will be rewritten in any case I think this is
fine.

Note that we could also just avoid the read (but only in the case of FORCE INSTALL), but I wanted
avoid yet another slightly different codepath.
@carlopi
Copy link
Contributor Author

carlopi commented Oct 8, 2024

Unsure if main or feature, feel free to retarget, it's fixing a minor bug I had found, but has a workaround (remove the file / the whole folder) and it's not really a common/expected case

@Mytherin Mytherin requested a review from samansmink October 11, 2024 12:07
@Mytherin Mytherin merged commit d067316 into duckdb:main Oct 23, 2024
41 of 42 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

@carlopi carlopi deleted the improve_on_wrong_extension_info branch October 24, 2024 09:26
github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Nov 2, 2024
Avoid throwing on failure to open extensions's .info file (when force installing) (duckdb/duckdb#14272)
[Python][Dev] Fix up test to work with older version (duckdb/duckdb#14505)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Nov 2, 2024
Avoid throwing on failure to open extensions's .info file (when force installing) (duckdb/duckdb#14272)
[Python][Dev] Fix up test to work with older version (duckdb/duckdb#14505)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.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 this pull request may close these issues.

2 participants