fix: [Core] Deployment resolution selects running targets#892
Open
rpanackal wants to merge 6 commits into
Open
fix: [Core] Deployment resolution selects running targets#892rpanackal wants to merge 6 commits into
rpanackal wants to merge 6 commits into
Conversation
| .extracting(AiDeployment::getId, AiDeployment::getTargetStatus) | ||
| .contains( | ||
| tuple("d2a491b5010620b0", AiDeployment.TargetStatusEnum.STOPPED), | ||
| tuple("d4b1396b84c1944d", AiDeployment.TargetStatusEnum.RUNNING)); |
Collaborator
There was a problem hiding this comment.
Why yould the cache contain the STOPPED deployment?
Member
Author
There was a problem hiding this comment.
Because the cache loads all deployments as returned by Deployments API. Currently, the cache is for all deployments under a resource group.
But you are right. We can load the cache selectively instead.
Essentially, instead of caching all deployments, we could only cache RUNNING deployments
Member
Author
There was a problem hiding this comment.
Is that preferrable to you? Do you see any logic that relies on the cache being an exhaustive list of deployments that might break?
I am a bit skeptical about touching a global cache,
Collaborator
There was a problem hiding this comment.
No reason to cache deployments that can't be used
…nto fix/resolve-to-running-deploy
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.
Context
Deployment resolution at the moment picks the first deployment under given predicate. A predicate being a scenario, or model. This do not check for the status of the deployment. Therefore, if there are stopped deployments, it might be selected to construct the deployment url.
Feature scope:
Note: Regular "status" points to the current status, but not the target state. "targetStatus" points to the expected state of the deployment avoiding the situation where a deployment get picked that will soon be obselete.
Definition of Done
Error handling created / updated & covered by the tests aboveAligned changes with the JavaScript SDKRelease notes updated