<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go-x-pkgsite/internal/database/database_test.go, branch main</title>
<subtitle>Fork of golang.org/x/pkgsite with my patches.</subtitle>
<id>http://git.kilabit.info/go-x-pkgsite/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/go-x-pkgsite/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-pkgsite/'/>
<updated>2026-03-26T20:34:39Z</updated>
<entry>
<title>all: fix rangeint</title>
<updated>2026-03-26T20:34:39Z</updated>
<author>
<name>Hana Kim</name>
<email>hyangah@gmail.com</email>
</author>
<published>2026-03-06T03:46:58Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-pkgsite/commit/?id=8378ff811c1228f6a50808cb7557e6c08782205a'/>
<id>urn:sha1:8378ff811c1228f6a50808cb7557e6c08782205a</id>
<content type='text'>
Change-Id: I58ed5e7d2a3bbc13bc389ac7239737e18856dbfe
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/753427
Reviewed-by: Jonathan Amsterdam &lt;jba@google.com&gt;
Reviewed-by: Ethan Lee &lt;ethanalee@google.com&gt;
kokoro-CI: kokoro &lt;noreply+kokoro@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>all: pgx/v4 to v5 and upgrade pq</title>
<updated>2026-03-24T19:07:17Z</updated>
<author>
<name>Ethan Lee</name>
<email>ethanalee@google.com</email>
</author>
<published>2026-03-23T20:01:34Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-pkgsite/commit/?id=2a28a75de8607004c628480a40a1ecfc9d3cdfe1'/>
<id>urn:sha1:2a28a75de8607004c628480a40a1ecfc9d3cdfe1</id>
<content type='text'>
- In preparation for upgrade to PostgreSQL 17, upgrade stale
  dependencies within pkgsite.

Change-Id: Id54cbb46182711b9808ee3bbbe2f0d5d9a04583d
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/758121
Auto-Submit: Ethan Lee &lt;ethanalee@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Jonathan Amsterdam &lt;jba@google.com&gt;
kokoro-CI: kokoro &lt;noreply+kokoro@google.com&gt;
</content>
</entry>
<entry>
<title>internal/database: remove sawRetries logic from TestTransactSerializable</title>
<updated>2026-03-05T17:51:55Z</updated>
<author>
<name>Ethan Lee</name>
<email>ethanalee@google.com</email>
</author>
<published>2026-03-04T23:12:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-pkgsite/commit/?id=9babc826f335392ca3a3317ba234b83125a55bf5'/>
<id>urn:sha1:9babc826f335392ca3a3317ba234b83125a55bf5</id>
<content type='text'>
- This test has a history of flakiness. PostgreSQL 14 includes
  significant improvements to its Serializable Snapshot Isolation which
  means it is much efficient in reducing false positive serialization
  conflicts. To amend this, this test now focuses on data integrity
  rather than an arbitary retry counter.

Change-Id: I7d9a46303a6cc4eb011d9d3764ebf0c61e2d6287
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/751680
Reviewed-by: Hyang-Ah Hana Kim &lt;hyangah@gmail.com&gt;
kokoro-CI: kokoro &lt;noreply+kokoro@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Auto-Submit: Ethan Lee &lt;ethanalee@google.com&gt;
</content>
</entry>
<entry>
<title>all: remove arbitrary hard-coded timeouts in tests</title>
<updated>2023-08-23T16:58:07Z</updated>
<author>
<name>Bryan C. Mills</name>
<email>bcmills@google.com</email>
</author>
<published>2023-08-22T19:23:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-pkgsite/commit/?id=76f4137fe5bb3d97d1ffa28cb490e71a96d5dcb9'/>
<id>urn:sha1:76f4137fe5bb3d97d1ffa28cb490e71a96d5dcb9</id>
<content type='text'>
If a test times out, that implies that it got stuck on something.
By default, the Go testing package dumps goroutines when its own
timeout is passed, which prints a goroutine dump, helping to reveal
what was stuck.

