-
Notifications
You must be signed in to change notification settings - Fork 165
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
cosalib: fix --build= argument passing #1305
cosalib: fix --build= argument passing #1305
Conversation
if you look at:
I don't see anywhere where |
to be clear the change in this PR works, but I think there is a larger scale problem with |
Agree with the likely general issue. Try rebasing this on master to fix Prow. |
👍
It says i'm already rebased on latest master |
/retest |
Did you |
7175ed4 is latest master, right? |
6b035bf
to
1e7d558
Compare
Yeah, I think we can nuke |
Works for me. I'll update this PR. My intent was to get some expert opinions and figure out what the real fix should be. |
1e7d558
to
e38771d
Compare
OK. Pushed an update and updated the title of this PR. Here is the new commit message of the commit:
|
I think we also need something like: diff --git a/src/cmd-artifact-disk b/src/cmd-artifact-disk
index dbde1453..f3d62d37 100755
--- a/src/cmd-artifact-disk
+++ b/src/cmd-artifact-disk
@@ -14,8 +14,9 @@ import cosalib.vmware as VmwareOVA
def get_builder(imgtype, build_root, build="latest", force=False, schema=None):
- args = [build_root, build]
kargs = {
+ "build": build,
+ "buildroot": build_root,
"force": force,
"schema": schema,
"variant": imgtype ? |
e38771d
to
ebb0e93
Compare
👍 - updated |
Oh right, also need to drop passing |
like this? diff --git a/src/cosalib/vmware.py b/src/cosalib/vmware.py
index e9df1f4d..1b3b638c 100644
--- a/src/cosalib/vmware.py
+++ b/src/cosalib/vmware.py
@@ -52,10 +52,10 @@ class VmwareOVA(QemuVariantImage):
https://www.dmtf.org/sites/default/files/standards/documents/DSP0243_1.1.0.pdf
"""
- def __init__(self, *args, **kwargs):
+ def __init__(self, **kwargs):
variant = kwargs.pop("variant", "vmware")
kwargs.update(VARIANTS.get(variant, {}))
- QemuVariantImage.__init__(self, *args, **kwargs)
+ QemuVariantImage.__init__(self, **kwargs)
# Set the QemuVariant mutate_callback so that OVA is called.
self.mutate_callback = self.write_ova
# Ensure that coreos.ovf is included in the tar |
I stumbled upon this problem because `cosa buildextend-gcp --build=xyz` wasn't appropriately passing the build on to the underlying library. It turns out that args wasn't getting used in most places, only kwargs were. Let's remove the *args pieces and use pass all arguments as kwargs.
ebb0e93
to
32cfaa2
Compare
yep and I found a few more: pushed an update. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dustymabe, jlebon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Every time I switch from a statically compiled language (particularly Rust which can be slow to compile) back to a dynamic one (python/shell) I usually have this feeling like OH MY GOD I'M GOING SO FAST then...at some point later crash -
|
I know, right?? 🤣
Thanks! Maybe #1323 will take care of it. |
Passing --build= isn't working. I fixed it using this but I think
there is probably a better fix in order somewhere.