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

Bash error in ECR integration #4390

Closed
fleitz opened this issue Jun 11, 2018 · 4 comments
Closed

Bash error in ECR integration #4390

fleitz opened this issue Jun 11, 2018 · 4 comments
Assignees
Labels

Comments

@fleitz
Copy link

fleitz commented Jun 11, 2018

Description of your issue:

== Unary operator expected line 349

Only happens when there is a cached build.

Issue is insufficient quoting in bash. login_ok is only set here and when testing without quotes a bare $login_ok becomes nothing and then it evaluates "== false" which causes an error. Need to add quotes around $login_ok.

login_out=$($docker_login_cmd 2>&1) || {
exec_cmd "echo 'Hub login failed'"
login_ok=false
}

if [ $login_ok == false ]; then
exec_cmd "echo -e 'ECR docker login failed\n\n'$login_out"
should_continue=false
return 127
else
exec_cmd "echo 'ECR docker login successful'"
is_success=true
fi
is_success=true
}

@trriplejay
Copy link

thanks, we're investigating.

@manishas
Copy link
Contributor

@trriplejay was there a resolution to this?

@trriplejay
Copy link

I agree the script has this issue which should be fixed. However, i'm not sure that it is the reason that the build failed, as the script continued on and ran the rest of the build successfully. Also this unary error appears in the "good path" for ECR login, which is being hit pretty commonly across users of the product, and most people aren't seeing it result in build failure like this.

I'll open an internal ticket to fix this script, but the build failure is still a bit of a mystery to me in this case. It's probably more closely tied to this existing issue: #4297

@manishas
Copy link
Contributor

This has been fixed, so closing.

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

No branches or pull requests

3 participants