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

yaml target should be able to parse key containing dots #1148

Merged
merged 2 commits into from
Feb 10, 2023

Conversation

olblak
Copy link
Member

@olblak olblak commented Feb 10, 2023

#650 introduce a regression where a yaml target wouldn't correctly parse yaml key using dots

Test

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

cd pkg/plugins/resources/yaml/
go test

Additional Information

Tradeoff

Potential improvement

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

ghost commented Feb 10, 2023

👇 Click on the image for a new way to code review
  • Make big changes easier — review code in small groups of related files

  • Know where to start — see the whole change at a glance

  • Take a code tour — explore the change with an interactive tour

  • Make comments and review — all fully sync’ed with github

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

@olblak olblak changed the title Fix yaml regession yaml target should be able to parse key containing dots Feb 10, 2023
@olblak olblak enabled auto-merge (squash) February 10, 2023 18:56
@olblak olblak added bug Something isn't working resource-yaml Resource of kind YAML target Related to updatecli target labels Feb 10, 2023
@olblak olblak merged commit f4f255d into updatecli:main Feb 10, 2023
@hervelemeur
Copy link
Contributor

I must have failed to integrate #906 during the long lifetime of #650

@olblak
Copy link
Member Author

olblak commented Feb 10, 2023

I must have failed to integrate #906 during the long lifetime of #650

Yup those happens :-)

Comment on lines +24 to +45
{
name: "Passing Case with 'File' and complex key",
spec: Spec{
File: "test.yaml",
Key: "annotations.github\\.owner",
},
files: map[string]string{
"test.yaml": "",
},
inputSourceValue: "olblak",
mockedContents: map[string]string{
"test.yaml": `---
annotations:
github.owner: olblak
repository: charts
`,
},
wantedContents: map[string]string{
"test.yaml": "olblak",
},
isResultWanted: true,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unit tests ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resource-yaml Resource of kind YAML target Related to updatecli target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants