-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Print cloud build logs when the task fails #1989
Conversation
Is there any particular reason to poll the service instead of just running it synchronously? The timeout can be specified using the |
/lgtm |
@Ark-kun I didn't realize this wasn't clear, let me add a comment later. It's meant to save time. When we are waiting for cloud build, we can deploy a cluster already. That saves ~4min. |
/lgtm |
I see. I often use the shell parallelism for such purposes. {gcoud clusters create && echo "$?" > /tmp/cluster_exit_code ;} &
cluster_pid=$!
gcloud builds submit ...
wait $cluster_pid
if [ "$(cat /tmp/cluster_exit_code)" != "0" ]; then
exit 1
fi |
Thanks, that's awesome. Learned something. I will change the implementation
like that.
…On Sat, Aug 31, 2019, 6:52 AM Alexey Volkov ***@***.***> wrote:
When we are waiting for cloud build, we can deploy a cluster already. That
saves ~4min.
I see. I often use the shell parallelism for such purposes.
Example:
{gcoud clusters create && echo "$?" > /tmp/cluster_exit_code ;} &
cluster_pid=$!
gcloud builds submit ...
wait $cluster_pid
if [ "$(cat /tmp/cluster_exit_code)" != "0" ]; then
exit 1
fi
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1989?email_source=notifications&email_token=ABF2LVLENW24WAXPWNOPQ3DQHGJBZA5CNFSM4IR7MZHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5S3ZSQ#issuecomment-526761162>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABF2LVPRBOIN5PPQDE3FL33QHGJBZANCNFSM4IR7MZHA>
.
|
@Ark-kun Thanks for the advice, but I don't feel I have enough time on this at the moment. After thinking about the refactor for a while. I realized it isn't as trivial as I thought.
For all of the above, I think having a current working version is enough. I don't quite want to spend the extra several hours to refactor now. But I learned bash parallel features this time and I will start with this approach next time when I need to make something new or change something. Thoughts? |
/lgtm |
Thanks. Can you grant approval too? |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Ark-kun, Bobgy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks! We got a chance to see how logs are printed when builds fail.
/retest |
Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com>
Fixes #1978
/area testing
/assign @Ark-kun
This change is