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

fix(yaml) Allow specifying file path as an URL #360

Merged
merged 2 commits into from
Nov 11, 2021

Conversation

dduportal
Copy link
Contributor

Fix #357

This PRs allow specifying Yaml file path as URLs.

Test

To test this pull request, you can run the following commands:

go build -o ./dist/updatecli && ./dist/updatecli diff --config ./examples/updateCli.generic/yaml.yaml

Additional Information

  • Introduced a New method to create a Yaml object
  • Separate YamlSpec from Yaml objects to allow injection for unit testing/mocking + easier feature upgrades
  • Use the same strategy as the file resource by adding a Read() method
  • Updated examples to provide more cases

@dduportal dduportal added bug Something isn't working resource-yaml Resource of kind YAML source labels Nov 11, 2021
olblak
olblak previously approved these changes Nov 11, 2021
Copy link
Member

@olblak olblak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the cleanup, excepted a minor question, everything look good to me

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
@dduportal
Copy link
Contributor Author

@olblak if the proposal is ok for you, can I let you approve and merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resource-yaml Resource of kind YAML source
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[yaml] error when the "file" key is an URL
2 participants