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
feat: pass arbitrary kwargs to docker sdk #1690
Conversation
Oh it was this easy 😂 |
Have to test still, so not sure it was this easy, just a draft |
Codecov Report
@@ Coverage Diff @@
## master #1690 +/- ##
==========================================
+ Coverage 84.45% 85.07% +0.62%
==========================================
Files 132 133 +1
Lines 6830 6848 +18
==========================================
+ Hits 5768 5826 +58
+ Misses 1062 1022 -40
Continue to review full report at Codecov.
|
Latency summaryCurrent PR yields:
Breakdown
Backed by latency-tracking. Further commits will update this comment. |
Would you be able to add a test for using this in a yaml config as well? |
I am thinking it won't look very nice, I am trying to see how can I pass direct dictionaries to argparser |
I also came across this problem when thinking how to implement this yesterday. I think the way you did it is probably the best way currently - argparser is unfortunately very limited - you could use something like A more fundamental solution would require moving away from Argparser, but that would take a long time |
I found a quite good solution with a helper we are already using. To use it in the yaml files, the syntax would be similar to the usage of
|
Pretty cool :) I guess for now it is not possible to pass list/dict arguments, right? I mean the following [but through command line/yaml] docker_kwargs = {'environment': ['VAR1=BAR', 'VAR2=FOO']} |
Not sure, should be tested If u want u can add a tesr and do a PR to this branch or I will try to test tmr |
I can try testing it a bit later yes |
Hey @tadejsv , I did some changes to allow passing strings and arbitrary values, plus I added a test to showcase and document how it can be passed into a |
Great work @JoanFM !! |
Changes introduced
As requested in #1671 , adding arbitrary parameters can be useful to get custom behavior or options for the docker images supporting Peas living in Docker images