action #10162
closedseparate opensuse and sle12 in directories rather than branches
50%
Description
current situation¶
- opensuse and sle12 are tracked in separate branches (main and sle12)
- test definitions reside in different directories when both product groups are needed
- sle12 actually needs two working copies of the git repo, one tracking sle12 branch, one for opensuse branch, with symlinks in sle12 directory to opensuse subdirs
problem¶
- as the sle12 branch does not contain the actual tests it is sometimes forgotten and not updated accordingly
- it is impossible to share code in opensuse/main.pm and sle12/main.pm, the content is duplicated
- changes in one branch need to be kept in sync manually, e.g. by making two pull requests for separate branches and taking care that they are both merged at the same time
- sle12 repo has to be setup with symlinks (manually) to be usable for testing
suggestion¶
- Add support in os-autoinst to load main.pm based on env variable DISTRI (see https://github.com/os-autoinst/os-autoinst/pull/376)
- Put opensuse "main.pm" into "products/opensuse/main.pm"
- Merge sle content into master branch and put sle12 "main.pm" into "products/sle/main.pm" (see https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/920)
Reasoning¶
Branches should not be used to track different products (or flavors) with a common subset. Branches in VCS should only be (and commonly are) used for two different purposes:
- short-lived local branches for developers, "feature branches"
- different versions of the same product for maintenance purposes: Only selected bugfixes are back-ported
As the differences between opensuse and sle12 are only the files "main.pm" and "templates" (and outdated "variables" and "Makefile" file in sle12 branch), every product should rather be in its own subfolder, e.g. "products/opensuse/main.pm", "products/sle/main.pm", etc.
It looks like without changing "os-autoinst" symlinks can not be used completely to make the proper tests available, e.g. just a simple symlink "products/sle12/" into "/var/lib/openqa/tests/" as well as "products/opensuse" into the same instead of directly putting the git repo in master branch into a subdir "opensuse" and multiple symlinks in sle12 subdir … does not work that easily because "isotovideo" not only loads the main.pm but other stuff from casedir. But I see no problem with extenden "isotovideo" to also look for a path based on the DISTRI variable which is set anyway. But as I don't have admin access to openqa.opensuse.org I can not completely check if there is another DISTRI set than just "opensuse" in which case the directory structure and variables should be aligned.