buildbot / buildbot

Compare 0593afa ... +26 ... 89f092e

Coverage Reach
master/buildbot/steps/source/git.py master/buildbot/steps/source/svn.py master/buildbot/steps/source/repo.py master/buildbot/steps/source/cvs.py master/buildbot/steps/source/mercurial.py master/buildbot/steps/source/mtn.py master/buildbot/steps/source/p4.py master/buildbot/steps/source/bzr.py master/buildbot/steps/source/darcs.py master/buildbot/steps/source/base.py master/buildbot/steps/source/gerrit.py master/buildbot/steps/source/gitlab.py master/buildbot/steps/source/github.py master/buildbot/steps/source/__init__.py master/buildbot/steps/package/rpm/mock.py master/buildbot/steps/package/rpm/rpmbuild.py master/buildbot/steps/package/rpm/rpmlint.py master/buildbot/steps/package/rpm/__init__.py master/buildbot/steps/package/deb/pbuilder.py master/buildbot/steps/package/deb/lintian.py master/buildbot/steps/package/util.py master/buildbot/steps/package/__init__.py master/buildbot/steps/shell_oldstyle.py master/buildbot/steps/shell.py master/buildbot/steps/vstudio.py master/buildbot/steps/transfer.py master/buildbot/steps/python.py master/buildbot/steps/python_twisted.py master/buildbot/steps/mtrlogobserver.py master/buildbot/steps/trigger.py master/buildbot/steps/worker.py master/buildbot/steps/master.py master/buildbot/steps/http_oldstyle.py master/buildbot/steps/http.py master/buildbot/steps/master_oldstyle.py master/buildbot/steps/subunit.py master/buildbot/steps/shellsequence.py master/buildbot/steps/cppcheck.py master/buildbot/steps/mswin.py master/buildbot/steps/download_secret_to_worker.py master/buildbot/steps/maxq.py master/buildbot/steps/cmake.py master/buildbot/process/buildstep.py master/buildbot/process/properties.py master/buildbot/process/build.py master/buildbot/process/metrics.py master/buildbot/process/buildrequestdistributor.py master/buildbot/process/builder.py master/buildbot/process/remotecommand.py master/buildbot/process/users/manual.py master/buildbot/process/users/users.py master/buildbot/process/users/manager.py master/buildbot/process/botmaster.py master/buildbot/process/buildrequest.py master/buildbot/process/factory.py master/buildbot/process/workerforbuilder.py master/buildbot/process/log.py master/buildbot/process/logobserver.py master/buildbot/process/remotetransfer.py master/buildbot/process/results.py master/buildbot/process/debug.py master/buildbot/process/cache.py master/buildbot/process/measured_service.py master/buildbot/process/subunitlogobserver.py master/buildbot/process/base.py master/buildbot/reporters/words.py master/buildbot/reporters/telegram.py master/buildbot/reporters/irc.py master/buildbot/reporters/gerrit.py master/buildbot/reporters/generators/utils.py master/buildbot/reporters/generators/worker.py master/buildbot/reporters/generators/build.py master/buildbot/reporters/generators/buildset.py master/buildbot/reporters/bitbucketserver.py master/buildbot/reporters/mail.py master/buildbot/reporters/message.py master/buildbot/reporters/utils.py master/buildbot/reporters/github.py master/buildbot/reporters/gitlab.py master/buildbot/reporters/gerrit_verify_status.py master/buildbot/reporters/notifier.py master/buildbot/reporters/http.py master/buildbot/reporters/hipchat.py master/buildbot/reporters/bitbucket.py master/buildbot/reporters/pushover.py master/buildbot/reporters/pushjet.py master/buildbot/reporters/zulip.py master/buildbot/db/migrate/versions/045_worker_transition.py master/buildbot/db/migrate/versions/046_mysql_innodb_compatibility.py master/buildbot/db/migrate/versions/052_cascading_set_null.py master/buildbot/db/migrate/versions/047_cascading_deletes.py master/buildbot/db/migrate/versions/050_cascading_deletes_all.py master/buildbot/db/migrate/versions/056_add_test_result_tables.py master/buildbot/db/migrate/versions/041_add_N_N_tagsbuilders.py master/buildbot/db/migrate/versions/057_add_build_data_tables.py master/buildbot/db/migrate/versions/042_add_build_properties_table.py master/buildbot/db/migrate/versions/051_add_worker_status.py master/buildbot/db/migrate/versions/044_add_step_hidden.py master/buildbot/db/migrate/versions/053_add_changes_committer.py master/buildbot/db/migrate/versions/048_change_properties_to_text.py master/buildbot/db/migrate/versions/054_add_index_to_steps.py master/buildbot/db/migrate/versions/049_add_schedulers_enabled.py master/buildbot/db/migrate/versions/058_add_build_data_length.py master/buildbot/db/migrate/versions/043_changes_parent.py master/buildbot/db/migrate/versions/040_add_builder_tags.py master/buildbot/db/migrate/versions/055_fix_changes_committer.py master/buildbot/db/logs.py master/buildbot/db/changes.py master/buildbot/db/model.py master/buildbot/db/test_results.py master/buildbot/db/enginestrategy.py master/buildbot/db/workers.py master/buildbot/db/builds.py master/buildbot/db/pool.py master/buildbot/db/buildrequests.py master/buildbot/db/users.py master/buildbot/db/buildsets.py master/buildbot/db/schedulers.py master/buildbot/db/steps.py master/buildbot/db/state.py master/buildbot/db/sourcestamps.py master/buildbot/db/build_data.py master/buildbot/db/base.py master/buildbot/db/connector.py master/buildbot/db/builders.py master/buildbot/db/test_result_sets.py master/buildbot/db/masters.py master/buildbot/db/dbconfig.py master/buildbot/db/changesources.py master/buildbot/db/migrate_utils.py master/buildbot/db/types/json.py master/buildbot/db/tags.py master/buildbot/db/exceptions.py master/buildbot/db/__init__.py master/buildbot/util/__init__.py master/buildbot/util/service.py master/buildbot/util/croniter.py master/buildbot/util/git.py master/buildbot/util/kubeclientservice.py master/buildbot/util/lru.py master/buildbot/util/httpclientservice.py master/buildbot/util/test_result_submitter.py master/buildbot/util/maildir.py master/buildbot/util/poll.py master/buildbot/util/raml.py master/buildbot/util/debounce.py master/buildbot/util/deferwaiter.py master/buildbot/util/subscription.py master/buildbot/util/eventual.py master/buildbot/util/pathmatch.py master/buildbot/util/config.py master/buildbot/util/lineboundaries.py master/buildbot/util/sautils.py master/buildbot/util/identifiers.py master/buildbot/util/protocol.py master/buildbot/util/netstrings.py master/buildbot/util/bbcollections.py master/buildbot/util/misc.py master/buildbot/util/latent.py master/buildbot/util/giturlparse.py master/buildbot/util/codebase.py master/buildbot/util/private_tempdir.py master/buildbot/util/ssl.py master/buildbot/util/logger.py master/buildbot/util/state.py master/buildbot/util/_notifier.py master/buildbot/util/tuplematch.py master/buildbot/www/hooks/github.py master/buildbot/www/hooks/gitlab.py master/buildbot/www/hooks/bitbucketserver.py master/buildbot/www/hooks/bitbucketcloud.py master/buildbot/www/hooks/base.py master/buildbot/www/hooks/poller.py master/buildbot/www/hooks/gitorious.py master/buildbot/www/hooks/bitbucket.py master/buildbot/www/rest.py master/buildbot/www/authz/endpointmatchers.py master/buildbot/www/authz/roles.py master/buildbot/www/authz/authz.py master/buildbot/www/authz/__init__.py master/buildbot/www/oauth2.py master/buildbot/www/service.py master/buildbot/www/auth.py master/buildbot/www/change_hook.py master/buildbot/www/sse.py master/buildbot/www/config.py master/buildbot/www/ldapuserinfo.py master/buildbot/www/ws.py master/buildbot/www/resource.py master/buildbot/www/avatar.py master/buildbot/www/plugin.py master/buildbot/worker/base.py master/buildbot/worker/ec2.py master/buildbot/worker/protocols/pb.py master/buildbot/worker/protocols/null.py master/buildbot/worker/protocols/base.py master/buildbot/worker/latent.py master/buildbot/worker/docker.py master/buildbot/worker/openstack.py master/buildbot/worker/libvirt.py master/buildbot/worker/upcloud.py master/buildbot/worker/manager.py master/buildbot/worker/kubernetes.py master/buildbot/worker/marathon.py master/buildbot/worker/local.py master/buildbot/worker/__init__.py master/buildbot/data/resultspec.py master/buildbot/data/types.py master/buildbot/data/buildrequests.py master/buildbot/data/buildsets.py master/buildbot/data/builds.py master/buildbot/data/changes.py master/buildbot/data/base.py master/buildbot/data/masters.py master/buildbot/data/workers.py master/buildbot/data/steps.py master/buildbot/data/logs.py master/buildbot/data/schedulers.py master/buildbot/data/connector.py master/buildbot/data/builders.py master/buildbot/data/logchunks.py master/buildbot/data/test_result_sets.py master/buildbot/data/forceschedulers.py master/buildbot/data/changesources.py master/buildbot/data/build_data.py master/buildbot/data/properties.py master/buildbot/data/test_results.py master/buildbot/data/sourcestamps.py master/buildbot/data/root.py master/buildbot/data/patches.py master/buildbot/data/exceptions.py master/buildbot/changes/mail.py master/buildbot/changes/gitpoller.py master/buildbot/changes/gerritchangesource.py master/buildbot/changes/svnpoller.py master/buildbot/changes/p4poller.py master/buildbot/changes/hgpoller.py master/buildbot/changes/github.py master/buildbot/changes/changes.py master/buildbot/changes/pb.py master/buildbot/changes/bitbucket.py master/buildbot/changes/base.py master/buildbot/changes/filter.py master/buildbot/changes/manager.py master/buildbot/schedulers/forcesched.py master/buildbot/schedulers/trysched.py master/buildbot/schedulers/timed.py master/buildbot/schedulers/base.py master/buildbot/schedulers/basic.py master/buildbot/schedulers/dependent.py master/buildbot/schedulers/triggerable.py master/buildbot/schedulers/manager.py master/buildbot/schedulers/filter.py master/buildbot/scripts/runner.py master/buildbot/scripts/base.py master/buildbot/scripts/logwatcher.py master/buildbot/scripts/upgrade_master.py master/buildbot/scripts/start.py master/buildbot/scripts/create_master.py master/buildbot/scripts/stop.py master/buildbot/scripts/cleanupdb.py master/buildbot/scripts/reconfig.py master/buildbot/scripts/sendchange.py master/buildbot/scripts/checkconfig.py master/buildbot/scripts/user.py master/buildbot/scripts/tryserver.py master/buildbot/scripts/sample.cfg master/buildbot/scripts/restart.py master/buildbot/scripts/trycmd.py master/buildbot/status/master.py master/buildbot/status/builder.py master/buildbot/status/build.py master/buildbot/status/buildrequest.py master/buildbot/status/worker.py master/buildbot/status/buildset.py master/buildbot/status/base.py master/buildbot/status/event.py master/buildbot/status/__init__.py master/buildbot/status/client.py master/buildbot/clients/tryclient.py master/buildbot/clients/base.py master/buildbot/clients/sendchange.py master/buildbot/clients/usersclient.py master/buildbot/config.py master/buildbot/master.py master/buildbot/statistics/capture.py master/buildbot/statistics/stats_service.py master/buildbot/statistics/storage_backends/influxdb_client.py master/buildbot/statistics/storage_backends/base.py master/buildbot/statistics/__init__.py master/buildbot/machine/generic.py master/buildbot/machine/latent.py master/buildbot/machine/base.py master/buildbot/machine/manager.py master/buildbot/plugins/db.py master/buildbot/plugins/__init__.py master/buildbot/locks.py master/buildbot/mq/wamp.py master/buildbot/mq/simple.py master/buildbot/mq/base.py master/buildbot/mq/connector.py master/buildbot/interfaces.py master/buildbot/secrets/providers/vault.py master/buildbot/secrets/providers/file.py master/buildbot/secrets/providers/passwordstore.py master/buildbot/secrets/providers/base.py master/buildbot/secrets/secret.py master/buildbot/secrets/manager.py master/buildbot/buildbot_net_usage_data.py master/buildbot/pbmanager.py master/buildbot/wamp/connector.py master/buildbot/configurators/janitor.py master/buildbot/configurators/__init__.py master/buildbot/monkeypatches/__init__.py master/buildbot/monkeypatches/servicechecks.py master/buildbot/monkeypatches/decorators.py master/buildbot/pbutil.py master/buildbot/__init__.py master/buildbot/revlinks.py master/buildbot/scheduler.py master/buildbot/warnings.py master/buildbot/errors.py master/buildbot/buildrequest.py worker/buildbot_worker/runprocess.py worker/buildbot_worker/commands/transfer.py worker/buildbot_worker/commands/fs.py worker/buildbot_worker/commands/base.py worker/buildbot_worker/commands/shell.py worker/buildbot_worker/commands/utils.py worker/buildbot_worker/commands/registry.py worker/buildbot_worker/scripts/runner.py worker/buildbot_worker/scripts/create_worker.py worker/buildbot_worker/scripts/logwatcher.py worker/buildbot_worker/scripts/start.py worker/buildbot_worker/scripts/stop.py worker/buildbot_worker/scripts/restart.py worker/buildbot_worker/scripts/base.py worker/buildbot_worker/base.py worker/buildbot_worker/pb.py worker/buildbot_worker/util/__init__.py worker/buildbot_worker/util/_hangcheck.py worker/buildbot_worker/util/_notifier.py worker/buildbot_worker/__init__.py worker/buildbot_worker/pbutil.py worker/buildbot_worker/monkeypatches/testcase_assert.py worker/buildbot_worker/monkeypatches/__init__.py worker/buildbot_worker/compat.py worker/buildbot_worker/null.py worker/buildbot_worker/interfaces.py worker/buildbot_worker/bot.py worker/buildbot_worker/backports/__init__.py worker/buildbot_worker/exceptions.py

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 9 of 30 files from the diff.

