-
Notifications
You must be signed in to change notification settings - Fork 309
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
Support mounting secrets by default builder. #3082
base: master
Are you sure you want to change the base?
Conversation
Code Review Agent Run #74b08dActionable Suggestions - 1
Review Details
|
Changelist by BitoThis pull request implements the following key changes.
|
Code Review Agent Run #951024Actionable Suggestions - 0Review Details
|
Code Review Agent Run #53c8cbActionable Suggestions - 3
Review Details
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3082 +/- ##
===========================================
+ Coverage 46.98% 76.20% +29.21%
===========================================
Files 202 202
Lines 21470 21493 +23
Branches 2767 2773 +6
===========================================
+ Hits 10088 16379 +6291
+ Misses 10886 4301 -6585
- Partials 496 813 +317 ☔ View full report in Codecov by Sentry. |
Signed-off-by: amitani <[email protected]>
Signed-off-by: amitani <[email protected]>
Signed-off-by: amitani <[email protected]>
Signed-off-by: amitani <[email protected]>
Code Review Agent Run #9436c8Actionable Suggestions - 4
Additional Suggestions - 1
Review Details
|
Signed-off-by: amitani <[email protected]>
Code Review Agent Run #47705eActionable Suggestions - 3
Review Details
|
Code Review Agent Run #de6a86Actionable Suggestions - 1
Review Details
|
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.
Co-authored-by: Flyte Bot <[email protected]> Signed-off-by: amitani <[email protected]>
Signed-off-by: amitani <[email protected]>
Signed-off-by: amitani <[email protected]>
Signed-off-by: amitani <[email protected]>
Code Review Agent Run #d15bb5Actionable Suggestions - 2
Additional Suggestions - 1
Review Details
|
Signed-off-by: amitani <[email protected]>
Code Review Agent Run #075b08Actionable Suggestions - 0Review Details
|
Tracking issue
Related to flyteorg/flyte#6119
Why are the changes needed?
Our dependencies tend to include libraries from our private GitHub repositories. The credential needs to be configured for the build process.
What changes were proposed in this pull request?
pip_secret_mounts
is added toImageSpec
as an additional parameter. When this is set, the secret is added by the build command, and mounted at the specific RUN command to run pip/poetry/uv install.This parameter is excluded when calculating
ImageSpec.id
, allowing to use a temporary path if needed. It is consistent with the behavior that the content of these files aren't taken into account forImageSpec.id
.In the docstring, this parameter is explained as experimental. This allows more flexibility in the future, in case other mount type, e.g. to an environment variable, needs to be added.
How was this patch tested?
I tried locally with a poetry project that has private git dependency. Without this, the build (
pyflyte build
) fails installing these git dependencies. With this change, it succeeds.Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link
Summary by Bito
Implements support for mounting secrets during image building in Flytekit by adding pip_secret_mounts parameter to ImageSpec. This feature allows specifying secret files and mount paths for Docker builds, particularly useful for handling private GitHub repository dependencies. The implementation includes validation checks for secret paths and comprehensive error handling, while ensuring these configurations don't affect ImageSpec ID calculation.Unit tests added: True
Estimated effort to review (1-5, lower is better): 3