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

ConfigProvider: Even when it's unnecessary, KebabCase&snakeCase parse the key to lowercase. #8740

Closed
wi101 opened this issue Apr 12, 2024 · 6 comments · Fixed by #8878
Closed

Comments

@wi101
Copy link
Contributor

wi101 commented Apr 12, 2024

For a configuration that uses kebabCase that has a map with keys that have hexadecimal digits separated by colons. There is a Missing data error while reading the configuration because the keys were converted to lowerCase even it was unnecessary.

Example:

example {
  keys {
    "01:23:45:67:89:AB": "tak"
  }
}

Error:

Missing data at example.keys.01:23:45:67:89:ab: Expected example.keys.01:23:45:67:89:ab to be set in properties.
`
wi101 added a commit to wi101/scalaz-zio that referenced this issue Apr 12, 2024
@wi101 wi101 self-assigned this Apr 12, 2024
@wi101
Copy link
Contributor Author

wi101 commented Apr 18, 2024

I realised that the current implementation of kebab case is correct, it is expected to make the whole path lowercase, the issue is when the keys of a Map get changed, which supposed to be treated as constant values.

Example:

example {
 settings {
   "01:23:45:67:89:AB": "value1"
 }
}
  final case class ExampleConf(settings: Map[String, String])

@wi101 wi101 changed the title ConfigProvider: Even when it's unnecessary, KebabCase&snakeCase parse the path to lowercase. ConfigProvider: Even when it's unnecessary, KebabCase&snakeCase parse the key to lowercase. Apr 19, 2024
@wi101
Copy link
Contributor Author

wi101 commented Apr 19, 2024

@jdegoes Could you verify if this is a real issue or not?
#8740 (comment)
Sorry for the noise I wasn't sure who to ping

@wi101 wi101 removed their assignment Apr 30, 2024
@jdegoes
Copy link
Member

jdegoes commented May 8, 2024

/bounty $100

@wi101 Looks like a real issue to me!

Copy link

algora-pbc bot commented May 8, 2024

💎 $100 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #8740 with your implementation plan
  2. Submit work: Create a pull request including /claim #8740 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/zio!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @987Nabil #8878

Copy link

algora-pbc bot commented May 20, 2024

💡 @987Nabil submitted a pull request that claims the bounty. You can visit your bounty board to reward.

Copy link

algora-pbc bot commented May 21, 2024

🎉🎈 @987Nabil has been awarded $100! 🎈🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants