<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/tests/test_git_trace2_event_log.py, branch v2.49</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.49</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.49'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2023-10-31T16:03:54+00:00</updated>
<entry>
<title>cleanup: Update codebase to expect Python 3.6</title>
<updated>2023-10-31T16:03:54+00:00</updated>
<author>
<name>Jason R. Coombs</name>
<email>jaraco@google.com</email>
</author>
<published>2023-09-29T15:04:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=b32ccbb66bb16965ecb8b4e266c4e45186636c1b'/>
<id>urn:sha1:b32ccbb66bb16965ecb8b4e266c4e45186636c1b</id>
<content type='text'>
- Bump minimum version to Python 3.6.
- Use f-strings in a lot of places.

Change-Id: I2aa70197230fcec2eff8e7c8eb754f20c08075bb
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/389034
Tested-by: Jason R. Coombs &lt;jaraco@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Commit-Queue: Jason R. Coombs &lt;jaraco@google.com&gt;
</content>
</entry>
<entry>
<title>Use non-deprecated API for obtaining UTC time</title>
<updated>2023-09-18T23:59:37+00:00</updated>
<author>
<name>LuK1337</name>
<email>priv.luk@gmail.com</email>
</author>
<published>2023-09-16T07:36:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=aadd12cb08bede15946bc790f6005bbe120c17bc'/>
<id>urn:sha1:aadd12cb08bede15946bc790f6005bbe120c17bc</id>
<content type='text'>
DeprecationWarning: datetime.datetime.utcnow() is deprecated and
scheduled for removal in a future version. Use timezone-aware objects to
represent datetimes in UTC: datetime.datetime.now(datetime.UTC).

Change-Id: Ia2c46fb87c544d98cc2dd68a829f67d4770b479c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/386615
Tested-by: Łukasz Patron &lt;priv.luk@gmail.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Łukasz Patron &lt;priv.luk@gmail.com&gt;
Commit-Queue: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Prefix error events with RepoErrorEvent:</title>
<updated>2023-08-07T18:14:40+00:00</updated>
<author>
<name>Jason Chang</name>
<email>jasonnc@google.com</email>
</author>
<published>2023-08-03T23:18:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=b8a7b4a629c3435d77a3266a4e6dce51dc342bd9'/>
<id>urn:sha1:b8a7b4a629c3435d77a3266a4e6dce51dc342bd9</id>
<content type='text'>
Prior to this change there is no way to distinguish between git sessions logs
generated from repo source v.s. from git.

Bug: b/294446468
Change-Id: I309f59e146c30cb08a0637e8d0b9c5d9efd5cada
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/381794
Commit-Queue: Jason Chang &lt;jasonnc@google.com&gt;
Reviewed-by: Joanna Wang &lt;jojwang@google.com&gt;
Tested-by: Jason Chang &lt;jasonnc@google.com&gt;
</content>
</entry>
<entry>
<title>Format codebase with black and check formatting in CQ</title>
<updated>2023-03-22T17:46:28+00:00</updated>
<author>
<name>Gavin Mak</name>
<email>gavinmak@google.com</email>
</author>
<published>2023-03-11T06:46:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=ea2e330e43c182dc16b0111ebc69ee5a71ee4ce1'/>
<id>urn:sha1:ea2e330e43c182dc16b0111ebc69ee5a71ee4ce1</id>
<content type='text'>
Apply rules set by https://gerrit-review.googlesource.com/c/git-repo/+/362954/ across the codebase and fix any lingering errors caught
by flake8. Also check black formatting in run_tests (and CQ).

Bug: b/267675342
Change-Id: I972d77649dac351150dcfeb1cd1ad0ea2efc1956
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/363474
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>tests: drop old unittest.main logic</title>
<updated>2022-12-08T17:17:30+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2022-12-08T06:27:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=a621254b263664efa308a645214d3d140e068676'/>
<id>urn:sha1:a621254b263664efa308a645214d3d140e068676</id>
<content type='text'>
We use pytest now which doesn't need this boilerplate.

