buildbot / buildbot
Showing 1 of 2 files from the diff.

@@ -230,6 +230,9 @@
Loading
230 230
                                       **kwargs)
231 231
        return d
232 232
233 +
    def canReconfigWithSibling(self, sibling):
234 +
        return reflect.qual(self.__class__) == reflect.qual(sibling.__class__)
235 +
233 236
    def configureService(self):
234 237
        # reconfigServiceWithSibling with self, means first configuration
235 238
        return self.reconfigServiceWithSibling(self)
@@ -462,23 +465,17 @@
Loading
462 465
        # calculate new childs, by name, and removed childs
463 466
        removed_names, added_names = util.diffSets(old_set, new_set)
464 467
465 -
        # find any childs for which the fully qualified class name has
466 -
        # changed, and treat those as an add and remove
467 -
        # While we're at it find any service that don't know how to reconfig,
468 -
        # and, if they have changed, add them to both removed and added, so that we
468 +
        # find any children for which the old instance is not
469 +
        # able to do a reconfig with the new sibling
470 +
        # and add them to both removed and added, so that we
469 471
        # run the new version
470 472
        for n in old_set & new_set:
471 473
            old = old_by_name[n]
472 474
            new = new_by_name[n]
473 -
            # detect changed class name
474 -
            if reflect.qual(old.__class__) != reflect.qual(new.__class__):
475 +
            # check if we are able to reconfig service
476 +
            if not old.canReconfigWithSibling(new):
475 477
                removed_names.add(n)
476 478
                added_names.add(n)
477 -
            # compare using ComparableMixin if they don't support reconfig
478 -
            elif not hasattr(old, 'reconfigServiceWithBuildbotConfig'):
479 -
                if not util.ComparableMixin.isEquivalent(old, new):
480 -
                    removed_names.add(n)
481 -
                    added_names.add(n)
482 479
483 480
        if removed_names or added_names:
484 481
            log.msg("adding {} new {}, removing {}".format(len(added_names), self.config_attr,
Files Coverage
master/buildbot 92.05%
worker/buildbot_worker 85.02%
Project Totals (348 files) 91.62%
Untitled

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading