Skip to content

directoryStructure set to <artifact_name> and not prepended by model/ dir #200

@gbolmier

Description

@gbolmier

/kind bug

I noticed a strange behaviour when I save and push an artifact from the root level of my docker container (python:3.7-slim). The directoryStructure metadata field is set to my artifact name without the ORMBModelDirectory prepended to it, but if I run the save and push commands from the /home directory of my container then I observe the "expected normal" behaviour and the directoryStructure metadata field is set to model/<artifact_name> 😅

I know I should not do that at the root level of my containers but I don't understand what is causing this result. I don't know go but I feel like this is related to it:

ormb/pkg/saver/saver.go

Lines 127 to 129 in 7907828

// update the name to correctly reflect the desired destination when untaring
header.Name = strings.TrimPrefix(
strings.Replace(file, parentDir, "", -1), string(filepath.Separator))

Any idea where this is coming from and if this is expected in that situation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions