Skip to content

refactor state visitor code and lifecycle hooks#7650

Merged
thrau merged 1 commit intomasterfrom
persistence-refactoring
Feb 15, 2023
Merged

refactor state visitor code and lifecycle hooks#7650
thrau merged 1 commit intomasterfrom
persistence-refactoring

Conversation

@thrau
Copy link
Member

@thrau thrau commented Feb 8, 2023

This PR includes some minor refactoring (mostly moving and renaming) of code related to persistence, state, and the visitors.

  • Introduce localstack.state for the state API (which are the base abstractions for disk-based persistence and pods)
  • Extracted a comprehensive StateLifecyleHook that will be used in the future
  • Made ServiceLifecycleHook extend from that
  • let Service implement the accept_state_visitor (pre-requisite for follow-up code)
  • Removed unused BackendStateLifecycle (now StateLifecycleHook as originally intended)

@thrau thrau requested a review from giograno February 8, 2023 22:57
@thrau thrau temporarily deployed to localstack-ext-tests February 8, 2023 22:57 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Feb 8, 2023

LocalStack integration with Pro

       3 files  ±0         3 suites  ±0   1h 28m 6s ⏱️ -9s
1 726 tests ±0  1 368 ✔️ ±0  358 💤 ±0  0 ±0 
2 440 runs  ±0  1 742 ✔️ ±0  698 💤 ±0  0 ±0 

Results for commit d2d5769. ± Comparison against base commit 14675b0.

♻️ This comment has been updated with latest results.

@thrau thrau force-pushed the persistence-refactoring branch from 716cc23 to 6554e81 Compare February 9, 2023 09:54
@thrau thrau temporarily deployed to localstack-ext-tests February 9, 2023 09:54 — with GitHub Actions Inactive
@thrau thrau temporarily deployed to localstack-ext-tests February 9, 2023 12:08 — with GitHub Actions Inactive
@thrau
Copy link
Member Author

thrau commented Feb 9, 2023

pro tests actually passed as well

@thrau thrau force-pushed the persistence-refactoring branch from 6554e81 to bb8c0d8 Compare February 13, 2023 19:28
@thrau thrau temporarily deployed to localstack-ext-tests February 13, 2023 19:28 — with GitHub Actions Inactive
Copy link
Member

@giograno giograno left a comment

Choose a reason for hiding this comment

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

All good! Thanks for kicking this off!

def is_enabled(self):
return True

def accept_state_visitor(self, visitor: StateVisitor):
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the missing link 👍

@thrau thrau force-pushed the persistence-refactoring branch from bb8c0d8 to 4695139 Compare February 14, 2023 13:47
@thrau thrau temporarily deployed to localstack-ext-tests February 14, 2023 13:47 — with GitHub Actions Inactive
@thrau thrau force-pushed the persistence-refactoring branch from 4695139 to d2d5769 Compare February 15, 2023 11:26
@thrau thrau temporarily deployed to localstack-ext-tests February 15, 2023 11:26 — with GitHub Actions Inactive
@thrau thrau merged commit 0448c07 into master Feb 15, 2023
@thrau thrau deleted the persistence-refactoring branch February 15, 2023 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants