[WIP] [Core] Token refresh via error #1357
Draft
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
What -
This PR holds within the scheduled refresh from the #1254 PR, this is a merge that also adds functionality for a custom retry invoked by the integration itself.
Why -
Instead of loading the configuration only on pod start, we aim to be able to periodically load the configuration and / or to load the details when we encounter an authentication error.
How -
This PR introduces an abstract class for Integration retry strategy and for refresh handling, while we aim to move the refresh
please note that the refresh from file was moved to the utils file at the core project, this way the integration will only ask to refresh the token without any consideration on how it is being implemented
tests were added as well
see additional details at task notion page: https://www.notion.so/Refresh-integration-configuration-from-file-part-A-1739be8ff7e380d5bcf7fd2442093f15?pvs=4
Type of change
Please leave one option from the following and delete the rest: