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

Fix map unflattening no-delimiter behaviour #278

Merged
merged 2 commits into from
Apr 3, 2024
Merged

Fix map unflattening no-delimiter behaviour #278

merged 2 commits into from
Apr 3, 2024

Conversation

knadh
Copy link
Owner

@knadh knadh commented Mar 9, 2024

@rhnvrm please take a look at the commit that fixes the undefined variable delim. I'm wondering how all the tests were passing despite maps_test.go having a compile error.

Closes #275

@rhnvrm rhnvrm changed the title Fix map unflattening no-delimiter behaviour. Closes #275. Fix map unflattening no-delimiter behaviour Mar 10, 2024
rhnvrm
rhnvrm previously requested changes Mar 10, 2024
Copy link
Collaborator

@rhnvrm rhnvrm left a comment

Choose a reason for hiding this comment

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

When tests run, they run for the whole package. Since delim is defined in koanf_test.go file, we need to run both files while testing.

image

We should not remove the delim constant from maps_test.go in my opinion and use the same constant delim.

Maybe we can add a new test with empty delim for checking the edited logic.

@knadh knadh dismissed rhnvrm’s stale review April 3, 2024 07:13

This is fixed.

@knadh knadh merged commit 5c37bab into master Apr 3, 2024
8 checks passed
codeboten added a commit to open-telemetry/opentelemetry-collector that referenced this pull request Apr 9, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/knadh/koanf/v2](https://togithub.com/knadh/koanf) |
`v2.1.0` -> `v2.1.1` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fknadh%2fkoanf%2fv2/v2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fknadh%2fkoanf%2fv2/v2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fknadh%2fkoanf%2fv2/v2.1.0/v2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fknadh%2fkoanf%2fv2/v2.1.0/v2.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>knadh/koanf (github.com/knadh/koanf/v2)</summary>

### [`v2.1.1`](https://togithub.com/knadh/koanf/releases/tag/v2.1.1)

[Compare
Source](https://togithub.com/knadh/koanf/compare/v2.1.0...v2.1.1)

#### What's Changed

- fix: run submodule tests by
[@&#8203;rhnvrm](https://togithub.com/rhnvrm) in
[knadh/koanf#276
- Bump google.golang.org/protobuf from 1.30.0 to 1.33.0 in /examples by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[knadh/koanf#282
- Bump google.golang.org/protobuf from 1.30.0 to 1.33.0 in
/providers/etcd by [@&#8203;dependabot](https://togithub.com/dependabot)
in
[knadh/koanf#281
- Bump google.golang.org/protobuf from 1.30.0 to 1.33.0 in
/providers/nats by [@&#8203;dependabot](https://togithub.com/dependabot)
in
[knadh/koanf#280
- feat: add ParserEnvWithValue by
[@&#8203;tlipoca9](https://togithub.com/tlipoca9) in
[knadh/koanf#284
- Fix map unflattening no-delimiter behaviour by
[@&#8203;knadh](https://togithub.com/knadh) in
[knadh/koanf#278

#### New Contributors

- [@&#8203;tlipoca9](https://togithub.com/tlipoca9) made their first
contribution in
[knadh/koanf#284

**Full Changelog**:
knadh/koanf@v2.1.0...v2.1.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any
time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

koanf.Unmarshal doesn't work when loaded with env provider
2 participants