Skip to content

Feed state manager#513

Merged
irees merged 10 commits intomainfrom
materialize-active
Oct 21, 2025
Merged

Feed state manager#513
irees merged 10 commits intomainfrom
materialize-active

Conversation

@irees
Copy link
Copy Markdown
Contributor

@irees irees commented Oct 21, 2025

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 21, 2025

Generated Code Check ✅

All generated code is up to date.

@irees irees changed the title Materialize active Feed state manager Oct 21, 2025
@irees irees requested a review from Copilot October 21, 2025 06:03
@irees irees marked this pull request as ready for review October 21, 2025 06:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a feed state management system to handle active feed versions and maintain materialized tables for improved query performance. It provides centralized control over feed version activation/deactivation and creates denormalized cache tables for routes, stops, and agencies.

Key changes:

  • New feedstate.Manager component for managing feed state and materialized tables
  • Materialized tables (tl_materialized_active_routes, tl_materialized_active_stops, tl_materialized_active_agencies) to cache active entity data
  • CLI command feed-state for manual feed state management operations

Reviewed Changes

Copilot reviewed 34 out of 35 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
schema/sqlite/sqlite.sql Adds textsearch columns to GTFS tables and creates three new materialized tables for caching active routes, stops, and agencies
schema/postgres/migrations/20251020000001_materialized_index.up.pgsql PostgreSQL migration creating the same materialized tables with appropriate indexes
internal/feedstate/manager.go Core feed state manager implementing activation/deactivation logic and materialized table operations
internal/feedstate/manager_test.go Comprehensive test suite covering all manager operations
importer/importer.go Updates activation logic to use the new feed state manager
importer/unimporter.go Updates deactivation logic to use the new feed state manager
cmds/feed_state_cmd.go New CLI command for managing feed state operations
cmd/transitland/main.go Registers the new feed-state command
doc/cli/*.md Auto-generated documentation updates

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@irees irees merged commit f825a94 into main Oct 21, 2025
6 checks passed
@irees irees deleted the materialize-active branch October 21, 2025 06:05
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.

2 participants