Skip to content

fix(deploy): CI topic seeding — correct S3 bucket + missing seed non-fatal - #329

Merged
mottych merged 1 commit into
devfrom
fix/deploy-seed-prompts-bucket
Apr 21, 2026
Merged

fix(deploy): CI topic seeding — correct S3 bucket + missing seed non-fatal#329
mottych merged 1 commit into
devfrom
fix/deploy-seed-prompts-bucket

Conversation

@mottych

@mottych mottych commented Apr 21, 2026

Copy link
Copy Markdown
Owner

Problem

Deploy Dev failed on the post-merge Seed topic registry step: NoSuchBucket for purposepath-coaching-prompts-dev. The seed script used Settings defaults while infrastructure/pulumi creates purposepath-coaching-prompts-380276784420-<stack> (see infrastructure/pulumi/__main__.py).

After fixing the bucket, seeding would still exit 1 because many registry topics have no TopicSeedData row; those were counted as errors.

Changes

  1. Workflows (deploy-dev, deploy-staging, deploy-production): export PROMPTS_BUCKET=purposepath-coaching-prompts-380276784420-${STAGE} before running seed_topics.

  2. TopicSeedingService: topics with no seed data go to SeedingResult.missing_seed_topics (warning path), not errors, so is_successful stays true when Dynamo/S3 operations succeed.

  3. seed_topics CLI: print a Registry topics without seed data section and summary line Missing seed:.

  4. Tests: patch list_all_topics (what the service actually calls); add test for missing-seed behavior; assert missing_seed_topics does not fail is_successful.

Validation

pytest coaching/tests/unit/services/test_topic_seeding_service.py -v; ruff + mypy on touched modules.

- Set PROMPTS_BUCKET to purposepath-coaching-prompts-380276784420- plus stack name (STAGE) in deploy workflows; matches infrastructure/pulumi S3 bucket

- Treat registry topics without TopicSeedData as missing_seed_topics, not errors, so seed exits 0 when S3/Dynamo succeed

- Fix unit tests to patch list_all_topics; add coverage for missing-seed path

Made-with: Cursor
@mottych
mottych merged commit 4cfe738 into dev Apr 21, 2026
2 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.

1 participant