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

Add version attr to UbiConfig class #49

Closed
rbikar opened this issue Oct 3, 2019 · 0 comments
Closed

Add version attr to UbiConfig class #49

rbikar opened this issue Oct 3, 2019 · 0 comments

Comments

@rbikar
Copy link
Member

rbikar commented Oct 3, 2019

Summary

In order to support new branching scheme on ubi config repositories, we need to add new attr version to UbiConfig class. New branching scheme will based on versions. E.g. there will be:

  • ubi7, ubi7.8 ... -> this will include all config files related to ubi7
  • ubi8, ubi8.1 ... -> this will include all config files related to ubi8
  • no other branches will exist

So version can derived from branch name.
If we have version attr populated, ubipop can easily the one ubi config which is intended to use for population given ubi repository.

For details how new branching is going to look see DELIVERY-7608.

Issue Type

  • Feature Request

Current behavior

Currently we don't support any versioning feature on ubi repo config repos or in ubi-config tool

Desired behavior

  • add new attr version to UbiConfig class
  • when ubi config is loaded via GitLab loader, populate version field
  • value of version is derived from branch name e.g. ubi7.8 -> 7.8

Use case

In ubipop, we can use this in following way:

desired_config_version = "7.8"
loader = ubiconfig.get_loader(ubiconfig_dir_or_url)
ubi_conf_list = []
ubi_conf_list.extend(loader.load_all())
for ubi_conf_item in ubi_conf_list:
    if ubi_conf_item.version == desired_config_version:
        return ubi_conf_item  
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

2 participants