-
Notifications
You must be signed in to change notification settings - Fork 313
Print warning to stdout #6233
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
base: develop
Are you sure you want to change the base?
Print warning to stdout #6233
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,10 +64,11 @@ def _dcv_connect(args): | |
|
||
try: | ||
url = _retry(_retrieve_dcv_session_url, func_args=[cmd, args.cluster_name, head_node_ip], attempts=4) | ||
url_message = f"Please use the following one-time URL in your browser within 30 seconds:\n{url}" | ||
url_message = f"Please use the following one-time URL in your browser within 30 seconds:" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With this change we are removing an explicative message from stdout to make it easier to consume the url.
This would be consistent with the other pcluster commands returning JSON and would make possible to consume the url easily with jq or, even better, with the --query option of the pcluster CLI. What do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good to me. Please feel free to change it. |
||
|
||
if args.show_url: | ||
print(url_message) | ||
print(url_message, file=sys.stderr) | ||
print(f"{url}") | ||
return | ||
|
||
try: | ||
|
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.
There is a test that should be changed accordingly:
aws-parallelcluster/tests/integration-tests/tests/dcv/test_dcv.py
Lines 76 to 79 in ea57725