-
Notifications
You must be signed in to change notification settings - Fork 244
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
Run commands in imageSpec #1909
Conversation
Signed-off-by: Kevin Su <pingsutw@apache.org>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1909 +/- ##
==========================================
- Coverage 85.80% 85.69% -0.11%
==========================================
Files 313 297 -16
Lines 23278 22660 -618
Branches 3526 3476 -50
==========================================
- Hits 19973 19419 -554
+ Misses 2702 2642 -60
+ Partials 603 599 -4 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Kevin Su <pingsutw@apache.org>
does this go down the road a little bit of recreating what a dockerfile is? won't one day people want to add additional commands and stuff? i thought imagespec supported a full dockerfile does it not? |
It recreates a portion of Dockerfiles with a lot of structure. For example, you can't have multi-stage builds, you have commands run in arbitrary places. |
|
||
return new_image_spec | ||
|
||
def with_apt_packages(self, apt_packages: Union[str, List[str]]) -> "ImageSpec": |
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.
additional apt packages
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.
updated
new_image_spec.apt_packages = [] | ||
|
||
if isinstance(apt_packages, List): | ||
new_image_spec.apt_packages.extend(apt_packages) |
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.
why this difference?
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.
if apt_packages
is a str (single package), we cannot use extend. we have to use append here.
this is pretty cool, lets close on this |
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org> Signed-off-by: Rafael Raposo <rafaelraposo@spotify.com>
TL;DR
Add commands to ImageSpec, so people can download jars or any other packages.
Type
Are all requirements met?
Complete description
Another example for the spark task
Tracking Issue
https://github.com/flyteorg/flyte/issues/
Follow-up issue
NA