buildbot / buildbot

Compare e22df61 ... +5 ... 6f0a343

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/deb/pbuilder.py master/buildbot/steps/package/deb/lintian.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/util.py master/buildbot/steps/package/__init__.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/trigger.py master/buildbot/steps/worker.py master/buildbot/steps/master.py master/buildbot/steps/http.py master/buildbot/steps/subunit.py master/buildbot/steps/shellsequence.py master/buildbot/steps/cppcheck.py master/buildbot/steps/mswin.py master/buildbot/steps/gitdiffinfo.py master/buildbot/steps/download_secret_to_worker.py master/buildbot/steps/maxq.py master/buildbot/steps/cmake.py master/buildbot/reporters/words.py master/buildbot/reporters/telegram.py master/buildbot/reporters/generators/utils.py master/buildbot/reporters/generators/buildset.py master/buildbot/reporters/generators/build.py master/buildbot/reporters/generators/buildrequest.py master/buildbot/reporters/generators/worker.py master/buildbot/reporters/irc.py master/buildbot/reporters/gerrit.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/bitbucket.py master/buildbot/reporters/base.py master/buildbot/reporters/pushover.py master/buildbot/reporters/pushjet.py master/buildbot/reporters/zulip.py master/buildbot/reporters/http.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/remotecommand.py master/buildbot/process/builder.py master/buildbot/process/buildrequest.py master/buildbot/process/botmaster.py master/buildbot/process/users/manual.py master/buildbot/process/users/users.py master/buildbot/process/users/manager.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/base.py master/buildbot/process/subunitlogobserver.py master/buildbot/util/__init__.py master/buildbot/util/service.py master/buildbot/util/croniter.py master/buildbot/util/runprocess.py master/buildbot/util/git.py master/buildbot/util/kubeclientservice.py master/buildbot/util/ssfilter.py master/buildbot/util/lru.py master/buildbot/util/httpclientservice.py master/buildbot/util/test_result_submitter.py master/buildbot/util/poll.py master/buildbot/util/queue.py master/buildbot/util/maildir.py master/buildbot/util/raml.py master/buildbot/util/deferwaiter.py master/buildbot/util/debounce.py master/buildbot/util/subscription.py master/buildbot/util/eventual.py master/buildbot/util/pathmatch.py master/buildbot/util/config.py master/buildbot/util/backoff.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/private_tempdir.py master/buildbot/util/latent.py master/buildbot/util/pullrequest.py master/buildbot/util/giturlparse.py master/buildbot/util/codebase.py master/buildbot/util/ssl.py master/buildbot/util/logger.py master/buildbot/util/_notifier.py master/buildbot/util/state.py master/buildbot/util/tuplematch.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/pool.py master/buildbot/db/workers.py master/buildbot/db/builds.py master/buildbot/db/buildrequests.py master/buildbot/db/users.py master/buildbot/db/buildsets.py master/buildbot/db/enginestrategy.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/migrations/versions/059_2021-09-07_alembic_initial.py master/buildbot/db/tags.py master/buildbot/db/exceptions.py master/buildbot/db/__init__.py master/buildbot/www/hooks/github.py master/buildbot/www/hooks/bitbucketserver.py master/buildbot/www/hooks/gitlab.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/avatar.py master/buildbot/www/ws.py master/buildbot/www/auth.py master/buildbot/www/ldapuserinfo.py master/buildbot/www/change_hook.py master/buildbot/www/sse.py master/buildbot/www/config.py master/buildbot/www/resource.py master/buildbot/www/graphql.py master/buildbot/www/plugin.py master/buildbot/data/types.py master/buildbot/data/resultspec.py master/buildbot/data/connector.py master/buildbot/data/graphql.py master/buildbot/data/buildrequests.py master/buildbot/data/base.py master/buildbot/data/buildsets.py master/buildbot/data/builds.py master/buildbot/data/changes.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/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/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/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/canceller.py master/buildbot/schedulers/basic.py master/buildbot/schedulers/canceller_buildset.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/reconfig.py master/buildbot/scripts/stop.py master/buildbot/scripts/cleanupdb.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/clients/tryclient.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/secrets/providers/vault_hvac.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/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/manhole.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/interfaces.py master/buildbot/__init__.py master/buildbot/asyncio.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/tunnel.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/backports/__init__.py worker/buildbot_worker/bot.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.


