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

Accept runtime config in either JSON or TOML #2427

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

lann
Copy link
Collaborator

@lann lann commented Apr 4, 2024

Many environments have better JSON tooling than TOML. To ease integration, accept either format for runtime config.

This chooses the format as follows:

  • If the extension is .toml, parse as TOML
  • If the extension is .json, parse as JSON
  • If the first non-whitespace character is {, parse as JSON (never valid TOML)
  • Otherwise, parse as TOML (compatible with current behavior)

Signed-off-by: Lann Martin <lann.martin@fermyon.com>
@lann lann requested a review from endocrimes April 4, 2024 19:46
@lann lann enabled auto-merge April 4, 2024 19:49
@endocrimes endocrimes disabled auto-merge April 4, 2024 20:02
@endocrimes endocrimes enabled auto-merge April 4, 2024 20:02
@endocrimes
Copy link
Member

GitHub mobile is too easy to fat-finger, sorry!

(Yay I am excited to purge a bunch of SpinKube code at some point)

@endocrimes endocrimes merged commit ae1d3e6 into fermyon:main Apr 4, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants