DSC icon indicating copy to clipboard operation
DSC copied to clipboard

Support specifying timeout for resources

Open SteveL-MSFT opened this issue 1 year ago • 1 comments

Summary of the new feature / enhancement

In the Microsoft.DSC section of metadata, allow configuration to specify a timeout. It may also make sense to just have a default timeout so configuration isn't blocked indefinitely.

Proposed technical implementation details (optional)

No response

SteveL-MSFT avatar Oct 09 '24 22:10 SteveL-MSFT

A few related questions:

  • Would it be useful to have a --timeout option on the dsc resource * commands?
  • Should we consider an API surface for adapters to handle timeouts for their adapted resources?

michaeltlombardi avatar Oct 10 '24 13:10 michaeltlombardi

It probably makes sense to have --timeout for both resource invocation and config invocation at the command-line level in addition to allowing config authors to specify timeouts.

For adapters, I think they should just follow the same contract which is metadata at the resource level should be respected. However, we may need adapters to publish what capabilities they support and perhaps even reject explicitly any metadata it doesn't understand so users don't set something that doesn't apply.

SteveL-MSFT avatar Oct 16 '24 20:10 SteveL-MSFT