@@ -49,7 +49,8 @@
Loading
49 49
                                                wantProperties=self.formatter.wantProperties,
50 50
                                                wantSteps=self.formatter.wantSteps,
51 51
                                                wantPreviousBuild=self._want_previous_build(),
52 -
                                                wantLogs=self.formatter.wantLogs)
52 +
                                                want_logs=self.formatter.want_logs,
53 +
                                                want_logs_content=self.formatter.want_logs_content)
53 54
54 55
        builds = res['builds']
55 56
        buildset = res['buildset']

@@ -27,6 +27,7 @@
Loading
27 27
from buildbot.process.results import WARNINGS
28 28
from buildbot.process.results import statusToString
29 29
from buildbot.reporters import utils
30 +
from buildbot.warnings import warn_deprecated
30 31
31 32
32 33
def get_detected_status_text(mode, results, previous_results):
@@ -149,13 +150,20 @@
Loading
149 150
150 151
    template_type = 'plain'
151 152
152 -
    def __init__(self, ctx=None, wantProperties=True, wantSteps=False, wantLogs=False):
153 +
    def __init__(self, ctx=None, wantProperties=True, wantSteps=False, wantLogs=None,
154 +
                 want_logs=False, want_logs_content=False):
153 155
        if ctx is None:
154 156
            ctx = {}
155 157
        self.context = ctx
156 158
        self.wantProperties = wantProperties
157 159
        self.wantSteps = wantSteps
158 -
        self.wantLogs = wantLogs
160 +
        if wantLogs is not None:
161 +
            warn_deprecated('3.4.0', f'{self.__class__.__name__}: wantLogs has been deprecated, ' +
162 +
                                     'use want_logs and want_logs_content')
163 +
        else:
164 +
            wantLogs = False
165 +
        self.want_logs = want_logs or wantLogs
166 +
        self.want_logs_content = want_logs_content or wantLogs
159 167
160 168
    def buildAdditionalContext(self, master, ctx):
161 169
        pass

@@ -41,7 +41,7 @@
Loading
41 41
42 42
@defer.inlineCallbacks
43 43
def getDetailsForBuildset(master, bsid, wantProperties=False, wantSteps=False,
44 -
                          wantPreviousBuild=False, wantLogs=False):
44 +
                          wantPreviousBuild=False, want_logs=False, want_logs_content=False):
45 45
    # Here we will do a bunch of data api calls on behalf of the reporters
46 46
    # We do try to make *some* calls in parallel with the help of gatherResults, but don't commit
47 47
    # to much in that. The idea is to do parallelism while keeping the code readable
@@ -61,14 +61,15 @@
Loading
61 61
    if builds:
62 62
        yield getDetailsForBuilds(master, buildset, builds, wantProperties=wantProperties,
63 63
                                  wantSteps=wantSteps, wantPreviousBuild=wantPreviousBuild,
64 -
                                  wantLogs=wantLogs)
64 +
                                  want_logs=want_logs,
65 +
                                  want_logs_content=want_logs_content)
65 66
66 67
    return dict(buildset=buildset, builds=builds)
67 68
68 69
69 70
@defer.inlineCallbacks
70 71
def getDetailsForBuild(master, build, wantProperties=False, wantSteps=False,
71 -
                       wantPreviousBuild=False, wantLogs=False):
72 +
                       wantPreviousBuild=False, want_logs=False, want_logs_content=False):
72 73
    buildrequest = yield master.data.get(("buildrequests", build['buildrequestid']))
73 74
    buildset = yield master.data.get(("buildsets", buildrequest['buildsetid']))
74 75
    build['buildrequest'], build['buildset'] = buildrequest, buildset
@@ -83,7 +84,9 @@
Loading
83 84
84 85
    ret = yield getDetailsForBuilds(master, buildset, [build],
85 86
                                    wantProperties=wantProperties, wantSteps=wantSteps,
86 -
                                    wantPreviousBuild=wantPreviousBuild, wantLogs=wantLogs)
87 +
                                    wantPreviousBuild=wantPreviousBuild,
88 +
                                    want_logs=want_logs,
89 +
                                    want_logs_content=want_logs_content)
87 90
    return ret
88 91
89 92
@@ -103,7 +106,7 @@
Loading
103 106
104 107
@defer.inlineCallbacks
105 108
def getDetailsForBuilds(master, buildset, builds, wantProperties=False, wantSteps=False,
106 -
                        wantPreviousBuild=False, wantLogs=False):
