Skip to content

feat(ApiWeb, config): add StopEventsController and resources behind feature flags#987

Open
runkelcorey wants to merge 4 commits intomasterfrom
feat-stop-events-controller
Open

feat(ApiWeb, config): add StopEventsController and resources behind feature flags#987
runkelcorey wants to merge 4 commits intomasterfrom
feat-stop-events-controller

Conversation

@runkelcorey
Copy link
Copy Markdown
Contributor

@runkelcorey runkelcorey commented Mar 27, 2026

Summary of changes

Asana Ticket: 📸↩︎ construct database query (ApiWeb.StopEventController + ApiWeb.StopEventView.location + router)

  1. Adds feature flag for stop events modules in ApiWeb. These are true in dev and test but false in prod and by default. These allow the endpoint to be hidden and prevent the relevant modules in ApiWeb from being compiled (or invoked) in production
  2. Adds stop event endpoints to router resources
  3. Adds StopEventController
  4. Adds non-raising commands to look for stop events env vars

How were these changes validated?

  1. Lots of tests for the controller, as per usual
  2. Ran mix phx.server locally withstop_events_route true and false, observing that the paths were not shown on the docs when the flag was false and were shown when the flag was true

What questions should reviewers consider?

  1. Is there a better way to do these feature flags? I don't like that I need to set the entire module within a conditional but, in my limited attempts, it seemed more annoying to specify the conditionals on a per-function or per-test basis

@runkelcorey runkelcorey requested a review from a team as a code owner March 27, 2026 19:04
@runkelcorey runkelcorey requested review from jadrian and removed request for a team March 27, 2026 19:04
@runkelcorey runkelcorey self-assigned this Mar 27, 2026
@runkelcorey runkelcorey added enhancement New feature or request elixir Pull requests that update Elixir code labels Mar 27, 2026
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just wrapping this in a conditional; otherwise, no change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just wrapping this in a conditional; otherwise, no change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

elixir Pull requests that update Elixir code enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant