-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use 'yaml' files for pod specifications. #934
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
public/docs/fleet/index.mdx
Outdated
``` | ||
|
||
If your `fleet.json` uses `my-pod@latest`, you can ask the fleet | ||
If your `fleet.yaml` uses `my-pod@latest`, you can ask the fleet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is fleet now yaml? I think this is wrong here and in a few more places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was only here and in line 372.
done.
src/cli/cmds/pod.toit
Outdated
// If we only want the non-flattened version read the json by hand. | ||
json = read-json specification-path | ||
// If we only want the non-flattened version read the json/yaml again by hand. | ||
if specification-path.ends-with ".json": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this use the helper in pod-specification.toit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
if path.ends-with ".json": | ||
return read-json path | ||
if path.ends-with ".yaml" or path.ends-with ".yml": | ||
return read-yaml path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the yaml parser read json? We may not want to use that because then we suddenly support reading yaml from .json files, but we could also get away with not caring about the extension at all -- and tell the user if it doesn't contain valid YAML or JSON.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I slightly prefer to use the json-parser when it's JSON.
can be convinced otherwise.
No description provided.