Release/v3.0.0 - Account level objects #51
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Fixed git ignore issue with dir snowflake
There was a problem hiding this comment.
Pull request overview
This pull request introduces support for account-level objects in DLSync, representing a significant architectural enhancement. The changes add the ability to manage Snowflake account-level objects (databases, schemas, roles, warehouses, integrations, policies, etc.) alongside existing database-level objects.
Changes:
- Refactored the Script class hierarchy to introduce
SchemaScriptandAccountScriptas distinct types, removing the previousStateScriptclass - Added support for 11 new account-level object types including databases, schemas, roles, warehouses, and various integration/policy types
- Updated the parser and tokenizer to handle both account-level and schema-level scripts with appropriate parsing logic
- Modified dependency resolution and script management to accommodate the new object hierarchy
- Enhanced documentation to reflect the new "declarative script" terminology and account-level object support
Reviewed changes
Copilot reviewed 41 out of 42 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/snowflake/dlsync/models/Script.java | Refactored base class to remove database/schema fields, added abstract methods for polymorphic behavior |
| src/main/java/com/snowflake/dlsync/models/SchemaScript.java | New class for database-scoped objects with database and schema properties |
| src/main/java/com/snowflake/dlsync/models/AccountScript.java | New class for account-level objects without database/schema scope |
| src/main/java/com/snowflake/dlsync/models/MigrationScript.java | Updated to use parent script reference instead of inline database/schema fields |
| src/main/java/com/snowflake/dlsync/models/ScriptObjectType.java | Added 11 new account-level object types with level and migration metadata |
| src/main/java/com/snowflake/dlsync/models/StateScript.java | Removed - replaced by declarative script pattern |
| src/main/java/com/snowflake/dlsync/models/TestScript.java | Updated constructor to work with new Script hierarchy |
| src/main/java/com/snowflake/dlsync/parser/SqlTokenizer.java | Added parseAccountScript method, dynamic DDL regex building, and improved object name extraction |
| src/main/java/com/snowflake/dlsync/parser/ParameterInjector.java | Updated to handle SchemaScript casting for parametrization |
| src/main/java/com/snowflake/dlsync/doa/ScriptSource.java | Added getScriptsInAccount method and account script file creation |
| src/main/java/com/snowflake/dlsync/doa/ScriptRepo.java | Updated to work with SchemaScript type, renamed migration retrieval method |
| src/main/java/com/snowflake/dlsync/ScriptFactory.java | Updated factory methods to create appropriate script types |
| src/main/java/com/snowflake/dlsync/dependency/DependencyExtractor.java | Removed legacy code, updated to use resolveObjectReference |
| src/test/java/com/snowflake/dlsync/parser/SqlTokenizerTest.java | Updated all tests to use new parseSchemaScript method and SchemaScript type |
| src/test/java/com/snowflake/dlsync/dependency/DependencyExtractorTest.java | Updated tests to work with SchemaScript and new factory methods |
| example_scripts/main/ACCOUNT/* | Added 14 example scripts demonstrating account-level object usage |
| README.md | Comprehensive documentation updates explaining account-level objects, new terminology, and privilege requirements |
| CHANGELOG.md | Version 3.0.0 release notes |
| gradle.properties | Version bump to 3.0.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Added unit test and fixed example scripts
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 45 out of 47 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Added support for account level objects