@@ -135,9 +135,10 @@
Loading
135 135
136 136
    @defer.inlineCallbacks
137 137
    def build_message(self, master, reporter, name, builds, results):
138 +
        # The given builds must refer to builds from a single buildset
138 139
        patches = []
139 140
        logs = []
140 -
        body = ""
141 +
        body = None
141 142
        subject = None
142 143
        msgtype = None
143 144
        users = set()
@@ -155,17 +156,18 @@
Loading
155 156
                    build_logs = [log for log in build_logs if self._should_attach_log(log)]
156 157
                logs.extend(build_logs)
157 158
158 -
            if 'prev_build' in build and build['prev_build'] is not None:
159 -
                previous_results = build['prev_build']['results']
160 -
            else:
161 -
                previous_results = None
162 159
            blamelist = yield reporter.getResponsibleUsersForBuild(master, build['buildid'])
163 -
            buildmsg = yield self.formatter.formatMessageForBuildResults(
164 -
                self.mode, name, build['buildset'], build, master, previous_results, blamelist)
160 +
            buildmsg = yield self.formatter.format_message_for_build(self.mode, name, build,
161 +
                                                                     master, blamelist)
165 162
            users.update(set(blamelist))
166 163
            msgtype = buildmsg['type']
167 -
            body += buildmsg['body']
