Skip to content

Commit 7eb34e9

Browse files
committed
Revert "Merge pull request openedx#35713 from openedx/feanil/ubuntu-24.04"
This reverts commit 642dae6, reversing changes made to d82aada.
1 parent cdf7a99 commit 7eb34e9

17 files changed

+80
-74
lines changed

.github/workflows/check-consistent-dependencies.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ defaults:
1515
jobs:
1616
check-requirements:
1717
name: Compile requirements
18-
runs-on: ubuntu-24.04
18+
runs-on: ubuntu-22.04
1919

2020
steps:
2121
# Only run remaining steps if there are changes to requirements/**

.github/workflows/ci-static-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
matrix:
1111
python-version:
1212
- "3.11"
13-
os: ["ubuntu-24.04"]
13+
os: ["ubuntu-22.04"]
1414

1515
steps:
1616
- uses: actions/checkout@v4

.github/workflows/migrations-check.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
16-
os: [ubuntu-24.04]
16+
os: [ubuntu-22.04]
1717
python-version:
1818
- "3.11"
1919
# 'pinned' is used to install the latest patch version of Django
@@ -126,7 +126,7 @@ jobs:
126126
if: always()
127127
needs:
128128
- check_migrations
129-
runs-on: ubuntu-24.04
129+
runs-on: ubuntu-22.04
130130
steps:
131131
- name: Decide whether the needed jobs succeeded or failed
132132
# uses: re-actors/[email protected]

.github/workflows/pylint-checks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
run-pylint:
11-
runs-on: ubuntu-24.04
11+
runs-on: ubuntu-22.04
1212
strategy:
1313
fail-fast: false
1414
matrix:
@@ -75,7 +75,7 @@ jobs:
7575
if: always()
7676
needs:
7777
- run-pylint
78-
runs-on: ubuntu-24.04
78+
runs-on: ubuntu-22.04
7979
steps:
8080
- name: Decide whether the needed jobs succeeded or failed
8181
# uses: re-actors/[email protected]

.github/workflows/quality-checks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
16-
os: [ubuntu-24.04]
16+
os: [ubuntu-22.04]
1717
python-version:
1818
- "3.11"
1919
node-version: [20]

.github/workflows/static-assets-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
os: [ubuntu-24.04]
15+
os: [ubuntu-22.04]
1616
python-version:
1717
- "3.11"
1818
node-version: [18, 20]

.github/workflows/unit-tests.yml

+33-29
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
jobs:
1616
run-tests:
1717
name: ${{ matrix.shard_name }}(py=${{ matrix.python-version }},dj=${{ matrix.django-version }},mongo=${{ matrix.mongo-version }})
18-
runs-on: ${{ matrix.os-version }}
18+
runs-on: ubuntu-22.04
1919
strategy:
2020
matrix:
2121
python-version:
@@ -43,27 +43,22 @@ jobs:
4343
- "xmodule-with-cms"
4444
mongo-version:
4545
- "7.0"
46-
os-version:
47-
- ubuntu-24.04
4846

49-
# It's useful to run some subset of the tests on the older version of Ubuntu
50-
# so that we don't spend too many resources on this but can find major issues quickly
51-
# while we're in a situation where we support two versions. This section may be commented
52-
# out when not in use to easily add/drop future support for any given major dependency.
47+
# We only need to test older versions of Mongo with modules that directly interface with Mongo (that is: xmodule.modulestore)
48+
# This code is left here as an example for future refernce in case we need to reduce the number of shards we're
49+
# testing but still have good confidence with older versions of mongo. We use Mongo 4.4 in the example.
5350
#
54-
# We're testing the older version of Ubuntu and running the xmodule tests since those rely on many
55-
# dependent complex libraries and will hopefully catch most issues quickly.
56-
include:
57-
- shard_name: "xmodule-with-cms"
58-
python-version: "3.11"
59-
django-version: "pinned"
60-
mongo-version: "7.0"
61-
os-version: "ubuntu-22.04"
62-
- shard_name: "xmodule-with-lms"
63-
python-version: "3.11"
64-
django-version: "pinned"
65-
mongo-version: "7.0"
66-
os-version: "ubuntu-22.04"
51+
# exclude:
52+
# - mongo-version: "4.4"
53+
# include:
54+
# - shard_name: "xmodule-with-cms"
55+
# python-version: "3.11"
56+
# django-version: "pinned"
57+
# mongo-version: "4.4"
58+
# - shard_name: "xmodule-with-lms"
59+
# python-version: "3.11"
60+
# django-version: "pinned"
61+
# mongo-version: "4.4"
6762

