-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/build/cmd/gomote: configure instance by an environment variable #29037
Comments
I'd be fine with a shorter mode. Got a concrete proposal? Keep in mind there can be multiple gomote sessions open at once. Would you do the short magic based on $GOMOTE being set? On there being only one gomote session? |
Indeed: for example, I've been using them to test
I think I would start with (Perhaps we could also allow inference for singleton instances, but the failure mode of running commands on the wrong machine if you forget that you had another instance up seems potentially confusing.) |
SGTM.
Agreed. That's been my main concern in the past when I've considered something like this. So what's the rule? If the Or $GOMOTE != "" means that the |
That seems like the simplest approach: it's easy enough to run |
I don't want to let the perfect be the enemy of the good here, but I find I use this wrapper myself, which gives me a more normal PATH (plus #!/bin/bash
if [[ -z "$VM" ]]; then
echo "VM variable not set" >&2
exit 1
fi
pre='PATH=$PATH:$PWD/go/bin &&'
# Duplicate the quoting behavior of ssh.
exec gomote run $VM /bin/sh -c "$pre $*" |
I'm currently working on an extension to the |
@aclements I'm also working on a fix for the PATH issue. |
@mknyszek, if you're working on |
Thanks. I'm mostly focused on the gomote frontend, so based on those CLs I don't think we're interfering with each other much. Talking with @cagedmantis, I think the |
Just to avoid confusion and duplicate work, I tried to lay out what I planned to work on and what I discussed so far with Carlos in #53956. I had it in a doc, but I figured it would be more visible as an issue (and I can add it to the hotlist). Feel free to comment there if you have opinions. Nothing about that is intended to be set in stone, but more of a decent starting point. |
I've been doing a fair amount of
gomote
-based debugging for thecmd/go
file-locking changes, and wrote the following script to improve the ergonomics of gomote commands:~/bin/mote
:That allows me to eliminate stutter in
gomote
commands and still keep them repeatable.Instead of:
I can run:
However, there is no fundamental reason why this should be a separate bash script.
@bradfitz, @dmitshur, @aclements: what do you think of pulling this into
gomote
proper?The text was updated successfully, but these errors were encountered: