Skip to content

fix: YAML resource should support file URI starting with fttp://, http://, https://#846

Merged
olblak merged 8 commits into
updatecli:mainfrom
olblak:fixYamlPath
Sep 10, 2022
Merged

fix: YAML resource should support file URI starting with fttp://, http://, https://#846
olblak merged 8 commits into
updatecli:mainfrom
olblak:fixYamlPath

Conversation

@olblak

@olblak olblak commented Sep 6, 2022

Copy link
Copy Markdown
Member

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

Comment thread pkg/plugins/resources/yaml/source.go Outdated
Comment thread pkg/plugins/resources/yaml/target.go Outdated
Comment thread pkg/plugins/resources/yaml/utils.go Outdated
@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

olblak commented Sep 10, 2022

Copy link
Copy Markdown
Member Author

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>
Comment thread pkg/plugins/resources/yaml/condition.go Outdated
Comment thread pkg/plugins/resources/yaml/source.go Outdated
Comment thread pkg/plugins/resources/yaml/utils.go Outdated
Comment thread pkg/plugins/resources/yaml/utils.go Outdated
Comment thread pkg/plugins/resources/yaml/utils_test.go Outdated
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

olblak commented Sep 10, 2022

Copy link
Copy Markdown
Member Author

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

@hervelemeur

Copy link
Copy Markdown
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>
@olblak olblak deleted the fixYamlPath branch June 12, 2025 13:33
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.

3 participants