Skip to content
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

Create envd context for users #2266

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Create envd context for users #2266

merged 1 commit into from
Mar 26, 2024

Conversation

pingsutw
Copy link
Member

@pingsutw pingsutw commented Mar 14, 2024

Tracking issue

NA

Why are the changes needed?

When pushing an image to the local registry, Users have to create a new envd context by themself.
if they terminate the sandbox, they must switch to another context.

envd context create --name flyte-sandbox --builder tcp --builder-address localhost:30003 --use

What changes were proposed in this pull request?

Create a new context for users when they're trying to push an image to the local registry.

How was this patch tested?

Local

Setup process

flytectl demo start
from flytekit import task, workflow, ImageSpec

image = ImageSpec(registry="localhost:30000", packages=["pandas"])


@task(container_image=image)
def t1() -> int:
    return 3 + 2


@task(container_image=image)
def t2(a: int) -> int:
    return a + 3


@workflow
def wf(a: int = 3):
    t1()
    t2(a=a)

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

NA

Docs link

NA

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 14, 2024
Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 75.86207% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 83.30%. Comparing base (d61e79e) to head (c1faf76).

Files Patch % Lines
...lytekit-envd/flytekitplugins/envd/image_builder.py 75.86% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2266      +/-   ##
==========================================
- Coverage   83.31%   83.30%   -0.01%     
==========================================
  Files         309      309              
  Lines       24050    24062      +12     
  Branches     3491     3491              
==========================================
+ Hits        20038    20046       +8     
- Misses       3386     3389       +3     
- Partials      626      627       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Future-Outlier Future-Outlier left a comment

Choose a reason for hiding this comment

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

LGTM, it works to me.
image

I've used envd context rm --name flyte-sandbox and then built the image.

after using local registry.

image

after using docker remote registry.

image

@dosubot dosubot bot added the lgtm This PR has been approved by maintainer label Mar 14, 2024
@pingsutw pingsutw merged commit 53299d6 into master Mar 26, 2024
45 of 47 checks passed
fiedlerNr9 pushed a commit that referenced this pull request Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants