Skip to content

Fix atomic catalog writes for invalid SQL identifiers - #1517

Merged
danielballan merged 3 commits into
bluesky:mainfrom
CAOShurong:codex/1459-atomic-node-validation
Oct 8, 2026
Merged

danielballan merged 3 commits into
bluesky:mainfrom
CAOShurong:codex/1459-atomic-node-validation

Conversation

@CAOShurong

Copy link
Copy Markdown

Closes #1459

Summary

  • keep the catalog node insertion in the same transaction as data-source creation so identifier or storage initialization failures roll the node back
  • return 422 for reserved, malformed, and forbidden SQL identifiers, matching the existing overlength-identifier behavior
  • cover the failure path end to end, including proving that the key remains available for a corrected retry

Testing

  • uv run pytest -n 0 tests/test_writing.py tests/adapters/test_sql.py tests/adapters/test_sql_arrays.py -q (183 passed, 61 skipped, 11 xfailed)
  • uv run pytest -n 0 tests/test_catalog.py -q (40 passed, 29 skipped)
  • uv run pre-commit run --files CHANGELOG.md tiled/adapters/sql.py tiled/catalog/adapter.py tests/test_writing.py

Checklist

  • Added a changelog entry
  • Added the issue number closed by this PR

AI assistance

OpenAI Codex was used to develop this change. The resulting diff and tests were reviewed and verified locally before submission.

Signed-off-by: CAOShurong <170531907+CAOShurong@users.noreply.github.com>
CAOShurong and others added 2 commits October 5, 2026 19:23
@danielballan
danielballan merged commit a196022 into bluesky:main Oct 8, 2026
7 of 9 checks passed
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.

Column/identifier validation errors (e.g. name > 63 chars) surface as an opaque 500 instead of a descriptive 4xx

3 participants