-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't output default native_app fields in v1 to v2 migration (#1632)
- Loading branch information
1 parent
20cec62
commit 507e5f3
Showing
14 changed files
with
235 additions
and
49 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Empty file.
16 changes: 16 additions & 0 deletions
16
tests/test_data/projects/migration_all_app_entities/app.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from __future__ import annotations | ||
|
||
import sys | ||
|
||
|
||
def hello(name: str) -> str: | ||
return f"Hello {name}!" | ||
|
||
|
||
# For local debugging. Be aware you may need to type-convert arguments if | ||
# you add input parameters | ||
if __name__ == "__main__": | ||
if len(sys.argv) > 1: | ||
print(hello(sys.argv[1])) # type: ignore | ||
else: | ||
print(hello("world")) |
4 changes: 4 additions & 0 deletions
4
tests/test_data/projects/migration_all_app_entities/app/README.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# README | ||
|
||
This directory contains an extremely simple application that is used for | ||
integration testing SnowCLI. |
18 changes: 18 additions & 0 deletions
18
tests/test_data/projects/migration_all_app_entities/app/manifest.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# This is a manifest.yml file, a required component of creating a native application. | ||
# This file defines properties required by the application package, including the location of the setup script and version definitions. | ||
# Refer to https://docs.snowflake.com/en/developer-guide/native-apps/creating-manifest for a detailed understanding of this file. | ||
|
||
manifest_version: 1 | ||
|
||
version: | ||
name: dev | ||
label: "Dev Version" | ||
comment: "Default version used for development. Override for actual deployment." | ||
|
||
artifacts: | ||
setup_script: setup.sql | ||
readme: README.md | ||
|
||
configuration: | ||
log_level: INFO | ||
trace_level: ALWAYS |
19 changes: 19 additions & 0 deletions
19
tests/test_data/projects/migration_all_app_entities/app/setup.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
create application role if not exists app_public; | ||
create or alter versioned schema core; | ||
|
||
create or replace procedure core.echo(inp varchar) | ||
returns varchar | ||
language sql | ||
immutable | ||
as | ||
$$ | ||
begin | ||
return inp; | ||
end; | ||
$$; | ||
|
||
grant usage on procedure core.echo(varchar) to application role app_public; | ||
|
||
create or replace view core.shared_view as select * from my_shared_content.shared_table; | ||
|
||
grant select on view core.shared_view to application role app_public; |
1 change: 1 addition & 0 deletions
1
tests/test_data/projects/migration_all_app_entities/scripts/post_app_deploy.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
select 1; |
1 change: 1 addition & 0 deletions
1
tests/test_data/projects/migration_all_app_entities/scripts/post_pkg_deploy.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
select 1; |
32 changes: 32 additions & 0 deletions
32
tests/test_data/projects/migration_all_app_entities/snowflake.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
definition_version: 1 | ||
native_app: | ||
name: myapp | ||
source_stage: app_src.my_stage | ||
scratch_stage: app_src.my_scratch | ||
bundle_root: my_output/my_bundle | ||
deploy_root: my_output/my_deploy | ||
generated_root: __my_generated_files | ||
artifacts: | ||
- src: app/* | ||
dest: ./ | ||
- src: to_process/* | ||
dest: ./ | ||
processors: | ||
- native app setup | ||
- name: templates | ||
properties: | ||
foo: bar | ||
package: | ||
name: my_app_package | ||
role: pkg_role | ||
warehouse: pkg_wh | ||
distribution: external | ||
scripts: | ||
- scripts/post_pkg_deploy.sql | ||
application: | ||
name: myapp_app | ||
role: app_role | ||
warehouse: app_wh | ||
debug: true | ||
post_deploy: | ||
- sql_script: scripts/post_app_deploy.sql |
Empty file.
This file contains 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