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
build providers: honour http proxy settings for snapd #3251
Conversation
I believe there is a bit of chicken and egg for the case(s) where snap injection isn't supported... |
Hrmm, naturally this was going to break the spread test that passed in http proxy... |
@@ -259,6 +258,19 @@ def launch_instance(self) -> None: | |||
# what is on the host | |||
self._setup_snapcraft() | |||
|
|||
# Configure snapd to use http/https proxy. |
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.
How about putting this in it's own method and do some "super" tricks in multipass and lxd to minimize the test spread?
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 good, just added a minor comment to improve tests
@@ -747,6 +746,36 @@ def test_lifecycle( | |||
hide_output=False, | |||
instance_name="snapcraft-project-name", | |||
), | |||
call( |
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 wouldn't need this with a shim like https://github.com/snapcore/snapcraft/pull/3251/files#diff-658f276fdea7891f007be4110b902a42R101 applied to https://github.com/snapcore/snapcraft/pull/3251/files#diff-658f276fdea7891f007be4110b902a42R106 to only the multipass specific bits of the implementation
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.
Well this whole test case appears to be about testing the whole thing... the LXD version uses asserts_has_calls()
, but also enumerates the whole thing (minus these new changes because it never failed). If the purpose of the test is to simply check that it has any calls, and that each call has the proper provider-specific prefix commands, I can do that. Otherwise, I'm not sure?
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 was trying to transform it into that for changes not to have this ripple effect. It is true that it is not the case for everything today
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.
Pushed updates to clean that up in areas touched 👍
Configure snapd with the proxy settings configured by the user for http_proxy and https_proxy. Do this on each launch so that any changes in configuration passed are applied. Update env-passthrough tests to use developer debug and enable experimental extensions now that http proxy affects snapd operation. Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
Just verify the command prefixes match what is expected for each environment. Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
Configure snapd with the proxy settings configured by the user for http_proxy and https_proxy. Do this on each launch so that any changes in configuration passed are applied. Update env-passthrough tests to use developer debug and enable experimental extensions now that http proxy affects snapd operation. Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
Configure snapd with the proxy settings configured by the user
for http_proxy and https_proxy. Do this on each launch so
that any changes in configuration passed are applied.
Signed-off-by: Chris Patterson chris.patterson@canonical.com
./runtests.sh static
?./runtests.sh tests/unit
?