k8up-io / wrestic

Restic Backup Kubernetes and OpenShift Wrapper - Part of K8up
BSD 3-Clause "New" or "Revised" License
16 stars 3 forks source link

Make parsing restic output resilient to non-json output #81

Closed cimnine closed 3 years ago

cimnine commented 3 years ago

This PR changes the parsing logic for parsing the restic output. When some output can't be parsed as JSON, then it will still be written to the log, but it will not stop the processing of the output, as it did before.

As discussed in https://github.com/vshn/wrestic/issues/79#issuecomment-808104241

Kidswiss commented 3 years ago

LGTM

Just curious: how did you trigger the out of bounds in the snapshot parsing?

cimnine commented 3 years ago

The go test implementation doesn't seem to work on (my) Mac. Therefore no snapshots were ever created, hence no were found, hence the out of bounds error was triggered.