Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing Eval State Only if Changed in AVS #769

Merged
merged 6 commits into from
May 22, 2024

Conversation

ralikio
Copy link
Member

@ralikio ralikio commented May 16, 2024

Description
Orchestration logic in KEB keeps AVS maintenance mode in operation's Instance Details in operation.Avs.AvsInternalEvaluationStatus in its Original and Current fields.

Current behaviour is as follows:

  1. Orchestration is initiated.
  2. KEB creates first operation for given instance - instance details field on operation is initialized with the value from a previous operation - current Instance details status is ACTIVE and original one is not important at this point.
  3. KEB call setMaintenanceStatus method
  4. In the set maintenance call - KEB refreshes current AVS state by calling AVS client.
  5. In the set maintenance call - If state is different then current KEB state then KEB sets maintenance mode in AVS client.
  6. In the set maintenance call - Regardless of the change in instance details state KEB sets maintenance mode on current operation's Instance Details.
  7. Current Instance details status is MAINTENANCE and original one is ACTIVE
  8. Operation Failes.
  9. Orchestration is retries, new operation is created,
  10. KEB repeats points 4 and 5.
  11. Current Instance details status is MAINTENANCE and previous one is MAINTENANCE
  12. On operation success KEB sets maintenance mode to previous value which is MAINTENANCE

The following fix corrects this behaviour by invoking evalAssistant.SetEvalStatus(lifecycleData, status) only if current KEB state is different then AVS state.
Related issue(s)

@ralikio ralikio added the kind/bug Categorizes issue or PR as related to a bug. label May 16, 2024
@ralikio ralikio requested a review from a team as a code owner May 16, 2024 07:18
@kyma-bot kyma-bot added the cla: yes Indicates the PR's author has signed the CLA. label May 16, 2024
Copy link

Add one of following labels

- kind/feature -> Use it when you want to submit a new feature

- kind/enhancement -> Use it when you modify or improve an existing feature

- kind/bug -> Use it when you fix a bug

@kyma-bot kyma-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 16, 2024
@ralikio ralikio added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 16, 2024
@ralikio ralikio requested a review from ebensom May 16, 2024 08:19
@kyma-bot kyma-bot added the lgtm Looks good to me! label May 16, 2024
@kyma-bot kyma-bot removed the lgtm Looks good to me! label May 16, 2024
@kyma-bot kyma-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 16, 2024
@kyma-bot kyma-bot added the lgtm Looks good to me! label May 16, 2024
@ralikio ralikio removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 20, 2024
@kyma-bot kyma-bot removed the lgtm Looks good to me! label May 20, 2024
@kyma-bot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@ralikio ralikio added the lgtm Looks good to me! label May 20, 2024
Copy link
Contributor

@szwedm szwedm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@kyma-bot kyma-bot merged commit 777264f into kyma-project:main May 22, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm Looks good to me! size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants