Skip to content

Set feed visibility during dmfr sync#547

Merged
irees merged 4 commits intomainfrom
sync-visibility
Dec 30, 2025
Merged

Set feed visibility during dmfr sync#547
irees merged 4 commits intomainfrom
sync-visibility

Conversation

@irees
Copy link
Copy Markdown
Contributor

@irees irees commented Dec 29, 2025

⚠️ Behavioral Change (Breaking)

Previous: New feed states defaulted to [public = false]
Now: New feed states default to [public = true]

Mitigation: Users can use --set-private flag with sync if they want the old behavior.

@irees irees marked this pull request as ready for review December 29, 2025 12:48
Copilot AI review requested due to automatic review settings December 29, 2025 12:48
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 pull request adds the ability to control feed visibility (public/private) during DMFR sync operations. New command-line flags --set-public and --set-private allow administrators to explicitly set the public/private state of feeds during synchronization, with sensible defaults: new feeds are public by default, and existing feeds retain their current state unless explicitly changed.

Key Changes

  • Added --set-public and --set-private command-line flags with mutual exclusivity validation
  • Modified UpdateFeed() to accept an optional setPublic parameter for controlling visibility
  • Implemented UpdateFeedStatePublic() function to create or update feed state visibility with conditional logic

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cmds/sync_cmd.go Added command-line flags and validation for mutually exclusive public/private options
sync/sync.go Added SetPublic field to Options struct and passed it through to UpdateFeed
sync/sync_feed.go Modified UpdateFeed signature to accept setPublic parameter and call UpdateFeedStatePublic
stats/dbutil.go Implemented new UpdateFeedStatePublic function with conditional create/update logic
sync/sync_test.go Updated test calls to pass nil for the new setPublic parameter
doc/cli/transitland_sync.md Updated CLI documentation to describe new flags and default behavior
testdata/server/test_supplement.pgsql Added SQL to set all feed states to private by default in test data
server/auth/authz/azpb_grpc.pb.go Regenerated with protoc v6.33.2 (was v6.32.0)
server/auth/authz/azpb.pb.go Regenerated with protoc v6.33.2 (was v6.32.0)
rt/pb/gtfs-realtime.pb.go Regenerated with protoc v6.33.2 (was v6.32.0)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@irees irees merged commit 465aad1 into main Dec 30, 2025
6 checks passed
@irees irees deleted the sync-visibility branch December 30, 2025 13:24
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