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

bad initialization for importers #292

Open
brmzkw opened this issue Jan 20, 2025 · 3 comments
Open

bad initialization for importers #292

brmzkw opened this issue Jan 20, 2025 · 3 comments

Comments

@brmzkw
Copy link
Contributor

brmzkw commented Jan 20, 2025

In backup.go, we attempt to initialize the importer. In case of failure, we fallback to the fs importer.

If the importer fails because the path given is invalid, we should instead display the error to the user.

@poolpOrg
Copy link
Collaborator

Can you show me how to reproduce, I'm unsure I understand the issue

@brmzkw
Copy link
Contributor Author

brmzkw commented Jan 29, 2025

Let's say the s3 importe fails during initialization. The error is bubbled up, but then, we fallback to the fs importer in backup.go.

As a result, creating a snapshot of an invalid s3 location successfully creates a backup:

./plakar backup s3://sadfoinansdiofnoais
Duration: 0s
Directories: ✓ 1
      Files: ✓ 0
Done!
info: created unsigned snapshot b22ec89f with root pQBOyJRN59VQ5levAhIACig/hs3S3dOMYt5ZIeW/MYc of size 0 B in 1.240125ms

@ptr-math
Copy link

ptr-math commented Jan 29, 2025

Yeah it's a known shortcoming of our current (best) heuristic to process both absolute and relative paths for the fs. Not something we can easily fix without doing a full re-make of how we handle backend detection (same goes for repo/exporter).

The remake is in a todo list somewhere, but it's def. a post V1 thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants