chore: move janitor functions to janitor.py#5510
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR moves janitor functions from the sqlmesh.core.state_sync.common module to a new dedicated sqlmesh.core.janitor module, following discussions in PR #5486. This refactoring improves code organization by centralizing cleanup functionality.
Key changes:
- Creates a new
sqlmesh.core.janitormodule containingcleanup_expired_viewsanddelete_expired_snapshotsfunctions - Moves associated test functions to
tests.core.test_janitor - Updates imports throughout the codebase to reference the new module location
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tests/core/test_janitor.py |
New test file containing moved janitor function tests |
tests/core/state_sync/test_state_sync.py |
Removed janitor-related tests and cleaned up unused imports |
sqlmesh/core/state_sync/common.py |
Removed janitor functions and their dependencies |
sqlmesh/core/state_sync/__init__.py |
Removed cleanup_expired_views import |
sqlmesh/core/janitor.py |
New module containing moved janitor functions |
sqlmesh/core/context.py |
Updated imports to use new janitor module |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
1e5cee5 to
e2fed7e
Compare
e2fed7e to
4147dcc
Compare
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.
Follow up from this discussion: #5486 (comment)