Hide state action behind feature flag#943
Merged
esoterik merged 3 commits into2024-upgrades-mainfrom May 7, 2025
Merged
Conversation
The Civic API is going to be shut down in a week or two. We need to remove the corresponding code and decide on if/how to move forward with a new service that provides representative info. In meantime this turns off the state level actions from the user interface (public and admin) and returns a 404 from the corresponding endpoint in the tools controller when STATE_ACTIONS_ENABLED is unset. In the future, we can swap out the backend logic and reenable by setting the env var to true.
e897c22 to
aac8850
Compare
c73a707 to
247731f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to the docs, the Google Civic API is going to be shut down on April 30. We need to remove the corresponding code and decide on if/how to move forward with a new service that provides representative info.
In meantime this turns off the state level actions from the user interface (public and admin) and returns a 404 from the corresponding endpoint in the tools controller when STATE_ACTIONS_ENABLED is unset.
In the future, we can swap out the backend logic and reenable by setting the env var to true. Felt this would be easier to refactor and pick back up than removing the code entirely.
I think I hid all of the places where a user might trigger the state action code, but I could definitely use a once over to confirm. Here is the recent MR that refactors the state-level actions for reference.