Skip to content

Sync fmsgid DD with quota pools, and show why API key creation fails - #23

Merged
markmnl merged 1 commit into
mainfrom
sync-fmsgid-quota-pools-dd
Oct 10, 2026
Merged

markmnl merged 1 commit into
mainfrom
sync-fmsgid-quota-pools-dd

Conversation

@markmnl

@markmnl markmnl commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Why

Integration tests have been failing at "Creating integration-test API keys..." with Failed to create API key for @alice@hairpin.local / api-key: grant not found. They fail with main refs too (run 38033521036), not just with feature branches.

Root cause. fmsgid main now selects address.quota_pool (quota pools, markmnl/fmsgid#7). The fmsgid DD copied into this repo (docker/postgres/init/002-fmsgid-dd.sql) predates that column. So every GET /fmsgid/:address failed with 500: ERROR: column a.quota_pool does not exist.

How that became the error above:

  1. fmsg-webapi api-key create-delegation failed checking the owner: api-key: checking owner in fmsgid: unexpected status 500.
  2. The harness then fell back to rotate-delegation, which fails with grant not found because no grant exists yet.
  3. Only that second error was printed.

What

  • Refreshed 002-fmsgid-dd.sql from fmsgid main with scripts/update-dd.sh (--check now reports everything up to date).
  • test/run-tests.sh prints both the create-delegation and rotate-delegation errors when both fail, so a failure like this names its real cause.

Tests

🤖 Generated with Claude Code

fmsgid main (quota pools, markmnl/fmsgid#7) selects address.quota_pool,
which the copied fmsgid DD here didn't have, so every address lookup
failed with 500 ("column a.quota_pool does not exist"). The integration
tests then stopped at creating API keys: create-delegation failed
checking the owner in fmsgid, and only the rotate fallback's error
("grant not found") was printed.

Refresh docker/postgres/init/002-fmsgid-dd.sql with scripts/update-dd.sh
from fmsgid main. When both create-delegation and rotate-delegation fail,
print both errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@markmnl
markmnl merged commit c05e2b4 into main Oct 10, 2026
2 checks passed
@markmnl
markmnl deleted the sync-fmsgid-quota-pools-dd branch October 10, 2026 07:37
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