Skip to content

feat: a prefix for the environment, and a stop that waits for nothing - #55

Merged
AlexeyShalaev merged 2 commits into
masterfrom
chore/the-leftovers
Sep 3, 2026
Merged

AlexeyShalaev merged 2 commits into
masterfrom
chore/the-leftovers

Conversation

@AlexeyShalaev

Copy link
Copy Markdown
Member

feat: a prefix for the environment, and a stop that waits for nothing

What was left on the list after 1.2.0, in one change.

PartitionTableSettings reads PG_PARTSMITH_TABLE_NAME and the rest under
that prefix when it is used as it is. It read bare names before, so a
host's TZ became the calendar's timezone and an empty one a validation
error; a subclass with a prefix of its own, the documented shape, is
untouched.

A Python block hook runs on a thread of its own. SIGTERM used to wait
for a block to return, because the block ran on the loop that handles
the signal, and a block that outlasted the grace period had the process
killed under it. The stop now cancels the run, which cleans up and
exits 143 at once; a block still running is abandoned with the process.

The command line tells a database that said no apart from one that was
not there: a statement the server refused -- a missing grant, a
constraint -- is exit 3, a finding for a person, where it was 5 with the
connection failures.

The Redis lock recognises its own token. redis-py retries a SET NX that
timed out, and the first attempt can have landed: the retry answered
"not set", and the run gave up on a lock it held until the TTL expired
it. A key carrying the attempt's token is the lock, acquired.

And the smaller things: the agents page lists the cli extra; the
plan-artifact guard is described as a fingerprint of the table's
configuration, not of the whole document; the lock guides say redis-py 8
speaks RESP3 and a server older than 6 wants ?protocol=2; the docs build
installs with --locked like every other job; the plan page's example
imports Path; the changelog loses a link nothing used; and the Dockerfile
stages the interpreter under the builder, so the runtime stage names no
Python version.

What was left on the list after 1.2.0, in one change.

PartitionTableSettings reads PG_PARTSMITH_TABLE_NAME and the rest under
that prefix when it is used as it is. It read bare names before, so a
host's TZ became the calendar's timezone and an empty one a validation
error; a subclass with a prefix of its own, the documented shape, is
untouched.

A Python block hook runs on a thread of its own. SIGTERM used to wait
for a block to return, because the block ran on the loop that handles
the signal, and a block that outlasted the grace period had the process
killed under it. The stop now cancels the run, which cleans up and
exits 143 at once; a block still running is abandoned with the process.

The command line tells a database that said no apart from one that was
not there: a statement the server refused -- a missing grant, a
constraint -- is exit 3, a finding for a person, where it was 5 with the
connection failures.

The Redis lock recognises its own token. redis-py retries a SET NX that
timed out, and the first attempt can have landed: the retry answered
"not set", and the run gave up on a lock it held until the TTL expired
it. A key carrying the attempt's token is the lock, acquired.

And the smaller things: the agents page lists the cli extra; the
plan-artifact guard is described as a fingerprint of the table's
configuration, not of the whole document; the lock guides say redis-py 8
speaks RESP3 and a server older than 6 wants ?protocol=2; the docs build
installs with --locked like every other job; the plan page's example
imports Path; the changelog loses a link nothing used; and the Dockerfile
stages the interpreter under the builder, so the runtime stage names no
Python version.
@codecov

codecov Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.36620% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pg_partsmith/aio/python_hooks.py 91.66% 1 Missing and 1 partial ⚠️
pg_partsmith/cli/main.py 85.71% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

…sentences

What the review of the change found. The GET that checks whether the
key carries this attempt's token runs in the held-key window, and it
sat outside the guard that releases on a cancellation or an interrupt;
a GET that failed escaped as the driver's own exception. Both mirrors
release there now, and a failed GET is a lock not acquired. The command
line classified a refused statement by the exception class the driver
adapter chose, and under asyncpg only a syntax or access error and a
constraint violation got one of their own; it reads the SQLSTATE
instead, and prints the driver's message rather than the adapter's
class name. The module docstring of the async Python hooks, and two
sentences of the changelog, say what the code does.
@AlexeyShalaev
AlexeyShalaev merged commit d555cde into master Sep 3, 2026
31 of 32 checks passed
@AlexeyShalaev
AlexeyShalaev deleted the chore/the-leftovers branch September 6, 2026 07:26
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.

1 participant