[yast-devel] Rspec and its dependencies
Hi, When I play with jenkins setup I face one issue with rspec modules that is newly written ( thanks gabi, vmoravec and mfilka for being explorer ). Issue is that some modules have heavy dependencies and idea of jenkins is to have minimal stable installation so it doesn't need regular updates like old one. There is four possible solutions with this issue: 1) mock everything outside of your module. Pros: - testing only your module - more presure to stable API - only ruby-bindings on jenkins Cons: - in todays modules it can be a lot of work to mock all stuff, so it can discourage developers from writting tests 2) mock everything except yast2 Pros: - tests also yast2 which almost doesn't have external dependencies like SCR calls to system - less work as mocking only non-framework dependencies ( like mock users in ldap module ) Cons: - yast2 must be on jenkins and it effective break idea to have one node to test all maintenance branches 3) install everything on jenkins node Pros: - no mocking Cons: - need to keep it uptodate ( to be honest then we need different volunteer to maintain yast jenkins node ) 4) skip running rspec tests before osc:build and run it only during osc build as part of test if package build Pros: - no dependencies, even ruby bindings is not part, only yast-rake Cons: - if rspec test fail, then it will be later in build, so no fail fast My preffered solution is 4 because it reduce maintain of yast jenkins node and contra is not so big. Lets discussion start. If there is no objections I change yast-rake to not run test:unit before osc:build at the end of week. Josef -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
2) mock everything except yast2 ... I'd prefer this one as it allows tests over more than one module and allows us to be more flexible in mocking YaST internals.
Michal -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Wed, 09 Oct 2013 22:45:47 +0200 "Michal Filka" <michal.filka@suse.cz> wrote:
2) mock everything except yast2 ... I'd prefer this one as it allows tests over more than one module and allows us to be more flexible in mocking YaST internals.
Michal
What you miss in solution 4 where you can use all modules if you add it as Build Require? Josef -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On 10/09/2013 10:31 AM, Josef Reidinger wrote:
Hi, When I play with jenkins setup I face one issue with rspec modules that is newly written ( thanks gabi, vmoravec and mfilka for being explorer ). Issue is that some modules have heavy dependencies and idea of jenkins is to have minimal stable installation so it doesn't need regular updates like old one.
There is four possible solutions with this issue: ... My preffered solution is 4 because it reduce maintain of yast jenkins node and contra is not so big.
Lets discussion start. If there is no objections I change yast-rake to not run test:unit before osc:build at the end of week.
What I'm missing here is: - What do we expect from <doing something about Yast> in Jenkins - What is the expected behavior of Jenkins node - What are the limiting factors for a Jenkins node What I've seen in your previous mail are some proposals to solve an issue which is actually not well described. Maybe link the current documentation of the current node setup. Thanks in advance Lukas -- Lukas Ocilka, Cloud & Systems Management Department SUSE LINUX s.r.o., Praha -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Thu, 10 Oct 2013 10:27:15 +0200 Lukas Ocilka <lukas.ocilka@suse.com> wrote:
On 10/09/2013 10:31 AM, Josef Reidinger wrote:
Hi, When I play with jenkins setup I face one issue with rspec modules that is newly written ( thanks gabi, vmoravec and mfilka for being explorer ). Issue is that some modules have heavy dependencies and idea of jenkins is to have minimal stable installation so it doesn't need regular updates like old one.
There is four possible solutions with this issue: ... My preffered solution is 4 because it reduce maintain of yast jenkins node and contra is not so big.
Lets discussion start. If there is no objections I change yast-rake to not run test:unit before osc:build at the end of week.
What I'm missing here is:
- What do we expect from <doing something about Yast> in Jenkins
Do all checks and test to avoid broken packages in Yast:Head + after 13.1 release create automatic sr to factory if version change.
- What is the expected behavior of Jenkins node
It is quite broad question. So simple answer is just works with minimal maintenance effort.
- What are the limiting factors for a Jenkins node
it is VM, so I am not sure what is question about. We can do a lot of things here, but I want have this node maintanable as oppose to old one running internally.
What I've seen in your previous mail are some proposals to solve an issue which is actually not well described. Maybe link the current documentation of the current node setup.
Issue is that previous idea of jenkins node is that it will contain only yast-rake tasks, that can package, without any dependencies, yast module and then do test build with `osc build`. And yast-rake do some quick tests before packaging like if there is license header in files ( disabled now as almost no module pass it), if all ruby files are valid and other checks. One of this check is also run rspec tests as it is quick unit test. Problem is that such tests depends on other modules and not only on git repo of tested module. So if I need to run such test I need installed all dependencies it used. And then I write proposals how it can be solved. If it is still not clear please speak up what exactly is not clear. Josef
Thanks in advance Lukas
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
Hi, Dne 9.10.2013 10:31, Josef Reidinger napsal(a):
Hi, When I play with jenkins setup I face one issue with rspec modules that is newly written ( thanks gabi, vmoravec and mfilka for being explorer ). Issue is that some modules have heavy dependencies and idea of jenkins is to have minimal stable installation so it doesn't need regular updates like old one.
I think that the proposals for mocking strategies below should be considered not only based on the jenkis use case but as a general approach to testing of yast module code. As a yast dev I would expect minimal development dependencies which should not be yast module specific. Currently we have ruby, yast-ruby-bindings, yast-rake; these are fine as they are general and common for all yast packages/modules. For running unit tests I would not expect to have anything else installed on my development machine. This is practical as I only have a single development environment. I think that the same should be valid for the jenkins node; for running the unit tests jenkins is actually our public development environment which shouldn't be different from the private one. The jenkins building process is a different context which must not determine our testing workflow. If we consider mocking all yast stuff difficult or time consuming, we should probably unify it into some package (yast-test ?) and reuse it to be DRY. Maintainers of the the yast modules would be providing the mocking API.
There is four possible solutions with this issue:
1) mock everything outside of your module.
Pros: - testing only your module - more presure to stable API - only ruby-bindings on jenkins
Cons: - in todays modules it can be a lot of work to mock all stuff, so it can discourage developers from writting tests
2) mock everything except yast2
Making yast2 a development dependency makes yast development more complex as it is now as you must know which yast2 version you need just to run the unit tests. If this version is not available for your dev machine, you must step back and mock it anyway.
Pros: - tests also yast2 which almost doesn't have external dependencies like SCR calls to system - less work as mocking only non-framework dependencies ( like mock users in ldap module )
Cons: - yast2 must be on jenkins and it effective break idea to have one node to test all maintenance branches
3) install everything on jenkins node
Pros: - no mocking
Cons: - need to keep it uptodate ( to be honest then we need different volunteer to maintain yast jenkins node )
4) skip running rspec tests before osc:build and run it only during osc build as part of test if package build
Pros: - no dependencies, even ruby bindings is not part, only yast-rake
Cons: - if rspec test fail, then it will be later in build, so no fail fast
My preffered solution is 4 because it reduce maintain of yast jenkins node and contra is not so big.
I vote for this, we'll see if we will get bitten byt his ;) vlado
Lets discussion start. If there is no objections I change yast-rake to not run test:unit before osc:build at the end of week.
Josef
Dne 9.10.2013 10:31, Josef Reidinger napsal(a):
4) skip running rspec tests before osc:build and run it only during osc build as part of test if package build
Pros: - no dependencies, even ruby bindings is not part, only yast-rake
Cons: - if rspec test fail, then it will be later in build, so no fail fast
I'd prefer this solution as it is the most robust (you will test against correct base packages like yast2 and you can even use packages which are not installed at Jenkins) and requires no extra maintenance (the latest packages from OBS will be used automatically, no need to keep them in sync manually). The disadvantage (later failure) is not a problem IMHO, `osc build` should be quite quick, on my machine it takes just about few minutes and that's fine for me. -- Ladislav Slezák Appliance department / YaST Developer Lihovarská 1060/12 190 00 Prague 9 / Czech Republic tel: +420 284 028 960 lslezak@suse.com SUSE -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On 10/16/2013 04:27 PM, Ladislav Slezak wrote:
Dne 9.10.2013 10:31, Josef Reidinger napsal(a):
4) skip running rspec tests before osc:build and run it only during osc build as part of test if package build
Pros: - no dependencies, even ruby bindings is not part, only yast-rake
Cons: - if rspec test fail, then it will be later in build, so no fail fast
I'd prefer this solution as it is the most robust (you will test against correct base packages like yast2 and you can even use packages which are not installed at Jenkins) and requires no extra maintenance (the latest packages from OBS will be used automatically, no need to keep them in sync manually).
The disadvantage (later failure) is not a problem IMHO, `osc build` should be quite quick, on my machine it takes just about few minutes and that's fine for me.
From what I've seen, this seems to be the easiest way of checking several branches independently. Automation is what I feel to save our resources we currently spend on maintenance. That's why I think we should check all maintained branches (if possible). Bye Lukas -- Lukas Ocilka, Cloud & Systems Management Department SUSE LINUX s.r.o., Praha -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (5)
-
Josef Reidinger
-
Ladislav Slezak
-
Lukas Ocilka
-
Michal Filka
-
Vladimir Moravec