Enforce CREATE IF NOT EXISTS across all app DDLs (closes #34)#35
Merged
Conversation
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.
Summary
Closes #34. Makes every
CREATEinapps/*/ddl/idempotent so app upgrades (which re-run the DDL against an existing database) don't fail withalready exists.CREATE OR REPLACE VIEW→CREATE VIEW IF NOT EXISTS.OR REPLACEdrops and recreates the view, breaking dependent MVs / dashboards during the recreate window;IF NOT EXISTSpreserves the view as a stable dependency.IF NOT EXISTSto the 3CREATE RANDOM STREAMfiles that were missing it.Idempotencysection with the rule, theudfexception (CREATE OR REPLACE FUNCTION— UDF bodies are what change on upgrade), and the two parser-level non-supporters (SYSTEM INSTALL PYTHON PACKAGE, anddb.-qualified UDF / format schema names). Added a Common Mistakes entry for the upgrade-failure symptom.1.0.1, added an SVG icon (Greek α on the standard pink→purple gradient), and refreshed the description to reflect all 10 implemented alphas (Machine Learning Feature Pipeline App #1, Feature/1 machine learning feature pipeline app #2, Hacker New Demo #3, add hacker news demo #4, Cisco ASA Log DDoS Demo #6, market data product filter for dashboard #9, update icons #12, update #22, ocsf: add OCSF security event analytics demo app #41, #54) instead of just two.1.0.2.1.1.1.Validation
Tested
CREATE … IF NOT EXISTSon the running Timeplus (proton 3.3.1-rc.9) for every framework resource type (stream,external_stream,mutable_stream,materialized_view,view,external_table,udf,task,alert,input,dictionary,format_schema,named_collection), plusrandom_streamand the access-control resources (user,role,row_policy,quota,settings_profile). All acceptIF NOT EXISTSand are idempotent on rerun. The only outlier in the framework's surface isSYSTEM INSTALL PYTHON PACKAGE, which the parser rejects — but it's idempotent on re-run, and the project convention is to declare Python deps inmanifest.yaml(python_packages:), not as DDL.Test plan
make build APP=alpha-101 && make build APP=market-data && make build APP=cisco-asa-ddos— all three packages build clean (verified locally)..tpappover the top — second install should succeed with noalready existserrors.