Skip to content

Release/v3.0.0 - Account level objects #51

Merged
sfc-gh-yhailu merged 8 commits intomainfrom
release/v3.0.0
Jan 23, 2026
Merged

Release/v3.0.0 - Account level objects #51
sfc-gh-yhailu merged 8 commits intomainfrom
release/v3.0.0

Conversation

@sfc-gh-yhailu
Copy link
Collaborator

Added support for account level objects

@snyk-io
Copy link
Contributor

snyk-io bot commented Jan 20, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 SchemaScript and AccountScript as distinct types, removing the previous StateScript class
  • 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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@sfc-gh-yhailu sfc-gh-yhailu merged commit 044003d into main Jan 23, 2026
9 checks passed
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