6863
steps:
6964
- name: checkout repo
@@ -95,10 +90,19 @@ jobs:
9590
activate = 1
9691
EOF
9792
98-
- name: Start MongoDB
99-
uses: supercharge/[email protected]
100-
with:
101-
mongodb-version: ${{ matrix.mongo-version }}
93+
- name: install mongo version
94+
run: |
95+
if [[ "${{ matrix.mongo-version }}" != "4.4" ]]; then
96+
wget -qO - https://www.mongodb.org/static/pgp/server-${{ matrix.mongo-version }}.asc | sudo apt-key add -
97+
echo "deb https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/${{ matrix.mongo-version }} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-${{ matrix.mongo-version }}.list
98+
sudo apt-get update && sudo apt-get install -y mongodb-org="${{ matrix.mongo-version }}.*"
99+
fi
100+
101+
- name: start mongod server for tests
102+
run: |
103+
sudo mkdir -p /data/db
104+
sudo chmod -R a+rw /data/db
105+
mongod &
102106
103107
- name: Setup Python
104108
uses: actions/setup-python@v5
@@ -160,7 +164,7 @@ jobs:
160164
overwrite: true
161165

162166
collect-and-verify:
163-
runs-on: ubuntu-24.04
167+
runs-on: ubuntu-22.04
164168
steps:
165169
- uses: actions/checkout@v4
166170
- name: Setup Python
@@ -225,7 +229,7 @@ jobs:
225229
# https://github.com/orgs/community/discussions/33579
226230
success:
227231
name: Unit tests successful
228-
runs-on: ubuntu-24.04
232+
runs-on: ubuntu-22.04
229233
if: always()
230234
needs: [run-tests]
231235
steps:
@@ -236,7 +240,7 @@ jobs:
236240
jobs: ${{ toJSON(needs) }}
237241

238242
compile-warnings-report:
239-
runs-on: ubuntu-24.04
243+
runs-on: ubuntu-22.04
240244
needs: [run-tests]
241245
steps:
242246
- uses: actions/checkout@v4
@@ -264,7 +268,7 @@ jobs:
264268
overwrite: true
265269

266270
merge-artifacts:
267-
runs-on: ubuntu-24.04
271+
runs-on: ubuntu-22.04
268272
needs: [compile-warnings-report]
269273
steps:
270274
- name: Merge Pytest Warnings JSON Artifacts
@@ -284,7 +288,7 @@ jobs:
284288
# Combine and upload coverage reports.
285289
coverage:
286290
if: (github.repository == 'edx/edx-platform-private') || (github.repository == 'openedx/edx-platform' && (startsWith(github.base_ref, 'open-release') == false))
287-
runs-on: ubuntu-24.04
291+
runs-on: ubuntu-22.04
288292
needs: [run-tests]
289293
strategy:
290294
matrix:

requirements/constraints.txt

+12
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ event-tracking==3.0.0
105105
# https://github.com/openedx/edx-platform/issues/31616
106106
libsass==0.10.0
107107

108+
# Date: 2024-04-30
109+
# lxml>=5.0 introduced breaking changes related to system dependencies
110+
# lxml==5.2.1 introduced new extra so we'll nee to rename lxml --> lxml[html-clean]
111+
# This constraint can be removed once we upgrade to Python 3.11
112+
# Issue for unpinning: https://github.com/openedx/edx-platform/issues/35272
113+
lxml<5.0
114+
108115
# Date: 2018-12-14
109116
# markdown>=3.4.0 has failures due to internal refactorings which causes the tests to fail
110117
# pinning the version untill the issue gets resolved in the package itself
@@ -184,3 +191,8 @@ social-auth-app-django<=5.4.1
184191
# # Date: 2024-10-14
185192
# # The edx-enterprise is currently using edx-rest-api-client==5.7.1, which needs to be updated first.
186193
# edx-rest-api-client==5.7.1
194+
195+
# Date: 2024-04-24
196+
# xmlsec==1.3.14 breaking tests or all builds, can be removed once a fix is available
197+
# Issue for unpinning: https://github.com/openedx/edx-platform/issues/35264
198+
xmlsec<1.3.14

requirements/edx-sandbox/base.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
chem # A helper library for chemistry calculations
44
cryptography # Implementations of assorted cryptography algorithms
5-
lxml[html_clean] # XML parser
5+
lxml # XML parser
66
matplotlib # 2D plotting library
77
networkx # Utilities for creating, manipulating, and studying network graphs
88
nltk # Natural language processing; used by the chem package

requirements/edx-sandbox/base.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ joblib==1.4.2
2626
# via nltk
2727
kiwisolver==1.4.7
2828
# via matplotlib
29-
lxml[html-clean,html_clean]==5.3.0
29+
lxml==4.9.4
3030
# via
31+
# -c requirements/edx-sandbox/../constraints.txt
3132
# -r requirements/edx-sandbox/base.in
32-
# lxml-html-clean
3333
# openedx-calc
34-
lxml-html-clean==0.3.1
35-
# via lxml
3634
markupsafe==3.0.2
3735
# via
3836
# chem

