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 resource should support file URI starting with fttp://, http://, https:// #846

Merged
merged 8 commits into from
Sep 10, 2022

Conversation

olblak
Copy link
Member

@olblak olblak commented Sep 6, 2022

Similar to #845
The current PR fixes the different file path scenario for the YAML resource

Test

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

cp <to_package_directory>
go test

Additional Information

Tradeoff

Potential improvement

pkg/plugins/resources/yaml/source.go Outdated Show resolved Hide resolved
pkg/plugins/resources/yaml/target.go Outdated Show resolved Hide resolved
pkg/plugins/resources/yaml/utils.go Outdated Show resolved Hide resolved
@olblak olblak added this to the 0.34.0 milestone Sep 10, 2022
@olblak olblak added the bug Something isn't working label Sep 10, 2022
@olblak
Copy link
Member Author

olblak commented Sep 10, 2022

So I messed up the git history with old xml change, I first need to clean this up

Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
olblak and others added 6 commits September 10, 2022 13:08
Co-authored-by: Hervé Le Meur <91831478+lemeurherve@users.noreply.github.com>
Co-authored-by: Hervé Le Meur <91831478+lemeurherve@users.noreply.github.com>
Co-authored-by: Hervé Le Meur <91831478+lemeurherve@users.noreply.github.com>
Co-authored-by: Hervé Le Meur <91831478+lemeurherve@users.noreply.github.com>
Co-authored-by: Hervé Le Meur <91831478+lemeurherve@users.noreply.github.com>
@olblak
Copy link
Member Author

olblak commented Sep 10, 2022

The e2e tests won't work until this PR is merged

@hervelemeur
Copy link
Contributor

FYI you can commit suggestions in batch ;)

@olblak olblak merged commit b083040 into updatecli:main Sep 10, 2022
lemeurherve pushed a commit to lemeurherve/updatecli that referenced this pull request Sep 10, 2022
lemeurherve pushed a commit to lemeurherve/updatecli that referenced this pull request Sep 10, 2022
@olblak olblak changed the title Fix: Various YAML file path scenario fix: YAML resource should support file URI starting with fttp://, http://, https:// Sep 11, 2022
olblak added a commit that referenced this pull request Feb 1, 2023
* feat(yaml): implement spec.files for kind: yaml

Follow-up of #490
Ref #435

* Add e2e test for yaml (#43)

* Apply suggestions from code review

Co-authored-by: Olivier Vernin <olivier@vernin.me>

* chore: move test to e2e success folder

* wip: first stab at files for condition too

* Revert "wip: first stab at files for condition too"

This reverts commit 957f21e.

* restore comment, will be done in #729

* chore: replace deprecated sourceID field by sourceid

* fix: e2e tests

* breaking?: no error if the target content hasn't changed

* Remove broken test file

Signed-off-by: Olblak <me@olblak.com>

* patch from main (with #846 included and adapted)

* fix tests

* Add missing jsonschema annotations

Co-authored-by: Olivier Vernin <olivier@vernin.me>

* fix: remove files field from expected autodiscovery tests results
Omited if empty since previous commit

* cleanup: remove non mandatory empty files field from chart examples

* chore: more complete debug log with initial filePath

* chore: add debug logs

* Update pkg/plugins/resources/yaml/main.go

* chore: add missing Test_TargetFromSCM test

* Update pkg/plugins/resources/yaml/source.go

Co-authored-by: Hervé Le Meur <91831478+lemeurherve@users.noreply.github.com>

* Update pkg/plugins/resources/yaml/main.go

Co-authored-by: Olivier Vernin <olivier@vernin.me>

* allow multiples files for 'condition'

* update example with a condition checking multiple files

* remove TODOs

* remove unrelated changes

* replace example by e2e test

* correct check for s.file

* Update pkg/plugins/resources/yaml/main.go

---------

Signed-off-by: Olblak <me@olblak.com>
Co-authored-by: Olivier Vernin <olivier@vernin.me>
Co-authored-by: Olblak <me@olblak.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants