<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>300920</bug_id>
          
          <creation_ts>2025-10-16 13:22:16 -0700</creation_ts>
          <short_desc>[build.webkit.org] Build requests are not collapsed since the switch to multi-master mode</short_desc>
          <delta_ts>2026-03-10 08:28:02 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=300713</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=302874</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Carlos Alberto Lopez Perez">clopez</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2151780</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2025-10-16 13:22:16 -0700</bug_when>
    <thetext>At 301496@main I thought that the issue with build requests not being collapsed on build.webkit.org since the migration to 4.3.0 was due to the change of default value for the parameter collapseRequests from 2.10 to 4.3.0, but this was not the case in the end.

The problem was not because of the upgrade of version, but because of the multi-master deployment that was done when the version was upgraded.

The core issue happens here: https://github.com/buildbot/buildbot/blob/6786251177836ab01b88d029aaa5821016976970/master/buildbot/process/buildrequest.py#L72

    @defer.inlineCallbacks
    def collapse(self):
        brids_to_collapse = set()

        for brid in self.brids:
            # Get the BuildRequest object
            br = yield self.master.data.get((&apos;buildrequests&apos;, brid))          # &lt;- It gets all the info fine from the buildrequest (this is a query to the DB)
            # Retrieve the buildername
            builderid = br[&apos;builderid&apos;]
            bldrdict = yield self.master.data.get((&apos;builders&apos;, builderid))    # &lt;- It gets all the info fine from the builder (this is a query to the DB)
            # Get the builder object
            bldr = self.master.botmaster.builders.get(bldrdict[&apos;name&apos;])       # &lt;- Returns None, here it is where it fails!
            if not bldr:
                continue

bldrdict[&apos;name&apos;] gets resolved correctly to the name of the builder, but self.master.botmaster.builders is an empty dictionary on the -webserver master

That is because this code to collapse the build-requests run on the master -webserver , and there are no builders defined on it, so there are no &quot;builder object&quot; available

The data is coherent, the -webserver master is able to access all the builder information from the DB but it fails when tries to retrieve the python object that represent such builder, which obviously can&apos;t get that from the DB.


So the easy way to fix this without patching buildbot code is that we define the workers and the builders also on the -webserver master, that way it can find the builder object and continue executing the collapse function as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2151792</commentid>
    <comment_count>1</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2025-10-16 13:48:00 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/52506</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2151800</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-10-16 13:54:32 -0700</bug_when>
    <thetext>Committed 301655@main (c9fec4eec9b7): &lt;https://commits.webkit.org/301655@main&gt;

Reviewed commits have been landed. Closing PR #52506 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2151801</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-10-16 13:55:11 -0700</bug_when>
    <thetext>&lt;rdar://problem/162804817&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2188686</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2026-03-10 08:28:02 -0700</bug_when>
    <thetext>Note: a fix for this was merged in buildbot at https://github.com/buildbot/buildbot/commit/878c45da92fa237b4e0178a5af0c4334119900f5 via https://github.com/buildbot/buildbot/pull/8705

If the next master upgrade includes that fix I guess we can go back to not define the workers on the Web UI master.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>