Skip to content

sa: check for sql.ErrNoRows on Get()#8732

Merged
jsha merged 4 commits intomainfrom
is-no-rows
Apr 28, 2026
Merged

sa: check for sql.ErrNoRows on Get()#8732
jsha merged 4 commits intomainfrom
is-no-rows

Conversation

@jsha
Copy link
Copy Markdown
Contributor

@jsha jsha commented Apr 24, 2026

This pulls in the latest borp, including letsencrypt/borp#13, which makes Get() return sql.ErrNoRows instead of a nil object.

This fixes the lagFactor check in sa.GetAuthorization2, which was expecting sql.ErrNoRows but never received it (because Get() was returning nil, nil). GetAuthorization2 is not touched in this PR because we're updating the dependency to match its existing behavior.

Change the behavior of all the other SA calls to Get() to look for sql.ErrNoRows instead of obj == nil.

After updating borp, Get() will return IsNoRows instead of a nil object.
@jsha jsha changed the title sa: check IsNoRows on Get() sa: check for sql.ErrNoRows on Get() Apr 24, 2026
@jsha jsha marked this pull request as ready for review April 28, 2026 18:20
@jsha jsha requested a review from a team as a code owner April 28, 2026 18:20
@jsha jsha requested a review from beautifulentropy April 28, 2026 18:20
@jsha jsha marked this pull request as draft April 28, 2026 18:28
@jsha jsha marked this pull request as ready for review April 28, 2026 19:28
@jsha jsha merged commit 350fe31 into main Apr 28, 2026
17 checks passed
@jsha jsha deleted the is-no-rows branch April 28, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants