NVIDIA / container-canary

A tool for testing and validating container requirements against versioned manifests
Apache License 2.0
245 stars 15 forks source link

feature request: make container startup timeout configurable #61

Closed jameslamb closed 3 months ago

jameslamb commented 5 months ago

Description

canary validate fails if the container takes more than 10 seconds to start up.

That 10 second threshold is currently hard-coded.

https://github.com/NVIDIA/container-canary/blob/a4f5c799e64cdaec661d40b909d04ca505b3e191/internal/container/docker.go#L76-L82

That timeout should be configurable.

Benefits of this work

Would allow the use of canary validate with images that take longer than 10 seconds to start up, for example:

Acceptance Criteria

Approach

Modify this

https://github.com/NVIDIA/container-canary/blob/a4f5c799e64cdaec661d40b909d04ca505b3e191/internal/container/docker.go#L76-L82

such that that 10 second timeout can be altered via configuration.

For example, I'd like to be able to run the following:

canary validate \
   --file ./checks.yaml \
   --startup-timeout 30 \
   ${IMAGE_URI}

Notes

Created this after observing this exact timeout while testing RAPIDS images over in https://github.com/rapidsai/docker/pull/670.

jacobtomlinson commented 5 months ago

Yup this sounds great!