PAT-1866 Migrate vault-api-client onto php-api-client-base#514
Merged
Conversation
666151c to
6b5e44a
Compare
c87062c to
18b07e7
Compare
keboola-pr-reviewer-bot
left a comment
There was a problem hiding this comment.
Verdict: needs_human (risk 3/5) · profile ajda
reviewer returned a payload that failed validation.
18b07e7 to
1eb556f
Compare
Replace the duplicated transport/auth/retry/JSON plumbing with the shared
base lib. VariablesApiClient takes the storage token + tunable options as
flat constructor params (DI-friendly: logger autowired, scalars bound);
builds the authenticator internally and supplies vault's {code, error}
format via a standalone VaultErrorMessageResolver.
1eb556f to
6f5c772
Compare
…variables-resolver vault-api-client now requires php-api-client-base; as a downstream consumer, configuration-variables-resolver must declare it directly so the canonical path-repo dev version satisfies stability (it is also published on Packagist as stable).
af9a5d3 to
143c5aa
Compare
… configuration-variables-resolver vault-api-client dropped its ApiClientConfiguration (flattened into VariablesApiClient ctor params). Re-add the same config object locally so UnifiedConfigurationResolverFactory keeps its config-object constructor API and the previous default of 10 retries, mapping it onto the flat constructor.
143c5aa to
cf6d297
Compare
The migration onto php-api-client-base inadvertently dropped vault's historical default of 10 retries to the base client's 5. Restore 10 via a local constant; assert it via the constructor default (reflection) to avoid 10 real exponential-backoff retries in the suite.
5fc8225 to
597ffb3
Compare
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.
Release Notes
https://linear.app/keboola/issue/PAT-1866/unified-api-client-base
Depends on #513
Migrates
keboola/vault-api-clientonto the newkeboola/php-api-client-base, removing its own copy of the transport/auth/retry/JSON plumbing.VariablesApiClient's public methods are unchanged; the only consumer-facing change is that the optional configuration argument is nowKeboola\ApiClientBase\ApiClientConfiguration(callers update the import and pass an authenticator). Vault's{code, error}error-message format is preserved via anerrorMessageResolver, so exception messages are unchanged.Key changes:
ApiClient/ApiClientConfiguration/RetryDecider/Json/ResponseModelInterface/Exception\ClientException/Authentication\*; depend on the base via the monorepo path repository.VariablesApiClientcomposes the baseApiClient;Variables\Model\Variableimplements the baseResponseModelInterface.composer cigreen, PHPStan level max).Plans for customer communication
None.
Impact analysis
Breaking change for callers that construct
VariablesApiClientwith a configuration object: the type moves fromKeboola\VaultApiClient\ApiClientConfigurationtoKeboola\ApiClientBase\ApiClientConfiguration, and auth is supplied via aStorageApiTokenAuthenticator. Callers passing only(baseUrl, token)are unaffected. Released as a new major version. Cannot be released untilphp-api-client-baseis published (see PR #513).Change type
Refactoring
Justification
Deduplicate
vault-api-clientonto the unified API client base (PAT-1866).Deployment
Merge & automatic deploy.
Rollback plan
Revert of this PR.
Post release support plan
None.