Adding an arbitrary timeout on top of the testing package's own
timeout is, in my experience, almost always counterproductive.
If the arbitrary timeout catches a real hang, it causes the test to
fail instead of dumping goroutines, making it much harder to see what
was stuck. On the other hand, if the timeouts are set aggressively
enough to make the test fail early, they are often too aggressive
for CI testing, causing flakes that then have to be triaged on an
ongoing basis.

On balance, the value of saving a minute or two for developers who
have introduced a hang is not worth the cost of suppressing debugging
information and causing flakes that have to be triaged.

Fixes #61556.
For #59347.

Change-Id: I0263d0d9b18283470f100e5a0155818b87b5312f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/521837
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Bryan Mills &lt;bcmills@google.com&gt;
Run-TryBot: Bryan Mills &lt;bcmills@google.com&gt;
kokoro-CI: kokoro &lt;noreply+kokoro@google.com&gt;
Reviewed-by: Michael Matloob &lt;matloob@golang.org&gt;
</content>
</entry>
<entry>
<title>all: convert interface{} to any</title>
<updated>2022-11-15T20:10:34Z</updated>
<author>
<name>Hana (Hyang-Ah) Kim</name>
<email>hyangah@gmail.com</email>
</author>
<published>2022-11-10T23:01:09Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-pkgsite/commit/?id=694b5d3c2a971c2a1dcdf7ab34e521b762bd326d'/>
<id>urn:sha1:694b5d3c2a971c2a1dcdf7ab34e521b762bd326d</id>
<content type='text'>
Change-Id: I1f3b7cc8899c7707abb01e3d14807c37c3451382
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/449695
TryBot-Result: kokoro &lt;noreply+kokoro@google.com&gt;
Reviewed-by: Jamal Carvalho &lt;jamal@golang.org&gt;
Run-TryBot: Hyang-Ah Hana Kim &lt;hyangah@gmail.com&gt;
</content>
</entry>
<entry>
<title>internal: remove experiments</title>
<updated>2022-04-21T15:17:02Z</updated>
<author>
<name>Jonathan Amsterdam</name>
<email>jba@google.com</email>
</author>
<published>2022-04-20T21:12:05Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-pkgsite/commit/?id=bbbf7a68a7292ee89986f201de80bb1fd294482d'/>
<id>urn:sha1:bbbf7a68a7292ee89986f201de80bb1fd294482d</id>
<content type='text'>
Remove the deprecated-doc and deps-dev-link experiments, which
have been fully rolled out.

I found I also had to increase some parameters on the serializablity
test in internal/database to make it pass on my machine.
Reasons unknown.

Change-Id: Ibcb1f8167474884d6c029da55f2d31b3c5adcfc6
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/401237
Run-TryBot: Jonathan Amsterdam &lt;jba@google.com&gt;
Reviewed-by: Jamal Carvalho &lt;jamal@golang.org&gt;
</content>
</entry>
<entry>
<title>internal/database: use generics for Collect functions</title>
<updated>2022-03-07T15:51:22Z</updated>
<author>
<name>Jonathan Amsterdam</name>
<email>jba@google.com</email>
</author>
<published>2022-03-04T18:48:07Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-pkgsite/commit/?id=2beb68e7d8664b09d87cabe67943dc13b1131207'/>
<id>urn:sha1:2beb68e7d8664b09d87cabe67943dc13b1131207</id>
<content type='text'>
Reimplement some reflection-based collection functions to
use generics.

In some cases we still need reflection, but at least we
can provide a type-safe wrapper with generics.