109 +
                        wantPreviousBuild=False, want_logs=False, want_logs_content=False):
107 110
108 111
    builderids = {build['builderid'] for build in builds}
109 112
@@ -126,16 +129,25 @@
Loading
126 129
    else:  # we still need a list for the big zip
127 130
        prev_builds = list(range(len(builds)))
128 131
129 -
    if wantSteps:
132 +
    if want_logs_content:
133 +
        want_logs = True
134 +
    if want_logs:
135 +
        wantSteps = True
136 +
137 +
    if wantSteps:  # pylint: disable=too-many-nested-blocks
130 138
        buildsteps = yield defer.gatherResults(
131 139
            [master.data.get(("builds", build['buildid'], 'steps'))
132 140
             for build in builds])
133 -
        if wantLogs:
134 -
            for s in flatten(buildsteps, types=(list, UserList)):
135 -
                logs = yield master.data.get(("steps", s['stepid'], 'logs'))
136 -
                s['logs'] = list(logs)
137 -
                for l in s['logs']:
138 -
                    l['content'] = yield master.data.get(("logs", l['logid'], 'contents'))
141 +
        if want_logs:
142 +
            for build, build_steps in zip(builds, buildsteps):
143 +
                for s in build_steps:
144 +
                    logs = yield master.data.get(("steps", s['stepid'], 'logs'))
145 +
                    s['logs'] = list(logs)
146 +
                    for l in s['logs']:
147 +
                        l['url'] = get_url_for_log(master, build['builderid'], build['number'],
148 +
                                                   s['number'], l['slug'])
149 +
                        if want_logs_content:
150 +
                            l['content'] = yield master.data.get(("logs", l['logid'], 'contents'))
139 151
140 152
    else:  # we still need a list for the big zip
141 153
        buildsteps = list(range(len(builds)))
@@ -222,6 +234,12 @@
Loading
222 234
    return "{}#buildrequests/{}".format(prefix, buildrequestid)
223 235
224 236
237 +
def get_url_for_log(master, builderid, build_number, step_number, log_slug):
238 +
    prefix = master.config.buildbotURL
239 +
    return f"{prefix}#builders/{builderid}/builds/{build_number}/" + \
240 +
        f"steps/{step_number}/logs/{log_slug}"
241 +
242 +
225 243
@renderer
226 244
def URLForBuild(props):
227 245
    build = props.getBuild()

@@ -333,9 +333,9 @@
Loading
333 333
        if not self.summaryCB:
334 334
            return
335 335
        bsid = msg['bsid']
336 -
        res = yield utils.getDetailsForBuildset(
337 -
            self.master, bsid, wantProperties=True,
338 -
            wantSteps=self.wantSteps, wantLogs=self.wantLogs)
336 +
        res = yield utils.getDetailsForBuildset(self.master, bsid, wantProperties=True,
337 +
                                                wantSteps=self.wantSteps, want_logs=self.wantLogs,
338 +
                                                want_logs_content=self.wantLogs)
339 339
        builds = res['builds']
340 340
        buildset = res['buildset']
341 341
        self.sendBuildSetSummary(buildset, builds)

@@ -58,7 +58,8 @@
Loading
58 58
                                       wantProperties=self.formatter.wantProperties,
59 59
                                       wantSteps=self.formatter.wantSteps,
60 60
                                       wantPreviousBuild=want_previous_build,
61 -
                                       wantLogs=self.formatter.wantLogs)
61 +
                                       want_logs=self.formatter.want_logs,
62 +
                                       want_logs_content=self.formatter.want_logs_content)
62 63
63 64
        if not self.is_message_needed_by_props(build):
64 65
            return None
@@ -103,7 +104,8 @@
Loading
103 104
        yield utils.getDetailsForBuild(master, build,
104 105
                                       wantProperties=formatter.wantProperties,
105 106
                                       wantSteps=formatter.wantSteps,
106 -
                                       wantLogs=formatter.wantLogs)
107 +
                                       want_logs=formatter.want_logs,
108 +
                                       want_logs_content=formatter.want_logs_content)
107 109
108 110
        if not self.is_message_needed_by_props(build):
109 111
            return None

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
master/buildbot +<.01% 92.31%
worker/buildbot_worker 85.64%
Project Totals (333 files) 91.90%
Loading