puppetlabs / bolt

Bolt is an open source orchestration tool that automates the manual work it takes to maintain your infrastructure on an as-needed basis or as part of a greater orchestration workflow. It can be installed on your local workstation and connects directly to remote nodes with SSH or WinRM, so you are not required to install any agent software.
https://puppet.com/docs/bolt/latest/bolt.html
Apache License 2.0
497 stars 225 forks source link

Allow formats other than JSON for metadata of tasks #2406

Closed benridley closed 2 years ago

benridley commented 3 years ago

Use Case

Task metadata is currently only accepted as JSON, however due to the frequency of editing and writing tasks and metadata the limitations of JSON make it somewhat unwieldy. (As opposed to regular Puppet module metadata, which often never needs to be touched after its written once)

For example, JSON doesn't support multiline strings which can be really useful when writing descriptions of tasks (and providing examples etc). In addition the trailing commas are a frequent source of frustration for us. Comments can be useful as well when describing metadata.

Describe the Solution You Would Like

Support for some other, more human-writable formats. The format would be identifiable from the file extension of the metadata and parsed appropriately.

Describe Alternatives You've Considered

YAML is the obvious choice, perhaps TOML.

nicklewis commented 2 years ago

I agree that this would be a UX improvement, but realistically it's not something we can do at this point.

Aside from the implementation complexities (multiple metadata files with the same basename and different extensions, performance implications of loading many yaml files), the fact that there are multiple tools that run tasks but with different release lifecycles means this change would fracture the ecosystem for quite some time.