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

timeout not used if specified in cr_build_yaml() #43

Closed
MarkEdmondson1234 opened this issue Feb 23, 2020 · 8 comments
Closed

timeout not used if specified in cr_build_yaml() #43

MarkEdmondson1234 opened this issue Feb 23, 2020 · 8 comments

Comments

@MarkEdmondson1234
Copy link
Owner

This should work?

cr_build_yaml(steps, 
              timeout = 3600,
              options = list(machineType = 'N1_HIGHCPU_8'))
@dmoimpact
Copy link

dmoimpact commented Mar 1, 2020

Unfortunately the output ignores the settings at the current moment:
image
image

@MarkEdmondson1234
Copy link
Owner Author

@dmoimpact what code are you using to try to generate the build?

@MarkEdmondson1234
Copy link
Owner Author

This seems to work:

cr_build(
  cr_build_yaml(steps = cr_buildstep_docker("my-image"), 
                options = list(machineType = "N1_HIGHCPU_8"))
)

Screenshot 2020-03-01 at 22 55 36

@dmoimpact
Copy link

scheduleR <- cr_build_yaml(
  steps = c(
    cr_buildstep(...
)))

my_build <- cr_build_make(scheduleR)
schedule_build <- cr_build(my_build,timeout = "3600s",options = list(machineType ='N1_HIGHCPU_8'))

(I tried with, and without "" in the seconds.)

@MarkEdmondson1234
Copy link
Owner Author

MarkEdmondson1234 commented Mar 1, 2020

You can specify the option at build time or when you make the yaml, but they both seem to work for me:

cr_build(
  cr_build_yaml(steps = cr_buildstep_docker("my-image")), 
  options = list(machineType = "N1_HIGHCPU_8")
)

Screenshot 2020-03-01 at 23 03 30

@MarkEdmondson1234
Copy link
Owner Author

MarkEdmondson1234 commented Mar 1, 2020

Ok I think its about timeout not the option?

In which case yes it currently doesn't respect the timeout if its in cr_build_yaml(), only if its in cr_build_make() or cr_build():

cr_build_make(cr_build_yaml(
                    cr_buildstep_docker("my-image"), 
                    timeout = 500,
                    options = list(machineType = 'N1_HIGHCPU_8')), 
               timeout = 777)
#==CloudBuildObject==
#timeout:  777s 
#steps:
#- name: gcr.io/cloud-builders/docker
#  args:
# ...

@MarkEdmondson1234 MarkEdmondson1234 changed the title Check you can add option to create bigger build VM timeout not used if specified in cr_build_yaml() Mar 1, 2020
@MarkEdmondson1234
Copy link
Owner Author

Should be fixed in latest version:

cr_build_make(cr_build_yaml(cr_buildstep_docker("my-image"), 
              timeout = 500,
              options = list(machineType = 'N1_HIGHCPU_8')))
# ==CloudBuildObject==
# timeout:  500s 
# steps:

@dmoimpact
Copy link

Great, I will try it our. Thanks!

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

No branches or pull requests

2 participants