Repository navigation
Allow ':' in secret option values and reject malformed parameters - #40619
Conversation
In Python's Secret.parse_secret_option, split each parameter on the first ':' only, so values such as ARNs and URLs are kept intact instead of being silently dropped. Java's Secret.parseSecretOption already did this. In both SDKs, a parameter without ':' now raises an error instead of being ignored, and empty parameters (e.g. from a trailing ';') are skipped.
|
r: @stankiewicz since #40579 is a use case of |
There was a problem hiding this comment.
📋 Review Summary
This PR updates Secret.parse_secret_option in Python to split secret parameters on the first : only (matching Java's behavior) so values containing colons such as ARNs and URLs are preserved. It also updates both Java and Python implementations to skip empty parameters (e.g., from trailing semicolons) and raise an exception when a parameter is missing a : separator.
🔍 General Feedback
- The changes across both Java and Python SDKs are clean, consistent, well-documented, and well-tested with unit tests covering colons in values, trailing semicolons, and malformed parameters.
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40619 +/- ##
=============================================
+ Coverage 56.16% 71.48% +15.31%
- Complexity 2288 13984 +11696
=============================================
Files 1124 2217 +1093
Lines 178336 191020 +12684
Branches 1489 11307 +9818
=============================================
+ Hits 100170 136552 +36382
+ Misses 75645 50263 -25382
- Partials 2521 4205 +1684
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
|
There are compilation failure in workflow |
In Python's
Secret.parse_secret_option, split each parameter on the first ':' only, so values such as ARNs and URLs are kept intact instead of being silently dropped. Java'sSecret.parseSecretOptionalready did this, so no change on that front.In both SDKs, a parameter without ':' now raises an error instead of being ignored, and empty parameters (e.g. from a trailing ';') are skipped.