<?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>223006</bug_id>
          
          <creation_ts>2021-03-09 16:31:56 -0800</creation_ts>
          <short_desc>REGRESSION: two webkitscmpy.test.svn_unittest.TestRemoteSvn tests are flaky failures</short_desc>
          <delta_ts>2021-03-12 11:05:20 -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>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=222946</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="Ryan Haddad">ryanhaddad</reporter>
          <assigned_to name="Jonathan Bedard">jbedard</assigned_to>
          <cc>aakash_jain</cc>
    
    <cc>ap</cc>
    
    <cc>dewei_zhu</cc>
    
    <cc>jbedard</cc>
    
    <cc>lmoura</cc>
    
    <cc>webkit-bot-watchers-bugzilla</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1737848</commentid>
    <comment_count>0</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2021-03-09 16:31:56 -0800</bug_when>
    <thetext>The following two webkitscmpy tests appear to have become flaky failures recently

https://results.webkit.org/?suite=webkitpy-tests&amp;suite=webkitpy-tests&amp;test=webkitscmpy.test.svn_unittest.TestRemoteSvn.test_identifier&amp;test=webkitscmpy.test.svn_unittest.TestRemoteSvn.test_non_cannonical_identifiers

[1956/1972] webkitscmpy.test.svn_unittest.TestRemoteSvn.test_non_cannonical_identifiers erred:
  Traceback (most recent call last):
    File &quot;/Volumes/Data/worker/catalina-release-tests-wk2/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py&quot;, line 305, in test_non_cannonical_identifiers
      self.assertEqual(&apos;2@trunk&apos;, str(remote.Svn(self.remote).commit(identifier=&apos;0@branch-a&apos;)))
    File &quot;/Volumes/Data/worker/catalina-release-tests-wk2/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py&quot;, line 374, in commit
      info = self.info(cached=True, branch=branch, revision=revision)
    File &quot;/Volumes/Data/worker/catalina-release-tests-wk2/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py&quot;, line 55, in decorator
      value = function(*args, **kwargs)
    File &quot;/Volumes/Data/worker/catalina-release-tests-wk2/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py&quot;, line 124, in info
      }, data=&apos;&lt;propfind xmlns=&quot;DAV:&quot;&gt;\n&apos;
    File &quot;/Volumes/Data/worker/catalina-release-tests-wk2/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/requests_.py&quot;, line 120, in &lt;lambda&gt;
      patch(&apos;requests.request&apos;, new=lambda *args, **kwargs: Session().request(*args, **kwargs)),
    File &quot;/Volumes/Data/worker/catalina-release-tests-wk2/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/requests_.py&quot;, line 115, in request
      return this.request(method, url, **kwargs)
    File &quot;/Volumes/Data/worker/catalina-release-tests-wk2/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py&quot;, line 263, in request
      datetime.fromtimestamp(commit.timestamp, tz=tzoffset(None, -7 * 60 * 60)).strftime(&apos;%Y-%m-%dT%H:%M:%S.103754Z&apos;),
    File &quot;/Volumes/Data/worker/catalina-release-tests-wk2/build/Tools/Scripts/libraries/autoinstalled/python-3/dateutil/tz/_common.py&quot;, line 140, in fromutc
      raise TypeError(&quot;fromutc() requires a datetime argument&quot;)
  TypeError: fromutc() requires a datetime argument


