-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moved Snowpark and Streamlit artifacts to separate directory in outpu… #1909
Moved Snowpark and Streamlit artifacts to separate directory in outpu… #1909
Conversation
6b61c7f
to
20a232b
Compare
7fd63d2
to
7735878
Compare
@property | ||
def deploy_root(self) -> Path: | ||
return self.project_root / "output" / "deploy" / "snowpark" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This path is build in multiple places in repeated manner.
How about creating a common tool for a deploy root path
from pathlib import Path
def deploy_root(root: Path, app_type: str | None = None) -> Path:
if app_type:
return root / "output" / "deploy" / app_type
return root / "output" / "deploy"
@property
def deploy_root(self) -> Path:
return deploy_root(self.project_root, "snowpark")
@property
def deploy_root(self) -> Path:
return deploy_root(self.project_root, "streamlit")
@property
def deploy_root(self) -> Path:
return deploy_root(self.project_root)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
7735878
to
877d282
Compare
def deploy_root(root: Path, app_type: str | None = None) -> Path: | ||
if app_type: | ||
return root / "output" / "deploy" / app_type | ||
return root / "output" / "deploy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Native apps have made this a configurable property in snowflake.yml since day 1. I think all domains should support that as well.
- This isn't resilient to having multiple entities of the same type, which is a big deal if we start deploying multiple entities in a dependency chain. I think we should either use
output/deploy
, as native apps do, for all domains now (it's consistent and simple for now), or makeoutput/deploy/<entity id>
work across the board. That last one is probably significantly bigger in terms of implementation however.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I will add.
- You mean to mix artifacts from all entities in
output/deploy
? I addedoutput/deploy/snowpark
andoutput/deploy/streamlit
to separate artifacts for each entity type, to keep similar solution what we have right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there won't be any mixing, each bundle/deploy step should wipe out output/deploy
. Segregating by type doesn't buy us anything since multiple entities for the same type could have conflicting artifacts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About #1, I factored out the model portion on our feature branch already.
c20fb7c
to
d181eb7
Compare
d181eb7
to
fe16b12
Compare
55c6c62
to
785a4a9
Compare
85d1c72
to
9cb87b3
Compare
785a4a9
to
c369f7e
Compare
bf62cfb
into
features/unification-artifacts
#1909) Moved Snowpark and Streamlit artifacts to separate directory in output/deploy
#1909) Moved Snowpark and Streamlit artifacts to separate directory in output/deploy
…t/bundle
Pre-review checklist
Changes description
Moved Snowpark and Streamlit artifacts to separate directory in output/bundle