feat: adapt secret resolver for customization - #217
Merged
betinacosta merged 9 commits intoJul 14, 2026
Merged
Conversation
betinacosta
commented
Jul 8, 2026
betinacosta
marked this pull request as draft
July 8, 2026 18:44
betinacosta
marked this pull request as ready for review
July 9, 2026 16:19
Contributor
SDK Module Review
Findings (2)
2 finding(s): 1 posted as inline comment(s) on the affected lines, 1 not tied to a code line (listed above). Generated by sdk-review-skill · v1 |
tiagoek
added a commit
that referenced
this pull request
Jul 13, 2026
PR #217 (Betina) triggered BREAKING-01/02 + VER-01 because the breaking detector treated removal of test methods in TestSecretResolver as a public API deletion. Test classes (Test*, *Test, *TestCase) are not SDK API — their methods can be freely added, removed, or renamed without breaking consumers. Filter: extract_public_class_methods now skips class names matching the test class convention before extracting the method table.
tiagoek
reviewed
Jul 13, 2026
| try: | ||
| resolver.resolve(module, instance, target) | ||
| return | ||
| except Exception as e: |
Contributor
There was a problem hiding this comment.
[FLAG] PY-EL-02
except block does not end with raise — swallowing? Add re-raise or comment justifying suppression
Member
Author
There was a problem hiding this comment.
This exception will be raised at the end, with an aggregation of all resolution errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is the first of a series of PRs. I started by doing changes to secret resolver. I tested the changes using the destination module, but I will only modify the modules usage of secret resolver later.
Refactors the secret resolver module to expose a composable, class-based API alongside the existing legacy function. Users can now wire a custom resolver chain once at application startup via
configure(SdkConfig(resolver=...))and allcreate_client()calls across modules will use it automatically. The built-inMountResolverandEnvVarResolverclasses implement theResolverprotocol, andChainedResolvertries each in order — providing a clear extension point for custom sources (e.g. VCAP_SERVICES, HashiCorp Vault).The legacy
read_from_mount_and_fallback_to_env_varfunction is preserved for backwards compatibility. Internally it now delegates to the sameMountResolver/EnvVarResolverimplementations.Related Issue
Closes #
Type of Change
How to Test
Run the unit test suite:
pytest tests/core/unit/secret_resolver/Checklist