168 -
            if 'subject' in buildmsg:
164 +
165 +
            if body is None:
166 +
                body = buildmsg['body']
167 +
            elif buildmsg['body'] is not None:
168 +
                body = body + buildmsg['body']
169 +
170 +
            if buildmsg['subject'] is not None:
169 171
                subject = buildmsg['subject']
170 172
171 173
        if subject is None:

@@ -50,9 +50,8 @@
Loading
50 50
51 51
        msg = yield self.formatter.formatMessageForMissingWorker(master, worker)
52 52
        body = msg['body'].encode(ENCODING)
53 -
        if 'subject' in msg:
54 -
            subject = msg['subject']
55 -
        else:
53 +
        subject = msg['subject']
54 +
        if subject is None:
56 55
            subject = "Buildbot worker {name} missing".format(**worker)
57 56
        assert msg['type'] in ('plain', 'html'), \
58 57
            "'{}' message type must be 'plain' or 'html'.".format(msg['type'])

@@ -333,6 +333,7 @@
Loading
333 333
            return defer.succeed(None)
334 334
        instance = self.instance
335 335
        self.instance = None
336 +
        self.resetWorkerPropsOnStop()
336 337
        return threads.deferToThread(self._thd_stop_instance, instance, fast)
337 338
338 339
    def _thd_stop_instance(self, instance, fast):

