runfinch / finch

The Finch CLI is an open source client for container development
https://www.runfinch.com
Apache License 2.0
3.51k stars 90 forks source link

ECR Cred Helper `Installed()` Method will only work on M1 / ARM #663

Closed ginglis13 closed 11 months ago

ginglis13 commented 11 months ago

Describe the bug Finch hardcodes a hash of the v0.7.0 arm64 ECR credential helper binary here:

https://github.com/runfinch/finch/blob/c199b6701824ab32d1b00676b6f7f072fa4f8c01/pkg/dependency/credhelper/cred_helper.go#L70

but the check for if this matches in its Installed() function will always fail on x86_64 machines because this hash is for the arm64 binary of ECR credential helper.

https://github.com/runfinch/finch/blob/c199b6701824ab32d1b00676b6f7f072fa4f8c01/pkg/dependency/credhelper/cred_helper_binary.go#L142-L153

Expected behavior

Finch either dynamically fetches the correct hash or confirms an installed ECR credential helper by other means.

pendo324 commented 11 months ago

Fixed by #668.