Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to EMERGENCY_BANNER_REDIS_URL in Emergency Banner controller #9474

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

Gweaton
Copy link
Contributor

@Gweaton Gweaton commented Sep 26, 2024

Trello card

In alphagov/govuk-helm-charts@5011635 we added a new EMERGENCY_BANNER_REDIS_URL environment variable to Whitehall Admin on Integration pointing to the newly-provisioned Redis instance's database (/1).

Here we access that value in the Emergency Banner controller.

For environments that don't have this variable set yet (i.e. Staging and Production) we fallback on the default REDIS_URL.

This is temporary - once we've moved all environments over to the new URL we can remove this default.

NB: We'll need to deploy the corresponding change in Static's codebase at the same time as this one to ensure the two are using the same shared instance

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.

@Gweaton Gweaton force-pushed the add-emergency-banner-url-to-redis branch from e78618d to ad35fad Compare September 26, 2024 14:26
This is a new environment variable we've currently added to Integration
to allow us to switch Whitehall to a new Redis instance.

For environments that don't have this variable set yet (i.e. Staging and
Production) we fallback on the default `REDIS_URL`.

This is temporary - once we've moved all environments over to the new
URL we can remove this default.

`mock_env` is shamelessly copied from
[here](https://gist.github.com/jazzytomato/79bb6ff516d93486df4e14169f4426af)
and allows us to specify some environment variables that won't persist
between tests.

I'd probably extract this to a helper for future use but this is a
temporary change that we'll remove fairly soon.
@Gweaton Gweaton merged commit 1d23176 into main Sep 27, 2024
19 checks passed
@Gweaton Gweaton deleted the add-emergency-banner-url-to-redis branch September 27, 2024 09:20
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