-
Notifications
You must be signed in to change notification settings - Fork 70
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
base/v0_6_exp: add parent directory sugar #508
base: main
Are you sure you want to change the base?
Conversation
still adding unit tests and cleaning up code. |
d532226
to
9f25bc1
Compare
Ooof, ok Looking at other tests they correctly have a storage translation set you can see this here with this |
1451196
to
3125dcd
Compare
eb5115d
to
07d381f
Compare
07d381f
to
0892fbf
Compare
@@ -67,6 +67,12 @@ type File struct { | |||
Append []Resource `yaml:"append"` | |||
Contents Resource `yaml:"contents"` | |||
Mode *int `yaml:"mode"` | |||
Parent Parent `yaml:"parent"` |
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 think we also need to add this to Directory
and Link
.
@@ -134,6 +184,22 @@ func translateFile(from File, options common.TranslateOptions) (to types.File, t | |||
return | |||
} | |||
|
|||
func translateLuks(from Luks, options common.TranslateOptions) (to types.Luks, tm translate.TranslationSet, r report.Report) { |
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.
It feels weird to me that we need to rewrite this since IIUC nothing in what we do is related to LUKS (right?).
translate.MergeP(tr, tm, &r, "disks", &from.Disks, &to.Disks) | ||
translate.MergeP(tr, tm, &r, "files", &from.Files, &to.Files) | ||
translate.MergeP(tr, tm, &r, "filesystems", &from.Filesystems, &to.Filesystems) | ||
translate.MergeP(tr, tm, &r, "links", &from.Links, &to.Links) | ||
translate.MergeP(tr, tm, &r, "luks", &from.Luks, &to.Luks) | ||
translate.MergeP(tr, tm, &r, "raid", &from.Raid, &to.Raid) |
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.
Is there precedence for other sugar we have in Butane which ends up having to relist every other section at the level it's operating at?
0892fbf
to
fc1f76a
Compare
d5a0200
to
8998a97
Compare
63c3086
to
da97cc0
Compare
3ea71ea
to
cba27e1
Compare
63ed6c2
to
aa476a4
Compare
Add a field called 'Parent' which is used to specify a file's parent directory. When a parent is specified, all directories from the parent to the file will be created, with the 'mode' supplied in the parent directory. resolves: coreos#380 Co-authored-by: Yasmin Valim <[email protected]> Co-authored-by: Joseph Corchado <[email protected]> Co-authored-by: Adam Piasecki <[email protected]> Co-authored-by: Luke Yang <[email protected]> Co-authored-by: Renata Ravanelli <[email protected]> Co-authored-by: Huijing Hei <[email protected]>
aa476a4
to
4c52ca0
Compare
@yasminvalim windows weird ci has been fixed, now we can start addressing issues brought up by @jlebon. |
Add a field called 'Parent' which is used to specify a file's parent directory. When a parent is specified, all directories from the parent to the file will be created, with the 'mode' supplied in the parent directory.