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

Unify dependencies in agent image #3008

Merged
merged 4 commits into from
Dec 17, 2024

Conversation

eapolinario
Copy link
Collaborator

Why are the changes needed?

We're installing potentially incompatible grpcio dependencies in the flyetagent image.

What changes were proposed in this pull request?

Installs all dependencies in a single invocation of uv pip install in the flyetagent image. We also add a test at publish-time to confirm that agents can start.

How was this patch tested?

Local builds.

Setup process

Screenshots

Check all the applicable boxes

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

Related PRs

Docs link

Signed-off-by: Eduardo Apolinario <[email protected]>
….io/flyteorg/flyteagent:1.14.0 pyflyte serve agent --port 8000 --timeout 1` in a gh workflow works

Signed-off-by: Eduardo Apolinario <[email protected]>
@eapolinario
Copy link
Collaborator Author

I confirmed that the command works here. We get this error if we try to start the flyteagent image:

docker run --rm ghcr.io/flyteorg/flyteagent:1.14.0 pyflyte serve agent --port 8000 --timeout 1
...
│ /usr/local/lib/python3.10/site-packages/grpc_health/v1/health_pb2_grpc.py:19 │
│ in <module>                                                                  │
│                                                                              │
│    16 │   _version_not_supported = True                                      │
│    17                                                                        │
│    18 if _version_not_supported:                                             │
│ ❱  19 │   raise RuntimeError(                                                │
│    20 │   │   f'The grpc package installed is at version {GRPC_VERSION},'    │
│    21 │   │   + f' but the generated code in grpc_health/v1/health_pb2_grpc. │
│    22 │   │   + f' grpcio>={GRPC_GENERATED_VERSION}.'                        │
╰──────────────────────────────────────────────────────────────────────────────╯
RuntimeError: The grpc package installed is at version 1.67.1, but the generated
code in grpc_health/v1/health_pb2_grpc.py depends on grpcio>=1.68.1. Please 
upgrade your grpc module to grpcio>=1.68.1 or downgrade your generated code 
using grpcio-tools<=1.67.1.
...

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 35.95%. Comparing base (f99d50e) to head (747b82a).
Report is 6 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (f99d50e) and HEAD (747b82a). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (f99d50e) HEAD (747b82a)
2 1
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3008       +/-   ##
===========================================
- Coverage   51.08%   35.95%   -15.13%     
===========================================
  Files         201      201               
  Lines       21231    21168       -63     
  Branches     2731     2728        -3     
===========================================
- Hits        10846     7612     -3234     
- Misses       9787    13448     +3661     
+ Partials      598      108      -490     

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

@eapolinario eapolinario merged commit b3428e7 into master Dec 17, 2024
104 of 105 checks passed
eapolinario added a commit that referenced this pull request Dec 17, 2024
* Install all flyteagent image dependencies in a single command

Signed-off-by: Eduardo Apolinario <[email protected]>

* test - Can I run docker commands in gh workflows?

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove `-it` flag from `docker run`

Signed-off-by: Eduardo Apolinario <[email protected]>

* Remove quick test after confirming that running `docker run --rm ghcr.io/flyteorg/flyteagent:1.14.0 pyflyte serve agent --port 8000 --timeout 1` in a gh workflow works

Signed-off-by: Eduardo Apolinario <[email protected]>

---------

Signed-off-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants