Open Ivaka opened 4 days ago
I could reproduce the problem, and agree that it's due to -bucket-config
's value being split on spaces. Maybe you could provide a PR for fixing it?
I could reproduce the problem, and agree that it's due to
-bucket-config
's value being split on spaces. Maybe you could provide a PR for fixing it?
Of course. However, the only feasible way I managed to fix it without introducing complexity into the parsing logic, is to expect the -gcs.service-account
to be passed as base64 encoded string. This might "break" a bit UX, as all other places where -gcs.service-account
is passed it is expected as JSON. If this solution is acceptable, then I can open a PR and move forward with it.
Describe the bug
When running
mimirtool bucket-validation
for data in GCS bucket, the command reports the following error:To Reproduce
Steps to reproduce the behavior:
mimirtool bucket-validation
Expected behavior
bucket-validation is ran
Additional Context
It seems that the issue stems from the way the
bucket-config
is passed and parsed - https://github.com/grafana/mimir/blob/main/pkg/mimirtool/commands/bucket_validation.go#L185 Because of the spaces in theprivate_key
thegcs.service-account
is not parsed correctly. The only way I could figure to fix this is to pass the service account as base64 encoded string and decode it in the code. Here is an implementation in my fork - https://github.com/Ivaka/mimir/commit/f09edae9d7be6eb7fe00cf31557eaa923d8adf3b