-
Notifications
You must be signed in to change notification settings - Fork 228
Conversation
This adds a new flag `--sandbox-image` for setting the VM sandbox image. The VM spec contains a "sandbox" field, similar to "image" and "kernel" fields. Adds a new constant `DEFAULT_SANDBOX_IMAGE_NAME`. Adds unit test for sandbox-image flag.
The CI fails because panic: interface conversion: interface is nil, not reference.NamedTagged [recovered]
panic: interface conversion: interface is nil, not reference.NamedTagged This maybe due to the shallow clone of the repo in the CIs. Building manually with full git history works properly and the sandbox image tag is set as expected: $ sudo bin/ignite create -h
...
Flags:
...
--sandbox-image oci-image Specify an OCI image for the VM sandbox (default weaveworks/ignite:v0.6.0-262-fe4b2aa7cf4c9f)
...
We may need to improve how |
Make kernel image name and tag directly configurable via ldflags. Make sandbox image name and tag directly configurable via ldflags. Remove gitVersion tag calculation for sandbox image. Make sandbox image default properly in constants. Refactor image string formatting before parsing OCI Refs in API defaulting logic. Allow repo/name@sha256:<hash> image formats for sandbox and kernel via ldflags overrides. (May not yet be fully supported by all image and sandbox runtimes) Respect `make DOCKER_USER="${USER}"` in ldflags. Remove gitVersion workaround from .travisci e2e tests
This ended up not being the specific reason the tests were failing. In the first commit I added, we patch the image defaulting logic to work without the help of ldflags and gitVersion. With this patch, the tests are still failing on my local git copy. The failures were due to the lack of missing fields on synthetic VM objects created within the tests. I did not fix the lack of using defaulting functions in the tests, but I was able to manually add static values for the missing fields in the second commit, and the tests are now passing. |
I was able to test this field also properly defaults and can be overridden using |
This is great. A lot of improvements 🎉 Thanks a lot. |
This adds a new flag
--sandbox-image
for setting the VM sandbox image.The VM spec contains a "sandbox" field, similar to "image" and "kernel"
fields.
Adds a new constant
DEFAULT_SANDBOX_IMAGE_NAME
.Adds unit test for sandbox-image flag.
Autogen updates the deps. Deps update are in a separate commit.