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
tcdownload: returns 1 if 'No complete TaskCluster runs found for ref' #19187
tcdownload: returns 1 if 'No complete TaskCluster runs found for ref' #19187
Conversation
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.
I don't know where tcdownload.py is used, so @jgraham should probably review.
@@ -71,7 +71,7 @@ def run(*args, **kwargs): | |||
|
|||
if not taskgroups: | |||
logger.error("No complete TaskCluster runs found for ref %s" % kwargs["ref"]) | |||
return | |||
return 1 |
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.
Isn't sys.exit(run(None, vars(kwargs)))
or similar needed below for this to work?
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.
The result of the run()
function for tc-download
is captured by wpt
in
Line 166 in 5336ed0
sys.exit(int(rv)) |
Actually, the tc-download
is a subcommand of wpt
. Example:
./wpt tc-download --ref a7f3642cf9af7321211ac05cd06e0512fb4d6372 ...
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.
BTW @clopez has an interesting extension for this which we are using to get results from task-cluster and upload it the wpt.fyi repository: psaavedra@c093e31
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, then I understand the context. Writing a longish explanation in the commit message is OK and helpful in review.
It's a sub-commant for the WPT CLI:
|
What uses |
I don't know that any part of our automation is currently using this. That doesn't mean it's not useful of course. |
Typically in UNIX like systems, every command returns an exit semantic status (sometimes referred to as a return status or exit code). A successful command returns a 0, while an unsuccessful one returns a non-zero value that usually can be interpreted as an error code. I propose a small change in the script to return 1 in
'No complete TaskCluster runs found for ref'
situations.