-
Notifications
You must be signed in to change notification settings - Fork 449
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
Parameterized k8s volume mount in session config #100
Conversation
Codecov Report
@@ Coverage Diff @@
## main #100 +/- ##
==========================================
+ Coverage 78.05% 78.07% +0.02%
==========================================
Files 50 50
Lines 4511 4529 +18
==========================================
+ Hits 3521 3536 +15
- Misses 990 993 +3
Continue to review full report at Codecov.
|
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.
LGTM.
@@ -33,7 +33,7 @@ function _start { | |||
sleep 5s | |||
curl -XPOST http://localhost:${_port} -d 'import graphscope' | |||
curl -XPOST http://localhost:${_port} -d 'from graphscope.framework.loader import Loader' | |||
curl_sess="curl -XPOST http://localhost:${_port} -d 'session = graphscope.session(num_workers=${workers}, show_log=True, k8s_coordinator_cpu=1.0, k8s_coordinator_mem='\''4Gi'\'', k8s_vineyard_cpu=1.0, k8s_vineyard_mem='\''4Gi'\'', k8s_vineyard_shared_mem='\''4Gi'\'', k8s_engine_cpu=1.0, k8s_engine_mem='\''4Gi'\'', k8s_gie_graph_manager_image='\''${gie_manager_image}'\'', k8s_gs_image='\''${gs_image}'\'')' --write-out %{http_code} --silent --output ./curl.tmp" | |||
curl_sess="curl -XPOST http://localhost:${_port} -d 'session = graphscope.session(num_workers=${workers}, show_log=True, k8s_volumes={\"data\": {\"type\": \"hostPath\", \"field\": {\"path\": \"${GS_TEST_DIR}\", \"type\": \"Directory\"}, \"mounts\": {\"mountPath\": \"/testingdata\"}}}, k8s_coordinator_cpu=1.0, k8s_coordinator_mem='\''4Gi'\'', k8s_vineyard_cpu=1.0, k8s_vineyard_mem='\''4Gi'\'', k8s_vineyard_shared_mem='\''4Gi'\'', k8s_engine_cpu=1.0, k8s_engine_mem='\''4Gi'\'', k8s_gie_graph_manager_image='\''${gie_manager_image}'\'', k8s_gs_image='\''${gs_image}'\'')' --write-out %{http_code} --silent --output ./curl.tmp" |
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.
Looks that we still need GS_TEST_DIR
, but we delete that in scripts/test.sh
. Is that desired?
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.
Yes, already remove all hard code GS_TEST_DIR
in python code.
} | ||
] | ||
} | ||
} |
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.
"Only 'hostPath' supported yet." -> "Only 'hostPath' is supported."
Add more about the docstring:
- If we just want to mount a single volume, could we write:
"mounts": {"mountPath": "<path1>"}
? - will we resolve the environment varaibles if
$
exists in the "path" or "mountPath"?
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.
- Yes. you can. I have updated the doc.
- Thanks for your advice. I think there is some confusion for users if we support parsing env variables because it occurs in coordinator pod, instead of python client. If we do that, we also have to support passing env in session params.
"--k8s_volumes", | ||
type=str, | ||
default="{}", | ||
help="A str of dict for kubernetes volumes.", |
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.
"A str of dict" -> "A json string"
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.
Thanks a lot.
Fixes #47