From fa4ab4fa7aeb3440f4229e0354f4a2c687cb81bc Mon Sep 17 00:00:00 2001 From: Zubair Shakoor <57657330+zubairshakoorarbisoft@users.noreply.github.com> Date: Fri, 1 Sep 2023 18:55:46 +0500 Subject: [PATCH 1/4] fix: readthedocs file renamed (#4024) Updating readthedocs extension as yml going to be deprecated in september Issue: edx/edx-arch-experiments#418 --- .readthedocs.yml => .readthedocs.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .readthedocs.yml => .readthedocs.yaml (100%) diff --git a/.readthedocs.yml b/.readthedocs.yaml similarity index 100% rename from .readthedocs.yml rename to .readthedocs.yaml From f0e196fe4371f56a14969a1fb0d2fed79c39630a Mon Sep 17 00:00:00 2001 From: salmannawaz Date: Thu, 7 Sep 2023 18:40:07 +0500 Subject: [PATCH 2/4] fix: Docker multi-arch images push for linux/amd64, linux/arm64 (#4006) * fix: docker multi-arch image push * fix: docker multi-arch images, code improvements --------- Co-authored-by: Salman Nawaz --- .github/workflows/docker-publish.yml | 30 ++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index ddc2a944ca7..9e48086f964 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -26,25 +26,39 @@ jobs: console.log('Will use tag: ' + tagName); return tagName; result-encoding: string + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Build and push Dev Docker image - uses: docker/build-push-action@v1 + uses: docker/build-push-action@v4 with: push: true - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} target: dev repository: edxops/ecommerce-dev - tags: ${{ steps.get-tag-name.outputs.result }},${{ github.sha }} + tags: | + edxops/ecommerce-dev:${{ steps.get-tag-name.outputs.result }} + edxops/ecommerce-dev:${{ github.sha }} + platforms: linux/amd64,linux/arm64 # The current priority is to get the devstack off of Ansible based Images. Once that is done, we can come back to this part to get # suitable images for smaller prod environments. # - name: Build and push prod Docker image - # uses: docker/build-push-action@v1 + # uses: docker/build-push-action@v4 # with: # push: true - # username: ${{ secrets.DOCKERHUB_USERNAME }} - # password: ${{ secrets.DOCKERHUB_PASSWORD }} # target: prod # repository: edxops/ecommerce-prod - # tags: ${{ steps.get-tag-name.outputs.result }},${{ github.sha }} + # tags: | + # edxops/ecommerce-prod:${{ steps.get-tag-name.outputs.result }} + # edxops/ecommerce-prod:${{ github.sha }} + # platforms: linux/amd64,linux/arm64 From 5ee776c61a89ab651a13f9c242b95243c8ce4f29 Mon Sep 17 00:00:00 2001 From: Robert Raposa Date: Fri, 20 Oct 2023 10:43:50 -0400 Subject: [PATCH 3/4] feat: upgrade edx-drf-extensions and newrelic (#4027) * fix: test update for edx-drf-extensions 8.11.0 The method generate_unversioned_payload in edx-drf-extensions now requires a user.id to function, so that needed to be added to the mock user. * feat: upgrade edx-drf-extensions Upgrade edx-drf-extensions to 8.12.0. This was done using a temporary constraint and pip-compile without the --upgrade to keep from upgrading unrelated requirements. * feat: upgrade newrelic Upgrade newrelic to 9.1.0. This was done using a temporary constraint and pip-compile without the --upgrade to keep from upgrading unrelated requirements. --- ecommerce/tests/mixins.py | 1 + requirements/base.txt | 6 ++---- requirements/dev.txt | 6 ++---- requirements/e2e.txt | 2 +- requirements/production.in | 2 +- requirements/production.txt | 6 ++---- requirements/test.txt | 6 ++---- 7 files changed, 11 insertions(+), 18 deletions(-) diff --git a/ecommerce/tests/mixins.py b/ecommerce/tests/mixins.py index a03154b06d6..349c6f11e0b 100644 --- a/ecommerce/tests/mixins.py +++ b/ecommerce/tests/mixins.py @@ -137,6 +137,7 @@ def generate_new_user_token(self, username, email, is_staff): # create a mock user, and not the actual user, because we want to confirm that # the user is created during JWT authentication user = Mock() + user.id = 1 user.username = username user.email = email user.is_staff = is_staff diff --git a/requirements/base.txt b/requirements/base.txt index 6bec622bc53..59589075df6 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -226,7 +226,7 @@ edx-django-utils==5.5.0 # edx-drf-extensions # edx-rest-api-client # getsmarter-api-clients -edx-drf-extensions==8.8.0 +edx-drf-extensions==8.12.0 # via # -r requirements/base.in # edx-rbac @@ -349,7 +349,7 @@ naked==0.1.32 # cybersource-rest-client-python ndg-httpsclient==0.5.1 # via -r requirements/base.in -newrelic==8.8.0 +newrelic==9.1.0 # via # -r requirements/base.in # edx-django-utils @@ -452,7 +452,6 @@ python-dateutil==2.8.2 # -r requirements/base.in # analytics-python # botocore - # edx-drf-extensions # faker python-mimeparse==1.6.0 # via cybersource-rest-client-python @@ -543,7 +542,6 @@ six==1.16.0 # djangorestframework-csv # edx-auth-backends # edx-django-release-util - # edx-drf-extensions # edx-ecommerce-worker # edx-rbac # google-auth diff --git a/requirements/dev.txt b/requirements/dev.txt index d2c0dbb9b0a..d852e603eca 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -327,7 +327,7 @@ edx-django-utils==5.5.0 # edx-drf-extensions # edx-rest-api-client # getsmarter-api-clients -edx-drf-extensions==8.8.0 +edx-drf-extensions==8.12.0 # via # -r requirements/test.txt # edx-rbac @@ -552,7 +552,7 @@ naked==0.1.32 # cybersource-rest-client-python ndg-httpsclient==0.5.1 # via -r requirements/test.txt -newrelic==8.8.0 +newrelic==9.1.0 # via # -r requirements/test.txt # edx-django-utils @@ -778,7 +778,6 @@ python-dateutil==2.8.2 # -r requirements/test.txt # analytics-python # botocore - # edx-drf-extensions # faker # freezegun python-dotenv==1.0.0 @@ -920,7 +919,6 @@ six==1.16.0 # djangorestframework-csv # edx-auth-backends # edx-django-release-util - # edx-drf-extensions # edx-ecommerce-worker # edx-rbac # google-auth diff --git a/requirements/e2e.txt b/requirements/e2e.txt index a16e052bd76..51f87ad3f34 100644 --- a/requirements/e2e.txt +++ b/requirements/e2e.txt @@ -64,7 +64,7 @@ importlib-metadata==6.7.0 # via pytest-randomly iniconfig==2.0.0 # via pytest -newrelic==8.8.0 +newrelic==9.1.0 # via # -c requirements/base.txt # edx-django-utils diff --git a/requirements/production.in b/requirements/production.in index 378ef627b83..c485b80a968 100644 --- a/requirements/production.in +++ b/requirements/production.in @@ -4,7 +4,7 @@ django-ses gunicorn==19.7.1 -newrelic<5 +newrelic python-memcached==1.59 PyYAML nodeenv==1.1.1 diff --git a/requirements/production.txt b/requirements/production.txt index 8906a420a65..948b06058d3 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -231,7 +231,7 @@ edx-django-utils==5.5.0 # edx-drf-extensions # edx-rest-api-client # getsmarter-api-clients -edx-drf-extensions==8.8.0 +edx-drf-extensions==8.12.0 # via # -r requirements/base.in # edx-rbac @@ -356,7 +356,7 @@ naked==0.1.32 # cybersource-rest-client-python ndg-httpsclient==0.5.1 # via -r requirements/base.in -newrelic==4.20.1.121 +newrelic==9.1.0 # via # -r requirements/base.in # -r requirements/production.in @@ -462,7 +462,6 @@ python-dateutil==2.8.2 # -r requirements/base.in # analytics-python # botocore - # edx-drf-extensions # faker python-memcached==1.59 # via -r requirements/production.in @@ -559,7 +558,6 @@ six==1.16.0 # djangorestframework-csv # edx-auth-backends # edx-django-release-util - # edx-drf-extensions # edx-ecommerce-worker # edx-rbac # google-auth diff --git a/requirements/test.txt b/requirements/test.txt index a4c81da0534..0dc13e2a0f5 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -318,7 +318,7 @@ edx-django-utils==5.5.0 # edx-drf-extensions # edx-rest-api-client # getsmarter-api-clients -edx-drf-extensions==8.8.0 +edx-drf-extensions==8.12.0 # via # -r requirements/base.txt # edx-rbac @@ -530,7 +530,7 @@ naked==0.1.32 # cybersource-rest-client-python ndg-httpsclient==0.5.1 # via -r requirements/base.txt -newrelic==8.8.0 +newrelic==9.1.0 # via # -r requirements/base.txt # -r requirements/e2e.txt @@ -757,7 +757,6 @@ python-dateutil==2.8.2 # -r requirements/base.txt # analytics-python # botocore - # edx-drf-extensions # faker # freezegun python-dotenv==1.0.0 @@ -897,7 +896,6 @@ six==1.16.0 # djangorestframework-csv # edx-auth-backends # edx-django-release-util - # edx-drf-extensions # edx-ecommerce-worker # edx-rbac # google-auth From 83045ebab39e2410c24521dea3b8fcbfe05f028c Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 23 Oct 2023 13:07:03 -0400 Subject: [PATCH 4/4] docs: Update RTD config. (#4042) The 'build.os' setting is now required. --- .readthedocs.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index ebb6957a568..3ac9680fa6e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,8 +10,13 @@ sphinx: configuration: docs/conf.py fail_on_warning: true +# Set the version of python needed to build these docs. +build: + os: "ubuntu-22.04" + tools: + python: "3.8" + # Optionally set the version of Python and requirements required to build your docs python: - version: "3.8" install: - requirements: requirements/docs.txt