-
Notifications
You must be signed in to change notification settings - Fork 996
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
SSH Runner: Fix several issues and refactor code #17357
base: develop2
Are you sure you want to change the base?
Conversation
cf0893c
to
6c7b1b8
Compare
def __init__(self, conan_api, command, host_profile, build_profile, args, raw_args): | ||
from paramiko.config import SSHConfig | ||
from paramiko.client import SSHClient | ||
def __init__( |
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.
Avoid formatting and typing changes, it makes difficult to read the changelog and check if some new argument was added to the constructor
ff37095
to
5032b3c
Compare
e0ce817
to
83c905d
Compare
02ae57a
to
7d030ae
Compare
7d030ae
to
41347b6
Compare
f080d12
to
918f18f
Compare
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.
We need to discuss if we want to copy the profiles to the host. (templates, etc) and if we want to add the config to the builtins (same for docker).
conan/internal/runner/ssh.py
Outdated
def _install_conan_remotely(self, python_command: str, version: str): | ||
self.logger.verbose(f"Installing conan version: {version}") | ||
# Note: this may fail on windows | ||
result = self.remote_conn.run_command(f"{python_command} -m pip install conan{f'=={version}' if version != 'dev' else ' --upgrade'}", "Installing conan") | ||
if not result.success: | ||
self.logger.error(f"Unable to install conan in venv: {result.stderr}") | ||
|
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 think this ssh runner should have the responsibility to install Conan in the remote machine, lets keep it as minimal as possible.
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.
This behavior is present in develop2, not a new introduction.
The main idea is that the SSH runner will create a completely isolated environment and a completely isolated Conan installation to avoid any possible interference with the host machine.
Also, the installed conan version should match the caller version.
Changelog: Feature: Introducing
SSH runner
Docs: conan-io/docs#3972
Changes:
jinja2
templates intact to allow remote runner to render them locallybuild
recipes. Solved by always exporting all the packages and forcing a local cache refresh&
and*
during ssh remote invoquesconan config list
runner.ssh
keydevelop
branch, documenting this one.