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

Reset workflow state to initial state after successful deprovision #635

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

dbwiddis
Copy link
Member

@dbwiddis dbwiddis commented Apr 2, 2024

Description

On successful deprovision, resets the workflow state to its initial state, rather than simply updating the fields.

Issues Resolved

Fixes #578

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions github-actions bot added the backport 2.x backport PRs to 2.x branch label Apr 2, 2024
Copy link

codecov bot commented Apr 2, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 72.33%. Comparing base (b246341) to head (fa1f103).

Files Patch % Lines
.../transport/DeprovisionWorkflowTransportAction.java 66.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #635      +/-   ##
============================================
- Coverage     72.36%   72.33%   -0.04%     
  Complexity      680      680              
============================================
  Files            82       82              
  Lines          3532     3528       -4     
  Branches        284      284              
============================================
- Hits           2556     2552       -4     
  Misses          850      850              
  Partials        126      126              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dbwiddis dbwiddis merged commit 33ea800 into opensearch-project:main Apr 2, 2024
31 of 32 checks passed
@dbwiddis dbwiddis deleted the reset-state branch April 2, 2024 20:46
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 2, 2024
)

Signed-off-by: Daniel Widdis <[email protected]>
(cherry picked from commit 33ea800)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
amitgalitz pushed a commit that referenced this pull request Apr 2, 2024
… deprovision (#643)

Reset workflow state to initial state after successful deprovision (#635)


(cherry picked from commit 33ea800)

Signed-off-by: Daniel Widdis <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@@ -246,7 +242,7 @@ private void updateWorkflowState(
Map.ofEntries(
Map.entry(STATE_FIELD, State.COMPLETED),
Map.entry(PROVISIONING_PROGRESS_FIELD, ProvisioningProgress.DONE),
Map.entry(PROVISION_START_TIME_FIELD, Instant.now().toEpochMilli()),
Map.entry(PROVISION_END_TIME_FIELD, Instant.now().toEpochMilli()),
Copy link
Member

@amitgalitz amitgalitz Apr 2, 2024

Choose a reason for hiding this comment

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

is there a new provision end time when we fail deprovisioning? Is the end time here not when the provisioning itself ends (last step is executed), unrelated to deprovisioning? cc: @dbwiddis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport PRs to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Deprovision doesn't remove the error field if it exists
4 participants