Skip to content

Commit

Permalink
Merge branch 'master' into jci/issue#35836
Browse files Browse the repository at this point in the history
  • Loading branch information
jciasenza authored Dec 16, 2024
2 parents 6758178 + fb56042 commit f1e94fc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 319 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/docker-publish.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/publish-ci-docker-image.yml

This file was deleted.

200 changes: 0 additions & 200 deletions Dockerfile

This file was deleted.

34 changes: 1 addition & 33 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Do things in edx-platform
.PHONY: base-requirements check-types clean \
compile-requirements detect_changed_source_translations dev-requirements \
docker_auth docker_build docker_tag_build_push_lms docker_tag_build_push_lms_dev \
docker_tag_build_push_cms docker_tag_build_push_cms_dev docs extract_translations \
docs extract_translations \
guides help lint-imports local-requirements migrate migrate-lms migrate-cms \
pre-requirements pull pull_xblock_translations pull_translations push_translations \
requirements shell swagger \
Expand Down Expand Up @@ -67,9 +66,6 @@ pull_translations: clean_translations ## pull translations via atlas
detect_changed_source_translations: ## check if translation files are up-to-date
i18n_tool changed

pull: ## update the Docker image used by "make shell"
docker pull edxops/edxapp:latest

pre-requirements: ## install Python requirements for running pip-tools
pip install -r requirements/pip.txt
pip install -r requirements/pip-tools.txt
Expand All @@ -94,13 +90,6 @@ test-requirements: pre-requirements

requirements: dev-requirements ## install development environment requirements

shell: ## launch a bash shell in a Docker container with all edx-platform dependencies installed
docker run -it -e "NO_PYTHON_UNINSTALL=1" -e "PIP_INDEX_URL=https://pypi.python.org/simple" -e TERM \
-v `pwd`:/edx/app/edxapp/edx-platform:cached \
-v edxapp_lms_assets:/edx/var/edxapp/staticfiles/ \
-v edxapp_node_modules:/edx/app/edxapp/edx-platform/node_modules \
edxops/edxapp:latest /edx/app/edxapp/devstack.sh open

# Order is very important in this list: files must appear after everything they include!
REQ_FILES = \
requirements/edx/coverage \
Expand Down Expand Up @@ -164,27 +153,6 @@ upgrade-package: ## update just one package to the latest usable release
check-types: ## run static type-checking tests
mypy

docker_auth:
echo "$$DOCKERHUB_PASSWORD" | docker login -u "$$DOCKERHUB_USERNAME" --password-stdin

docker_build: docker_auth
DOCKER_BUILDKIT=1 docker build . --build-arg SERVICE_VARIANT=lms --build-arg SERVICE_PORT=8000 --target development -t openedx/lms-dev
DOCKER_BUILDKIT=1 docker build . --build-arg SERVICE_VARIANT=lms --build-arg SERVICE_PORT=8000 --target production -t openedx/lms
DOCKER_BUILDKIT=1 docker build . --build-arg SERVICE_VARIANT=cms --build-arg SERVICE_PORT=8010 --target development -t openedx/cms-dev
DOCKER_BUILDKIT=1 docker build . --build-arg SERVICE_VARIANT=cms --build-arg SERVICE_PORT=8010 --target production -t openedx/cms

docker_tag_build_push_lms: docker_auth
docker buildx build -t openedx/lms:latest -t openedx/lms:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --build-arg SERVICE_VARIANT=lms --build-arg SERVICE_PORT=8000 --target production --push .

docker_tag_build_push_lms_dev: docker_auth
docker buildx build -t openedx/lms-dev:latest -t openedx/lms-dev:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --build-arg SERVICE_VARIANT=lms --build-arg SERVICE_PORT=8000 --target development --push .

docker_tag_build_push_cms: docker_auth
docker buildx build -t openedx/cms:latest -t openedx/cms:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --build-arg SERVICE_VARIANT=cms --build-arg SERVICE_PORT=8010 --target production --push .

docker_tag_build_push_cms_dev: docker_auth
docker buildx build -t openedx/cms-dev:latest -t openedx/cms-dev:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --build-arg SERVICE_VARIANT=cms --build-arg SERVICE_PORT=8010 --target development --push .

lint-imports:
lint-imports

Expand Down
10 changes: 10 additions & 0 deletions common/djangoapps/util/memcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from django.conf import settings
from django.utils.encoding import smart_str
from edx_django_utils.monitoring.utils import increment


def fasthash(string):
Expand Down Expand Up @@ -48,9 +49,18 @@ def safe_key(key, key_prefix, version):
# Attempt to combine the prefix, version, and key
combined = ":".join([key_prefix, version, key])

# Temporary: Add observability to large-key hashing to help us
# understand the safety of a cutover from md4 to blake2b hashing.
# See https://github.com/edx/edx-arch-experiments/issues/872
increment('memcache.safe_key.called')

# If the total length is too long for memcache, hash it
if len(combined) > 250:
combined = fasthash(combined)
# Temporary: See
# https://github.com/edx/edx-arch-experiments/issues/872 and
# previous comment.
increment('memcache.safe_key.hash_large')

# Return the result
return combined

0 comments on commit f1e94fc

Please sign in to comment.