@@ -40,6 +40,9 @@
Loading
40 40
        self._actual_build_props = copy.deepcopy(props)
41 41
        defer.returnValue(props)
42 42
43 +
    def resetWorkerPropsOnStop(self):
44 +
        self._actual_build_props = None
45 +
43 46
    @defer.inlineCallbacks
44 47
    def isCompatibleWithBuild(self, build):
45 48
        if self._actual_build_props is None:

@@ -112,6 +112,7 @@
Loading
112 112
        res = yield self._http.delete("/v2/apps/{}".format(
113 113
            self.getApplicationId()))
114 114
        self.instance = None
115 +
        self.resetWorkerPropsOnStop()
115 116
116 117
        if res.code != 200 and reportFailure:
117 118
            res_json = yield res.json()

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Learn more Showing 5 files with coverage changes found.

Changes in master/buildbot/reporters/message.py
-4
+1
Loading file...
Changes in master/buildbot/reporters/generators/worker.py
New
Loading file...
Changes in master/buildbot/reporters/generators/utils.py
New
Loading file...
Changes in master/buildbot/worker/docker.py
-8
+8
Loading file...
Changes in master/buildbot/util/latent.py
-3
+3
Loading file...

28 Commits

Hiding 1 contexual commits
+6
+21
-15
Hiding 1 contexual commits
Hiding 1 contexual commits
Hiding 1 contexual commits
+3
+1
+2
Hiding 2 contexual commits
-3
-3
+3
+1
+2
Hiding 1 contexual commits
-2
+9
-11
Hiding 6 contexual commits
-1
-11
+10
Files Coverage
master/buildbot 0.04% 90.26%
worker/buildbot_worker 85.09%
Project Totals (352 files) 89.96%
Loading