[1954/1972] webkitscmpy.test.svn_unittest.TestRemoteSvn.test_identifier erred:
  Traceback (most recent call last):
    File &quot;/Volumes/Data/worker/bigsur-debug-tests-wk1/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/svn_unittest.py&quot;, line 294, in test_identifier
      self.assertEqual(1, remote.Svn(self.remote).commit(identifier=&apos;1@trunk&apos;).revision)
    File &quot;/Volumes/Data/worker/bigsur-debug-tests-wk1/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py&quot;, line 374, in commit
      info = self.info(cached=True, branch=branch, revision=revision)
    File &quot;/Volumes/Data/worker/bigsur-debug-tests-wk1/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/decorators.py&quot;, line 55, in decorator
      value = function(*args, **kwargs)
    File &quot;/Volumes/Data/worker/bigsur-debug-tests-wk1/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/remote/svn.py&quot;, line 117, in info
      response = requests.request(
    File &quot;/Volumes/Data/worker/bigsur-debug-tests-wk1/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/requests_.py&quot;, line 120, in &lt;lambda&gt;
      patch(&apos;requests.request&apos;, new=lambda *args, **kwargs: Session().request(*args, **kwargs)),
    File &quot;/Volumes/Data/worker/bigsur-debug-tests-wk1/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/requests_.py&quot;, line 115, in request
      return this.request(method, url, **kwargs)
    File &quot;/Volumes/Data/worker/bigsur-debug-tests-wk1/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/svn.py&quot;, line 263, in request
      datetime.fromtimestamp(commit.timestamp, tz=tzoffset(None, -7 * 60 * 60)).strftime(&apos;%Y-%m-%dT%H:%M:%S.103754Z&apos;),
    File &quot;/Volumes/Data/worker/bigsur-debug-tests-wk1/build/Tools/Scripts/libraries/autoinstalled/python-3/dateutil/tz/_common.py&quot;, line 140, in fromutc
      raise TypeError(&quot;fromutc() requires a datetime argument&quot;)
  TypeError: fromutc() requires a datetime argument</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1737850</commentid>
    <comment_count>1</comment_count>
    <who name="Ryan Haddad">ryanhaddad</who>
    <bug_when>2021-03-09 16:33:04 -0800</bug_when>
    <thetext>Maybe related to https://trac.webkit.org/changeset/274127/webkit?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1737865</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-03-09 17:05:32 -0800</bug_when>
    <thetext>Do not understand how this can possibly be flakey, taking a closer look.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1738166</commentid>
    <comment_count>3</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2021-03-10 12:18:48 -0800</bug_when>
    <thetext>I also getting these locally kinda often, and a webkitpy patch failed once in EWS earlier today.

Adding some prints to `dateutil` where it is triggered (_common.py:140), the `dt` parameter is indeed a `datetime.datetime` object, but the imported `datetime` name in this module sometimes points to `FakeDateTime` (which is a subclass of `datetime.datetime`), making the `isinstance` call to return False.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1738172</commentid>
    <comment_count>4</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-03-10 12:25:22 -0800</bug_when>
    <thetext>(In reply to Lauro Moura from comment #3)
&gt; I also getting these locally kinda often, and a webkitpy patch failed once
&gt; in EWS earlier today.
&gt; 
&gt; Adding some prints to `dateutil` where it is triggered (_common.py:140), the
&gt; `dt` parameter is indeed a `datetime.datetime` object, but the imported
&gt; `datetime` name in this module sometimes points to `FakeDateTime` (which is
&gt; a subclass of `datetime.datetime`), making the `isinstance` call to return
&gt; False.

I have a partial change locally that just abandons timezone shenanigans entirely and prints the time as utc shifted 7 hours (which is California time for our SVN server, which is the whole point of all of this anyways)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1738208</commentid>
    <comment_count>5</comment_count>
      <attachid>422865</attachid>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-03-10 13:37:53 -0800</bug_when>
    <thetext>Created attachment 422865
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1738213</commentid>
    <comment_count>6</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2021-03-10 13:50:21 -0800</bug_when>
    <thetext>(In reply to Jonathan Bedard from comment #4)
&gt; I have a partial change locally that just abandons timezone shenanigans
&gt; entirely and prints the time as utc shifted 7 hours (which is California
&gt; time for our SVN server, which is the whole point of all of this anyways)

Nice, hopefully this will be enough for this error.

Given the flakiness and the import issue, it kinda looks like a test patching datetime to mock it has this mocked datetime &quot;leaking&quot; to other tests not expecting it later, no?

Btw, I found this old freezegun patch with isinstance issues when working together with dateutil: https://github.com/spulec/freezegun/commit/0453e5f47efd1d0d79af973e5ddcf9fa83b2ca40</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1738765</commentid>
    <comment_count>7</comment_count>
    <who name="Lauro Moura">lmoura</who>
    <bug_when>2021-03-11 21:03:00 -0800</bug_when>
    <thetext>Tested here a few dozen times and no more flakiness nor regresssions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1738924</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2021-03-12 09:18:42 -0800</bug_when>
    <thetext>commit-queue failed to commit attachment 422865 to WebKit repository. To retry, please set cq+ flag again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1738965</commentid>
    <comment_count>9</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2021-03-12 11:04:07 -0800</bug_when>
    <thetext>Committed r274366: &lt;https://commits.webkit.org/r274366&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 422865.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1738967</commentid>
    <comment_count>10</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-03-12 11:05:20 -0800</bug_when>
    <thetext>&lt;rdar://problem/75369005&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>422865</attachid>
            <date>2021-03-10 13:37:53 -0800</date>
            <delta_ts>2021-03-12 11:04:07 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-223006-20210310133752.patch</filename>
            <type>text/plain</type>
            <size>1931</size>
            <attacher name="Jonathan Bedard">jbedard</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDI3NDIyNykKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDEzIEBACisyMDIxLTAzLTEwICBKb25hdGhhbiBCZWRhcmQgIDxqYmVkYXJkQGFwcGxlLmNv
bT4KKworICAgICAgICBSRUdSRVNTSU9OOiB0d28gd2Via2l0c2NtcHkudGVzdC5zdm5fdW5pdHRl
c3QuVGVzdFJlbW90ZVN2biB0ZXN0cyBhcmUgZmxha3kgZmFpbHVyZXMKKyAgICAgICAgaHR0cHM6
Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTIyMzAwNgorCisgICAgICAgIFJldmll
d2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgICogU2NyaXB0cy9saWJyYXJpZXMvd2Vi
a2l0c2NtcHkvd2Via2l0c2NtcHkvbW9ja3MvcmVtb3RlL3N2bi5weToKKyAgICAgICAgKFN2bi5y
ZXF1Z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0cHM6Ly8nKToKICAgICAgICAgICAgIHJldHVybiBt
b2Nrcy5SZXNwb25zZS5jcmVhdGU0MDQodXJsKQpAQCAtMjYwLDcgKzI1OSw3IEBAIGNsYXNzIFN2
bihtb2Nrcy5SZXF1ZXN0cyk6CiAgICAgICAgICAgICAgICAgICAgICc8L0Q6bXVsdGlzdGF0dXM+
XG4nLmZvcm1hdCgKICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmlwcGVkX3VybCwKICAgICAg
ICAgICAgICAgICAgICAgICAgIGNvbW1pdC5yZXZpc2lvbiwKLSAgICAgICAgICAgICAgICAgICAg
ICAgIGRhdGV0aW1lLmZyb210aW1lc3RhbXAoY29tbWl0LnRpbWVzdGFtcCwgdHo9dHpvZmZzZXQo
Tm9uZSwgLTcgKiA2MCAqIDYwKSkuc3RyZnRpbWUoJyVZLSVtLSVkVCVIOiVNOiVTLjEwMzc1NFon
KSwKKyAgICAgICAgICAgICAgICAgICAgICAgIGRhdGV0aW1lLnV0Y2Zyb210aW1lc3RhbXAoY29t
bWl0LnRpbWVzdGFtcCAtIHRpbWVkZWx0YShob3Vycz03KS5zZWNvbmRzKS5zdHJmdGltZSgnJVkt
JW0tJWRUJUg6JU06JVMuMTAzNzU0WicpLAogICAgICAgICAgICAgICAgICAgICAgICAgY29tbWl0
LmF1dGhvci5lbWFpbCwKICAgICAgICAgICAgICAgICApLAogICAgICAgICAgICAgKQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>