[ODLPARENT-4] SingleFeatureTest requires used features to be present in local m2 Repo Created: 25/Sep/14 Updated: 24/Jan/18 |
|
| Status: | Confirmed |
| Project: | odlparent |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Tony Tkacik | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 2084 |
| Description |
|
SingleFeatureTest does not test integration correctly and relies on Maven and compile time dependencies to download and resolve referenced third-party features. This does not test how user will observe installation of features, since any assumtion |
| Comments |
| Comment by Robert Varga [ 18/Mar/15 ] |
|
SingleFeatureTest moved to odlparent. |
| Comment by Robert Varga [ 24/Feb/16 ] |
|
There are two problems we are facing here: 1) features artifacts require an explicit declaration of dependecies to artifacts mentioned in features.xml, so that maven ensures presence of these artifacts in .m2/repository. Failure to do so can lead to downstream breakage, like the one addressed in https://git.opendaylight.org/gerrit/#/c/35317/, where a config file was added to a feature, but openflowplugin tests started failing. Note that in real life feature:install would have worked without any issues. 2) artifacts are resolved via .m2 repository only, which does not match what karaf does, as it consults also remote repositories – hence the above failure. Allowing resolution of artifacts from nexus can lead to the test not validating projects layout correctly, as for example it will not catch the case when a project removes an artifact, but its feature still refers to it, as it would just fetch a stale one from nexus. That would lead to the failure being silent until autorelease happens, which will fail to resolve the artifact due to version bump. These seem to be conflicting requirements, until we realize that there are two distinct cases here: required artifact comes from the project being built, or it comes from an external project (either ODL or third-party). If the artifact is part of the current project, it should only be resolved from .m2/repository, where it is expected to be populated by the current maven build reactor If the artifact is not part of the current project, it should only be resolved from external repository. |
| Comment by Robert Varga [ 24/Feb/16 ] |
|
The core problem lies in how do we determine that a particular artifact is part of build or not. There are two base strategies which are usable: 1) rely on ${project.groupId}, which is assigned to projects. This is a good indication whether the artifact is produced in the local project and this mapping is enforced by OpenDaylight infrastructure. Unfortunately it does not quite work for autorelease, as that builds all projects in one maven reactor. 2) rely on maven reactor. This is works nicely in autorelease, as it will treat any dependency not part of the reactor as a third-party. Unfortunately if fails to detect removed artifacts and doesn't do the right thing in manual testing (e.g. will not use local artifacts and download immediately). A solution needs to somehow combine these two strategies and find the right set of rules to cover both scenarios. To deal with autorelease case, we may get help from outside in the form of an environment variable/maven property being present, which can give us clue about the build scope in which the test is executing. |
| Comment by Vratko Polak [ 07/Mar/17 ] |
|
Is this still relevant after recent [0] strengthening of distribution-check jobs? |