Skip to content

SQL: Ensure creation is idempotent#102

Merged
awilfox merged 1 commit intomainfrom
awilfox/AP-558-idempotent-sql
Feb 3, 2026
Merged

SQL: Ensure creation is idempotent#102
awilfox merged 1 commit intomainfrom
awilfox/AP-558-idempotent-sql

Conversation

@awilfox
Copy link
Member

@awilfox awilfox commented Jan 30, 2026

This was meant to be done a long time ago, but it was lost in a Git stash. (Sorry!) This is needed to make sure the updater service doesn't continually fail when it is run.

Ref: AP-558

This was meant to be done a long time ago, but it was lost in a Git
stash.  (Sorry!)  This is needed to make sure the updater service
doesn't continually fail when it is run.

Ref: AP-558
@awilfox awilfox force-pushed the awilfox/AP-558-idempotent-sql branch from 10ec14c to a471a45 Compare January 31, 2026 00:14
@awilfox
Copy link
Member Author

awilfox commented Jan 31, 2026

v2: Ensure primary/foreign key constraints are part of table creation.

Copy link
Member

@danschmidt5189 danschmidt5189 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for cleaning this up. Conditionally +1 assuming that this has actually been tested! (Does the test suite load/cover this?)

@awilfox
Copy link
Member Author

awilfox commented Jan 31, 2026

Looks good, thanks for cleaning this up. Conditionally +1 assuming that this has actually been tested! (Does the test suite load/cover this?)

The test suite doesn't cover any of the UI, unfortunately. Unlike Ruby, Python doesn't have a Capybara that the community all likes and uses and coalesces around. (There is Splinter but it's very heavy.)

I spun up a new instance of Willa locally and ran the script a few times to ensure that it created it properly (and the app functioned) and then was idempotent (and the app remained functional).

Copy link
Member

@anarchivist anarchivist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+!

The test suite doesn't cover any of the UI, unfortunately. Unlike Ruby, Python doesn't have a Capybara that the community all likes and uses and coalesces around. (There is Splinter but it's very heavy.)

fwiw, Chainlit's UI testing is all done using Cypress: https://github.com/Chainlit/chainlit/tree/main/cypress

@awilfox awilfox merged commit a471a45 into main Feb 3, 2026
9 checks passed
@awilfox awilfox deleted the awilfox/AP-558-idempotent-sql branch February 3, 2026 02:30
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