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

Add Toml support #889

Merged
merged 21 commits into from
Sep 27, 2022
Merged

Add Toml support #889

merged 21 commits into from
Sep 27, 2022

Conversation

olblak
Copy link
Member

@olblak olblak commented Sep 24, 2022

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

Add support to toml for source/condition/target

#870

Fix #XXX

Test

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

cp pkg/plugins/resources/toml
go test

Additional Information

Tradeoff

Same approach than #885
I am leveraging Dasel

Potential improvement

Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
@olblak olblak marked this pull request as draft September 24, 2022 12:00
@olblak olblak changed the title Add plugin Toml support Add Toml support Sep 24, 2022
@olblak
Copy link
Member Author

olblak commented Sep 24, 2022

I need to test if Dasel preserve Toml comments

@olblak
Copy link
Member Author

olblak commented Sep 24, 2022

I need to test if Dasel preserve Toml comments

Well it doesn't

olblak and others added 3 commits September 24, 2022 20:13
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
@olblak olblak marked this pull request as ready for review September 24, 2022 18:18
olblak and others added 7 commits September 26, 2022 08:57
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
@olblak
Copy link
Member Author

olblak commented Sep 27, 2022

I played a bit with the multiple update which is super powerfull. I already works for target, I'll add support for condition but I don't think of a usage for source

Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
@olblak
Copy link
Member Author

olblak commented Sep 27, 2022

Well after additional thought, I think I need a new boolean to enable/disable the multiple query because in the case of the following query, we can't guess automatically the meaning

Should .employees.[*].role

  1. Return the value for key .employees.[*].role
  2. Return "role" value for all employees

I am considering adding a spec parameter named "multipe" to enable multiple query, with default set to false

Signed-off-by: Olblak <me@olblak.com>
@olblak
Copy link
Member Author

olblak commented Sep 27, 2022

So I decided to add the flag multiple to enable multiple queries at once

@olblak olblak merged commit 149ef37 into updatecli:main Sep 27, 2022
@olblak olblak added the enhancement New feature or request label Sep 28, 2022
@olblak olblak deleted the tomlResource branch September 28, 2022 06:43
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