[
https://issues.apache.org/jira/browse/YETUS-797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16770035#comment-16770035
]
Allen Wittenauer commented on YETUS-797:
----------------------------------------
Modules are calculated based upon changed files. This calculation is actually
done at the beginning of the compile_cycle: once without the patch applied and
once with the patch applied. The module code takes the list of files and does
(effectively) a depth-first search to the module marker (e.g., pom.xml in
maven). One of the key points, however, is that the modules list is not purged
between runs; it is purposefully additive to deal with module additions and so
that comparison code works properly and so the parent can be tested
before/after the module is added.
Things fall apart if a module that was present in the first pass is removed by
a patch. test-patch is not going to generate a (true) 'after' of that module
because it no longer exists.
The key part of this change is that during the calculation of the 'after' any
modules that no longer exist are removed. This prevents the bug that was
triggered before. But it does have the consequence that any tests that wanted
a COMPLETE before and after would need to keep track of this themselves.
Presently, I cannot think of any that would be impacted by such a change.
Additionally, the -00 patch has some related changes:
* generate_stack now always works, regardless of --debug being set. If this
routine has been hit, bad things are happening and the debug output is just too
useful.
* buildtool_cwd has some extra protection from rouge stderr output in case it
is given a directory that doesn't exist
* modules_workers sets the MODULE_STATUS_TIMER when the module no longer
exists. This should never happen ever again, but this should be decent safety
code.
*
> patches that remove modules trigger offset_clock assert
> -------------------------------------------------------
>
> Key: YETUS-797
> URL: https://issues.apache.org/jira/browse/YETUS-797
> Project: Yetus
> Issue Type: Bug
> Components: Test Patch
> Reporter: Allen Wittenauer
> Assignee: Allen Wittenauer
> Priority: Critical
> Attachments: YETUS-797.00.patch
>
>
> Stack trace:
> {code}
> ASSERT: no offset passed to offset_clock: unit
> 174 offset_clock ../test-patch.sh
> 1706 modules_messages../test-patch.sh
> 634 maven_precompile ../test-patch.d/maven.sh
> 2810 compile_cycle ../test-patch.sh
> 3156 main ../test-patch.sh
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)