Skip to content
This repository was archived by the owner on Jul 17, 2023. It is now read-only.
This repository was archived by the owner on Jul 17, 2023. It is now read-only.

"name" field in kraft.yaml is overwritten by kraft configure --use-version #113

@mmisono

Description

@mmisono

Describe the bug
"name" field in kraft.yaml is overwritten by kraft configure --use-version.

To Reproduce
The initial state of kraft.yaml is as follows.

specification: '0.5'
name: apptest
unikraft:
  version: 0.8.0
targets:
  - architecture: x86_64
     platform: kvm

Then, running kraft configure -u unikraft@staging will overwrite the kraft.yaml as follows.

diff --git a/kraft.yaml b/kraft.yaml
index 08c59a4..bffc672 100644
--- a/kraft.yaml
+++ b/kraft.yaml
@@ -1,8 +1,8 @@
 ---
 specification: '0.5'
-name: apptest
+name: unikraft
 unikraft:
-  version: 0.8.0
+  version: 7f62c36
 targets:
   - architecture: x86_64
     platform: kvm

Cause
The local variable "name" is defined here.
https://github.com/unikraft/kraft/blob/6d046f4dd5ecd2075f927ee01df0fa4e842ca60e/kraft/config/config.py#L572

But then it is overwritten here.
https://github.com/unikraft/kraft/blob/6d046f4dd5ecd2075f927ee01df0fa4e842ca60e/kraft/config/config.py#L634

Expected behavior
I'm not sure the exact intended behavior, but probably only update the version field?

Desktop (please complete the following information):

  • OS: Linux 5.15
  • kraft: version 0.5.0.dev491

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions