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
Separate opensuse and sle12 in directories rather than branches #920
Conversation
f8165b0
to
0aea75c
Compare
why only sle12 and not sle11? how long do you think will it take before we require different main.pm for sp0? I like the idea of having all main.pms in one branch, but opensuse-latest and sle12-latest are not the only products we maintain |
I don't know and I don't understand how this is related. As soon as or if we need a different main.pm for different products we can use the same approach or do you see problems with that? |
I think the problem @coolo is pointing at is that you named product sub-dirs |
damn! I wrote a long comment and used an emacs shortcut to copy&paste (^W - which closed the tab :) Anyway: openQA calculates CASEDIR using DISTRI and VERSION, so I wonder if we would symlink all these CASEDIRS to one and have the needles where main.pm is or keep it as is - just without the symlinks to /master |
Make sure you have seen the prerequisite to the current change in the backend os-autoinst/os-autoinst#376 as well as the description in #920 (comment) I might have done it not as you would have expected it and maybe I got it wrong.
Hm, what I tested is that tests can be found according to the DISTRI variable and I think I might have missed the needles directory. So probably needles should also be discovered similar to the main.pm, e.g. in here https://github.com/os-autoinst/os-autoinst/blob/master/needle.pm#L198 |
so to organize this all I want to have (all under /var/lib/openqa/share/tests): opensuse/products/opensusemain.pm |
|
what's the point of /var/lib/openqa/share/tests/products ? |
actually 'products' is possibly misnamed - what it actually is: a directory for alternative main.pm files. |
Right, wrong working dir. Nevermind then. |
So to make it more correct and less ambiguous we should probably rename it in openqa.suse.de to resolve to "os-autoinst-distri-opensuse" as a CASEDIR, not "opensuse". Can we do this? Can be done later, of course, or as a workaround with symlinks for now.
should we say "distri" then? This is also the name of the variable that is evaluated inside this dir |
Both are combination of distri and version. But what we basically have is a product defined by distri and version and a "test family", which is opensuse. |
I will try to accomodate the "version" as well as the needles directory and check this locally. |
0aea75c
to
94a4b03
Compare
9dd7d61
to
3276a15
Compare
Depending on the location of main.pm in the cloned test distribution fetchneedles selects the corresponding needles directory. See os-autoinst/os-autoinst-distri-opensuse#920 for the corresponding os-autoinst-distri-opensuse change.
Depending on the location of main.pm in the cloned test distribution fetchneedles selects the corresponding needles directory. See os-autoinst/os-autoinst-distri-opensuse#920 for the corresponding os-autoinst-distri-opensuse change.
Depends on os-autoinst/os-autoinst#376 in "os-autoinst". Fixes https://progress.opensuse.org/issues/10162 - Put *opensuse* "main.pm" into "products/opensuse/main.pm" - Merge *sle12* content into **master** branch and put *sle12* "main.pm" into "products/sle/main.pm" - Relies on DISTRI variable set to "opensuse" and "sle" accordingly used in "isotovideo" - Correct perl style according to "tidy" in "products/sle/main.pm". The changes have been generated like this: git co origin/master -- main.pm templates templates-aarch64 git mv -f main.pm products/opensuse/ git mv -f templates products/opensuse/ git mv -f templates-aarch64 products/opensuse/ git co origin/sle12 -- main.pm templates git mv -f main.pm products/sle/main.pm git mv -f templates products/sle/templates 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. Benefits: - Easier to do the same changes for opensuse and sle - It is possible to share code in opensuse/main.pm and sle/main.pm, the content does not need to be duplicated - No more manual approach trying to keep changes in sync by making two pull requests for separate branches. It is possible to do everything in one commit at the same time as the tests are shared anyway - No need for manual setup of sle repo with symlinks to be usable for testing
3276a15
to
cbb3575
Compare
Separate opensuse and sle12 in directories rather than branches
Depends on os-autoinst/os-autoinst#376 in
"os-autoinst".
Fixes https://progress.opensuse.org/issues/10162
"products/sle/main.pm"
"isotovideo"
The changes have been generated like this:
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:
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.
Benefits:
content does not need to be duplicated
pull requests for separate branches. It is possible to do everything in one
commit at the same time as the tests are shared anyway