Change-Id: Ib71d90b3f1669897814ee768927b5b595ca8d789
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354355
Reviewed-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>trace: make test timeout after 2min</title>
<updated>2022-11-26T23:30:43+00:00</updated>
<author>
<name>Daniel Kutik</name>
<email>daniel.kutik@lavawerk.com</email>
</author>
<published>2022-11-25T16:15:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=eda6b1ead73e13aa15226614f16e7e748e40c118'/>
<id>urn:sha1:eda6b1ead73e13aa15226614f16e7e748e40c118</id>
<content type='text'>
Before this commit, the test was hanging forever when
run on a Windows host. This should resolve that issue.

Signed-off-by: Daniel Kutik &lt;daniel.kutik@lavawerk.com&gt;
Change-Id: Id9ea6d54926b797db3d2978a2ae2930088201eec
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/353125
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>trace: allow writing traces to a socket</title>
<updated>2022-03-16T17:33:07+00:00</updated>
<author>
<name>Josh Steadmon</name>
<email>steadmon@google.com</email>
</author>
<published>2022-03-08T18:24:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=244c9a71a689743acea97c6a07ff4dfce4dc6dab'/>
<id>urn:sha1:244c9a71a689743acea97c6a07ff4dfce4dc6dab</id>
<content type='text'>
Git can write trace2 events to a Unix domain socket [1]. This can be
specified via Git's `trace2.eventTarget` config option, which we read to
determine where to log our own trace2 events. Currently, if the Git
config specifies a socket as the trace2 target, we fail to log any
traces.

Fix this by adding support for writing to a Unix domain socket,
following the same specification that Git supports.

[1]: https://git-scm.com/docs/api-trace2#_enabling_a_target

Change-Id: I928bc22ba04fba603a9132eb055141845fa48ab2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/332339
Reviewed-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Josh Steadmon &lt;steadmon@google.com&gt;
</content>
</entry>
<entry>
<title>trace2_event: Add remove_prefix to fix failing tests on Linux &amp; macOS.</title>
<updated>2021-09-29T21:24:59+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-09-29T00:15:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=4f88206178e37205ac13220f4d38b8132839acd9'/>
<id>urn:sha1:4f88206178e37205ac13220f4d38b8132839acd9</id>
<content type='text'>
removeprefix is available i python 3.9. Mac and Linux are running in
a version below 3.9. Thus tests are failing with the following error:
  "AttributeError: 'str' object has no attribute 'removeprefix' "

Replaced the removeprefix with custom function which we will delete
once Linux and macOS versions are updated.

Tested:
$ ./run_tests

Bug: [google internal] b/201453085
Change-Id: I9b4d564ff1176e1b4471805ef05472c1914cd9f9
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/319375
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>superproject: Log syncstate's parameter as data-json it it is an array.</title>
<updated>2021-09-28T18:22:49+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-09-27T22:15:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=bbe883649402d428d1996e1ef0d81e43c7a780a0'/>
<id>urn:sha1:bbe883649402d428d1996e1ef0d81e43c7a780a0</id>
<content type='text'>
All the values of syncstate are strings, check the first byte and last
byte to see if it is an array. For syncstate data, there were no false
positives.

Tested:
$ repo_dev sync

Verified event logged for argv is "data-json".

$./run_tests

Bug: [google internal] b/201102002
Change-Id: Id56adb532b80267f08d09147ac663cdd5987ce87
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/319075
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
</content>
</entry>
<entry>
<title>superproject: Log argv parameter of syncstate as 'data-json'.</title>
<updated>2021-09-27T19:11:14+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-09-27T17:55:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=956f7363d100abe6c1f58b36d7aea59b9e41cd04'/>
<id>urn:sha1:956f7363d100abe6c1f58b36d7aea59b9e41cd04</id>
<content type='text'>
Fixed: "we need to make a special case for logging the argv; it
should probably be a "data-json" event so that we log this directly as
an array rather than an encoded string.

Tested:
$ repo_dev sync

Verified event logged for argv is "data-json".

$./run_tests

Bug: [google internal] b/201102002
Change-Id: I18ccec79c73c8dc931cb8afc472b2361db8aea4c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/319055
Reviewed-by: Josh Steadmon &lt;steadmon@google.com&gt;
Reviewed-by: Xin Li &lt;delphij@google.com&gt;
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
</content>
</entry>
</feed>
