Skip to content
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

LocalLoader should populate UbiConfig version field as well #50

Closed
JayZ12138 opened this issue Oct 9, 2019 · 0 comments
Closed

LocalLoader should populate UbiConfig version field as well #50

JayZ12138 opened this issue Oct 9, 2019 · 0 comments

Comments

@JayZ12138
Copy link
Contributor

Summary

#49 asks for adding a 'version' attribute to UbiConfig class, and when config is loaded by GitlabLoader, this field should be populated with partial branch name.

However, for LocalLoader, there's no way to get the version and populate it while loading, which makes LocalLoader not useable (if the version field is None, then the whole UbiConfig object is useless)

In order to make LocalLoader useable again, I propose two solutions:

  1. Rewrite LocalLoader to make it git aware:
    Now the local repo isn't simply directories and files, but a local git repo has the same layout/branches of the remote gitlab repo, so LocalLoader can get the branch information just as GitlabLoader does.

  2. Restrict the local directories layout. Config files of a specific version should be put under one directory and the directory should be named after version. For example:
    configs/
    ├── ubi7.1
    │   └── rhel-atomic-host.yaml
    └── ubi7.2
    └── rhel-7-for-power-le.yaml

Issue Type

  • Feature Request

Current behavior

LocalLoader couldn't find version info.

Desired behavior

LocalLoader should be version aware and populate the UbiConfig.version field while loading

Use case

Load configs from local.

Additional Information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant