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

Allow multiple query combined with versionfilter to toml source #963

Merged
merged 3 commits into from
Nov 7, 2022

Conversation

olblak
Copy link
Member

@olblak olblak commented Nov 5, 2022

Signed-off-by: Olblak me@olblak.com
As discussed on #942 (comment)
I realized that it would be super usefull to be able to do a multiple query combined with versionfilter on the toml resource

This pullrequest allows the following manifest to work

Example

sources:
  ports:
    name: Get sorted ports
    kind: toml
    spec:
      file: pkg/plugins/resources/toml/testdata/data.toml
      query: database.ports.[*]
      versionfilter:
        kind: semver

Example

++++++++++++
+ PIPELINE +
++++++++++++



######################
# BASIC TOML EXAMPLE #
######################


SOURCES
=======

ports
-----
Searching for version matching pattern "*"
✔ Value "8002", found in file "/home/olblak/Projects/Updatecli/updatecli/pkg/plugins/resources/toml/testdata/data.toml", for key "database.ports.[*]"'

Test

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

cd pkg/plugins/resources/toml
go test

Additional Information

Tradeoff

Similar to the Json approach, I am deprecating the parameter multiple in favor of query

Potential improvement

@olblak olblak added enhancement New feature or request resource-toml labels Nov 5, 2022
@olblak olblak added this to the 0.37.0 milestone Nov 5, 2022
@olblak olblak merged commit 7eee174 into updatecli:main Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request resource-toml
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant