<?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>216840</bug_id>
          
          <creation_ts>2020-09-22 12:32:20 -0700</creation_ts>
          <short_desc>build.webkit.org should run clean build while building revisions having a specified keyword</short_desc>
          <delta_ts>2026-01-12 09:09:01 -0800</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>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=216610</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="Aakash Jain">aakash_jain</reporter>
          <assigned_to name="Aakash Jain">aakash_jain</assigned_to>
          <cc>aakash_jain</cc>
    
    <cc>ap</cc>
    
    <cc>clopez</cc>
    
    <cc>darin</cc>
    
    <cc>fujii</cc>
    
    <cc>graouts</cc>
    
    <cc>jbedard</cc>
    
    <cc>ryanhaddad</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1690820</commentid>
    <comment_count>0</comment_count>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2020-09-22 12:32:20 -0700</bug_when>
    <thetext>build.webkit.org should automatically run clean build while building revisions which have a specified keyword, like [clean-build].

Similar feature being added in EWS in Bug 216610.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690822</commentid>
    <comment_count>1</comment_count>
      <attachid>409389</attachid>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2020-09-22 12:35:27 -0700</bug_when>
    <thetext>Created attachment 409389
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690828</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-09-22 12:51:27 -0700</bug_when>
    <thetext>The focus on bots exclusively seems wrong here. What about when human beings pull revisions with this keyword?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1691147</commentid>
    <comment_count>3</comment_count>
    <who name="Aakash Jain">aakash_jain</who>
    <bug_when>2020-09-23 09:49:41 -0700</bug_when>
    <thetext>I agree that we should solve that problem as well (engineers needing clean build on their machine after a specific revision). 

It&apos;s a much larger task though. In case of buildbot (e.g.: build.webkit.org), it&apos;s straight-forward, buildbot already know which specific revisions are being built, and can check if any of those revisions needs a clean build (based on keyword like [clean-build]).

For engineer&apos;s machines, we would need to figure out which revision was last built, and which revision is currently being build, so that we can check that revision range for [clean-build] keyword. We would probably need to store the last built revision number locally somewhere. Then we might need to support various mechanism in which engineers can build locally on their machine ,e.g.: build-webkit script, make, xcode etc.

Do you think that work should block this patch, or we can land this patch (and patch in 216610), and tackle the clean-build-on-engineers-machine problem afterwards?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1691150</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-09-23 09:53:23 -0700</bug_when>
    <thetext>(In reply to Aakash Jain from comment #3)
&gt; Do you think that work should block this patch

I do, but others may not agree with me. Adding more differences between bots and desktop way of building worry me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1693086</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-09-29 12:33:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/69758937&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1693634</commentid>
    <comment_count>6</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2020-09-30 19:56:52 -0700</bug_when>
    <thetext>(In reply to Aakash Jain from comment #3)
&gt; For engineer&apos;s machines, we would need to figure out which revision was last
&gt; built, and which revision is currently being build, so that we can check
&gt; that revision range for [clean-build] keyword. We would probably need to
&gt; store the last built revision number locally somewhere. Then we might need
&gt; to support various mechanism in which engineers can build locally on their
&gt; machine ,e.g.: build-webkit script, make, xcode etc.

Just sharing a possible idea of how this could be implemented:

1. Instead of relying on the commit log, rely on a new file on the main directory of the source three called CleanBuildsChangeLog or something like that. So when a clean build is needed, the commit should modify that file adding a new changelog entry with (ideally) the reason about why the clean build is needed.

2. The Script build-webkit calculates the hash (md5 or sha256) of the CleanBuildsChangeLog file and checks if there is a file in the build directory named WebKitBuild/Release/.cleanbuild.hashsum (or something similar).

3. If the .cleanbuild.hashsum is not there, then the script simply saves the value of the hash into the file .cleanbuild.hashsum and continues as usual.

4. If the file .cleanbuild.hashsum is there, the script compares both values. If the values are different, then it does a clean build.


This should work for the GTK/WPE bots/developers becase we all use the script build-webkit. But I have no idea if this would work for the developers using Xcode.

WDYT?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1693635</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2020-09-30 19:59:25 -0700</bug_when>
    <thetext>(In reply to Carlos Alberto Lopez Perez from comment #6)
&gt; 4. If the file .cleanbuild.hashsum is there, the script compares both
&gt; values. If the values are different, then it does a clean build.

... And then it should save the new value of the hash after wiping the previous build and before starting the new one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1693636</commentid>
    <comment_count>8</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2020-09-30 20:05:53 -0700</bug_when>
    <thetext>Also I think it would be useful to have a way of ordering clean builds for a specific port. For example, the GTK developers update the flatpak SDK so they want to do clean builds for all the GTK developers. But that should not trigger clean builds for other ports.

So on top of the main CleanBuildsChangeLog file there can be a CleanBuilds${PORTNAME}ChangeLog file and the script can calculate the hash of both files concatenated. That way it would be possible to order clean builds for only one port.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1693757</commentid>
    <comment_count>9</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-10-01 09:00:21 -0700</bug_when>
    <thetext>(In reply to Carlos Alberto Lopez Perez from comment #6)
&gt; WDYT?

I think a scheme roughly like this is exactly what I had in mind. It can definitely work with Xcode, but not if the logic is in the build-webkit script.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1693758</commentid>
    <comment_count>10</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2020-10-01 09:02:52 -0700</bug_when>
    <thetext>(In reply to Darin Adler from comment #9)
&gt; I think a scheme roughly like this is exactly what I had in mind. It can
&gt; definitely work with Xcode, but not if the logic is in the build-webkit
&gt; script.

Need a separate script that does this, and is called as an early-enough build step.

One issue with Xcode and any other build technique other than using build-webkit is this isn’t perfectly compatible with building in only one directory. That can be addressed by making the build fail instead of auto-cleaning in cases like.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>409389</attachid>
            <date>2020-09-22 12:35:27 -0700</date>
            <delta_ts>2020-09-22 12:35:27 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-216840-20200922153526.patch</filename>
            <type>text/plain</type>
            <size>1995</size>
            <attacher name="Aakash Jain">aakash_jain</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDI2NzQzMykKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
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gICAgICByZXR1cm4gVHJ1ZQogCiAgICAgZGVmIHN0
YXJ0KHNlbGYpOgorICAgICAgICBzZWxmLm5lZWRfY2xlYW5fYnVpbGRfYmFzZWRfb25fY2hhbmdl
cygpCiAgICAgICAgIGlmIG5vdCBzZWxmLmdldFByb3BlcnR5KCdpc19jbGVhbicpOgogICAgICAg
ICAgICAgc2VsZi5oaWRlU3RlcElmID0gVHJ1ZQogICAgICAgICAgICAgcmV0dXJuIFNLSVBQRUQK
</data>
<flag name="review"
          id="425085"
          type_id="1"
          status="?"
          setter="aakash_jain"
    />
          </attachment>
      

    </bug>

</bugzilla>