From dea87e18ee30122668b4b1ff4e3c11d5f9072319 Mon Sep 17 00:00:00 2001 From: Bianca Danforth Date: Tue, 16 Jul 2024 10:30:43 -0400 Subject: [PATCH 1/2] fix make devcontainerbuild command when .devcontainer-build file doesn't exist (#2960) Because: * The [Tecken docs](https://tecken.readthedocs.io/en/latest/dev.html#how-to-set-up-a-development-container-for-vs-code) suggest running this command to build the devcontainer docker container. * The command had a cyclic dependency on the .devcontainer-build file it is intended to create, causing it to enter an infinite loop when running the command locally if the .devcontainer-build file doesn't yet exist. This commit: * Moves the .devcontainer-build file requirement from `make devcontainerbuild` to the `make devcontainer` command. * adds .devcontainer-build to .gitignore --- .gitignore | 1 + Makefile | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fc3d0d663..f8abb82cd 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ all-metrics-keys.json coverage coverage.xml *.db +.devcontainer-build dist/ .docker-build docs/_build diff --git a/Makefile b/Makefile index 68738d9ff..df25719a0 100644 --- a/Makefile +++ b/Makefile @@ -60,12 +60,12 @@ run: .env .docker-build ## | Run the web app and services. web frontend fakesentry .PHONY: devcontainerbuild -devcontainerbuild: .env .docker-build .devcontainer-build ## | Build VS Code development container. +devcontainerbuild: .env .docker-build ## | Build VS Code development container. ${DC} build devcontainer touch .devcontainer-build .PHONY: devcontainer -devcontainer: .env .docker-build ## | Run VS Code development container. +devcontainer: .env .docker-build .devcontainer-build ## | Run VS Code development container. ${DC} up --detach devcontainer .PHONY: stop From 1d02937aa7996aca39af00698d631c7b5bad82b8 Mon Sep 17 00:00:00 2001 From: Sven Marnach Date: Mon, 15 Jul 2024 11:01:07 +0200 Subject: [PATCH 2/2] bug-1907816: Allow using a Redis password. --- tecken/settings.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tecken/settings.py b/tecken/settings.py index cd11ee81d..fbf3eafec 100644 --- a/tecken/settings.py +++ b/tecken/settings.py @@ -394,6 +394,12 @@ def filter(self, record): ) REDIS_URL = _config("REDIS_URL", doc="URL for Redis.") +REDIS_PASSWORD = ( + _config( + "REDIS_PASSWORD", doc="Password for the Redis AUTH command.", raise_error=False + ) + or None +) REDIS_SOCKET_CONNECT_TIMEOUT = 2 REDIS_SOCKET_TIMEOUT = 2 @@ -417,6 +423,7 @@ def filter(self, record): "BACKEND": "django_redis.cache.RedisCache", "LOCATION": REDIS_URL, "OPTIONS": { + "PASSWORD": REDIS_PASSWORD, "COMPRESSOR": "django_redis.compressors.zlib.ZlibCompressor", "SERIALIZER": "django_redis.serializers.msgpack.MSGPackSerializer", "SOCKET_CONNECT_TIMEOUT": REDIS_SOCKET_CONNECT_TIMEOUT,