Change-Id: Id95949a7a22ee687166ecdfc1191150d79568889
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/389657
Trust: Jonathan Amsterdam &lt;jba@google.com&gt;
Run-TryBot: Jonathan Amsterdam &lt;jba@google.com&gt;
TryBot-Result: kokoro &lt;noreply+kokoro@google.com&gt;
Reviewed-by: Jamal Carvalho &lt;jamal@golang.org&gt;
</content>
</entry>
<entry>
<title>internal/{database,postgres}: export CollectStrings</title>
<updated>2021-07-21T13:37:24Z</updated>
<author>
<name>Jonathan Amsterdam</name>
<email>jba@google.com</email>
</author>
<published>2021-07-21T12:21:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-pkgsite/commit/?id=5b7094a7c3ccffe2079c9b4074f155239877929d'/>
<id>urn:sha1:5b7094a7c3ccffe2079c9b4074f155239877929d</id>
<content type='text'>
Export the CollectStrings function and move to the database package so
it can be used elsewhere.

Change-Id: I1032e4f5042209e42e8f0de9cebfb48653d56f69
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/336209
Trust: Jonathan Amsterdam &lt;jba@google.com&gt;
Run-TryBot: Jonathan Amsterdam &lt;jba@google.com&gt;
TryBot-Result: kokoro &lt;noreply+kokoro@google.com&gt;
Reviewed-by: Julie Qiu &lt;julie@golang.org&gt;
</content>
</entry>
<entry>
<title>internal/database: merge dbtest into package</title>
<updated>2021-07-16T19:00:08Z</updated>
<author>
<name>Julie Qiu</name>
<email>julie@golang.org</email>
</author>
<published>2021-07-16T15:43:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-pkgsite/commit/?id=22c795fe59403c6c382390e301d2a203731082b6'/>
<id>urn:sha1:22c795fe59403c6c382390e301d2a203731082b6</id>
<content type='text'>
There doesn't seem to be any reason that dbtest needs to be its own
package, and the functions there are useful for scripts beyond use in Go
test files.

db_test.go is merged into the internal/datbase package and the file is
renamed to dbutil.go. References are fixed.

Change-Id: I5ed295f147c5b9e891c243e2c5028708b12f5c75
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/335089
Trust: Julie Qiu &lt;julie@golang.org&gt;
Run-TryBot: Julie Qiu &lt;julie@golang.org&gt;
TryBot-Result: kokoro &lt;noreply+kokoro@google.com&gt;
Reviewed-by: Jamal Carvalho &lt;jamal@golang.org&gt;
Reviewed-by: Jonathan Amsterdam &lt;jba@google.com&gt;
</content>
</entry>
<entry>
<title>internal/database: add ability to run queries incrementally</title>
<updated>2021-06-18T17:41:02Z</updated>
<author>
<name>Jonathan Amsterdam</name>
<email>jba@google.com</email>
</author>
<published>2021-06-17T14:17:27Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go-x-pkgsite/commit/?id=9b1c9bd2b0c3df16a819a464b4ecf410b0557a48'/>
<id>urn:sha1:9b1c9bd2b0c3df16a819a464b4ecf410b0557a48</id>
<content type='text'>
Postgres lets you define a cursor and fetch rows from it as top-level
statements, without needing to write any PS-SQL. See
https://www.postgresql.org/docs/11/sql-declare.html and
https://www.postgresql.org/docs/11/sql-fetch.html for details.

Use this feature to define RunQueryIncrementally, which repeatedly
fetches query rows in batches until it runs out or the passed function
says it's done.

If grouping by module paths is enabled, use RunQueryIncrementally
with a very large limit to read rows until we've seen a page's worth
of module paths.

This CL doesn't handle pagination correctly. Any page after the first
is going to be wrong.

Change-Id: Idf8233160b0cf74412a688e1a6b95f4f2b720008
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/329469
Trust: Jonathan Amsterdam &lt;jba@google.com&gt;
Run-TryBot: Jonathan Amsterdam &lt;jba@google.com&gt;
TryBot-Result: kokoro &lt;noreply+kokoro@google.com&gt;
Reviewed-by: Julie Qiu &lt;julie@golang.org&gt;
</content>
</entry>
</feed>
