Skip to content

Add Toml support#889

Merged
olblak merged 21 commits into
updatecli:mainfrom
olblak:tomlResource
Sep 27, 2022
Merged

Add Toml support#889
olblak merged 21 commits into
updatecli:mainfrom
olblak:tomlResource

Conversation

@olblak

@olblak olblak commented Sep 24, 2022

Copy link
Copy Markdown
Member

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

olblak commented Sep 24, 2022

Copy link
Copy Markdown
Member Author

I need to test if Dasel preserve Toml comments

@olblak

olblak commented Sep 24, 2022

Copy link
Copy Markdown
Member Author

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
Comment thread e2e/updatecli.d/success.d/toml.yaml Outdated
Comment thread pkg/plugins/resources/toml/spec.go Outdated
Comment thread pkg/plugins/resources/toml/spec.go Outdated
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

olblak commented Sep 27, 2022

Copy link
Copy Markdown
Member Author

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

olblak commented Sep 27, 2022

Copy link
Copy Markdown
Member Author

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

olblak commented Sep 27, 2022

Copy link
Copy Markdown
Member Author

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.

1 participant