Fix Core retry API version after token renewal - #568
Merged
Conversation
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.
Fixes
Core::call()retry behavior after OAuth token renewal: when a request is repeated after anexpired_tokenresponse, the retry now preserves the originally requested API version instead of falling back toApiVersion::v1.Additional changes:
ApiVersion::v3is preserved across the expired-token retry path.timemanmobileandvibecodeconnectortoScope.Test plan
make oa-schema-build— passedmake lint-cs-fixer— passed, 0/1090 files fixablemake lint-rector— passedmake lint-phpstan— passed, 2453 files, no errorsmake lint-deptrac— passed, 0 violations, 0 errorsmake test-unit— passed, 1222 tests, 3338 assertionstestCallPreservesApiVersionAfterExpiredTokenRenewal— passed, 1 test, 2 assertionstests/Integration/Core/Credentials/ScopeTest.php— passed, 1 test, 1 assertionmake test-integration-core— attempted twice; blocked by an unrelated live Bitrix24 operation limit inBatchTraversableListTest::testSingleBatchWithDescSortingMoreduringtearDown()cleanup viacrm.contact.delete. The full-suite run reached 24 tests / 3174 assertions before that cleanup error, and the targeted retry reproduced the same external cleanup limit after 1 test / 2512 assertions.Leftover contacts from the failed live runs were cleaned up by filtering on the failed-run
ORIGINATOR_IDvalues; the final count check returnedfound=0for both values.Closes #544