requirements/edx/base.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -708,21 +708,19 @@ loremipsum==1.0.5
708708
# via ora2
709709
lti-consumer-xblock==9.11.3
710710
# via -r requirements/edx/kernel.in
711-
lxml[html-clean,html_clean]==5.3.0
711+
lxml==4.9.4
712712
# via
713+
# -c requirements/edx/../constraints.txt
713714
# -r requirements/edx/kernel.in
714715
# edx-i18n-tools
715716
# edxval
716717
# lti-consumer-xblock
717-
# lxml-html-clean
718718
# olxcleaner
719719
# openedx-calc
720720
# ora2
721721
# python3-saml
722722
# xblock
723723
# xmlsec
724-
lxml-html-clean==0.3.1
725-
# via lxml
726724
mailsnake==1.6.4
727725
# via -r requirements/edx/bundled.in
728726
mako==1.3.6
@@ -1287,8 +1285,10 @@ xblock-utils==4.0.0
12871285
# via
12881286
# edx-sga
12891287
# xblock-poll
1290-
xmlsec==1.3.14
1291-
# via python3-saml
1288+
xmlsec==1.3.13
1289+
# via
1290+
# -c requirements/edx/../constraints.txt
1291+
# python3-saml
12921292
xss-utils==0.6.0
12931293
# via -r requirements/edx/kernel.in
12941294
yarl==1.17.0

requirements/edx/development.txt

+4-8
Original file line numberDiff line numberDiff line change
@@ -1183,26 +1183,21 @@ lti-consumer-xblock==9.11.3
11831183
# via
11841184
# -r requirements/edx/doc.txt
11851185
# -r requirements/edx/testing.txt
1186-
lxml[html-clean]==5.3.0
1186+
lxml==4.9.4
11871187
# via
1188+
# -c requirements/edx/../constraints.txt
11881189
# -r requirements/edx/doc.txt
11891190
# -r requirements/edx/testing.txt
11901191
# edx-i18n-tools
11911192
# edxval
11921193
# lti-consumer-xblock
1193-
# lxml-html-clean
11941194
# olxcleaner
11951195
# openedx-calc
11961196
# ora2
11971197
# pyquery
11981198
# python3-saml
11991199
# xblock
12001200
# xmlsec
1201-
lxml-html-clean==0.3.1
1202-
# via
1203-
# -r requirements/edx/doc.txt
1204-
# -r requirements/edx/testing.txt
1205-
# lxml
12061201
mailsnake==1.6.4
12071202
# via
12081203
# -r requirements/edx/doc.txt
@@ -2275,8 +2270,9 @@ xblock-utils==4.0.0
22752270
# -r requirements/edx/testing.txt
22762271
# edx-sga
22772272
# xblock-poll
2278-
xmlsec==1.3.14
2273+
xmlsec==1.3.13
22792274
# via
2275+
# -c requirements/edx/../constraints.txt
22802276
# -r requirements/edx/doc.txt
22812277
# -r requirements/edx/testing.txt
22822278
# python3-saml

requirements/edx/doc.txt

+4-7
Original file line numberDiff line numberDiff line change
@@ -850,23 +850,19 @@ loremipsum==1.0.5
850850
# ora2
851851
lti-consumer-xblock==9.11.3
852852
# via -r requirements/edx/base.txt
853-
lxml[html-clean]==5.3.0
853+
lxml==4.9.4
854854
# via
855+
# -c requirements/edx/../constraints.txt
855856
# -r requirements/edx/base.txt
856857
# edx-i18n-tools
857858
# edxval
858859
# lti-consumer-xblock
859-
# lxml-html-clean
860860
# olxcleaner
861861
# openedx-calc
862862
# ora2
863863
# python3-saml
864864
# xblock
865865
# xmlsec
866-
lxml-html-clean==0.3.1
867-
# via
868-
# -r requirements/edx/base.txt
869-
# lxml
870866
mailsnake==1.6.4
871867
# via -r requirements/edx/base.txt
872868
mako==1.3.6
@@ -1583,8 +1579,9 @@ xblock-utils==4.0.0
15831579
# -r requirements/edx/base.txt
15841580
# edx-sga
15851581
# xblock-poll
1586-
xmlsec==1.3.14
1582+
xmlsec==1.3.13
15871583
# via
1584+
# -c requirements/edx/../constraints.txt
15881585
# -r requirements/edx/base.txt
15891586
# python3-saml
15901587
xss-utils==0.6.0

requirements/edx/kernel.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ importlib_metadata # Used to access entry_points in i18n_api pl
103103
jsonfield # Django model field for validated JSON; used in several apps
104104
laboratory # Library for testing that code refactors/infrastructure changes produce identical results
105105
importlib_metadata # Used to access entry_points in i18n_api plugin
106-
lxml[html_clean] # XML parser
106+
lxml # XML parser
107107
lti-consumer-xblock>=7.3.0
108108
mako # Primary template language used for server-side page rendering
109109
Markdown # Convert text markup to HTML; used in capa problems, forums, and course wikis

0 commit comments

Comments
 (0)