Skip to content

Commit 793b7b1

Browse files
feanilCup0fCoffee
authored andcommitted
Merge pull request openedx#35713 from openedx/feanil/ubuntu-24.04
feanil/ubuntu 24.04 (cherry picked from commit 642dae6)
1 parent 1d2384f commit 793b7b1

17 files changed

+74
-80
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-22.04
18+
runs-on: ubuntu-24.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-22.04"]
13+
os: ["ubuntu-24.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-22.04]
16+
os: [ubuntu-24.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-22.04
129+
runs-on: ubuntu-24.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-22.04
11+
runs-on: ubuntu-24.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-22.04
78+
runs-on: ubuntu-24.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-22.04]
16+
os: [ubuntu-24.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-22.04]
15+
os: [ubuntu-24.04]
1616
python-version:
1717
- "3.11"
1818
node-version: [18, 20]

.github/workflows/unit-tests.yml

+29-33
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: ubuntu-22.04
18+
runs-on: ${{ matrix.os-version }}
1919
strategy:
2020
matrix:
2121
python-version:
@@ -43,22 +43,27 @@ jobs:
4343
- "xmodule-with-cms"
4444
mongo-version:
4545
- "7.0"
46+
os-version:
47+
- ubuntu-24.04
4648

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.
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.
5053
#
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"
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"
6267

6368
steps:
6469
- name: checkout repo
@@ -90,19 +95,10 @@ jobs:
9095
activate = 1
9196
EOF
9297
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 &
98+
- name: Start MongoDB
99+
uses: supercharge/[email protected]
100+
with:
101+
mongodb-version: ${{ matrix.mongo-version }}
106102

107103
- name: Setup Python
108104
uses: actions/setup-python@v5
@@ -164,7 +160,7 @@ jobs:
164160
overwrite: true
165161

166162
collect-and-verify:
167-
runs-on: ubuntu-22.04
163+
runs-on: ubuntu-24.04
168164
steps:
169165
- uses: actions/checkout@v4
170166
- name: Setup Python
@@ -229,7 +225,7 @@ jobs:
229225
# https://github.com/orgs/community/discussions/33579
230226
success:
231227
name: Unit tests successful
232-
runs-on: ubuntu-22.04
228+
runs-on: ubuntu-24.04
233229
if: always()
234230
needs: [run-tests]
235231
steps:
@@ -240,7 +236,7 @@ jobs:
240236
jobs: ${{ toJSON(needs) }}
241237

242238
compile-warnings-report:
243-
runs-on: ubuntu-22.04
239+
runs-on: ubuntu-24.04
244240
needs: [run-tests]
245241
steps:
246242
- uses: actions/checkout@v4
@@ -268,7 +264,7 @@ jobs:
268264
overwrite: true
269265

270266
merge-artifacts:
271-
runs-on: ubuntu-22.04
267+
runs-on: ubuntu-24.04
272268
needs: [compile-warnings-report]
273269
steps:
274270
- name: Merge Pytest Warnings JSON Artifacts
@@ -288,7 +284,7 @@ jobs:
288284
# Combine and upload coverage reports.
289285
coverage:
290286
if: (github.repository == 'edx/edx-platform-private') || (github.repository == 'openedx/edx-platform' && (startsWith(github.base_ref, 'open-release') == false))
291-
runs-on: ubuntu-22.04
287+
runs-on: ubuntu-24.04
292288
needs: [run-tests]
293289
strategy:
294290
matrix:

requirements/constraints.txt

-12
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,6 @@ 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-
115108
# Date: 2018-12-14
116109
# markdown>=3.4.0 has failures due to internal refactorings which causes the tests to fail
117110
# pinning the version untill the issue gets resolved in the package itself
@@ -192,8 +185,3 @@ social-auth-app-django<=5.4.1
192185
# # Date: 2024-10-14
193186
# # The edx-enterprise is currently using edx-rest-api-client==5.7.1, which needs to be updated first.
194187
# edx-rest-api-client==5.7.1
195-
196-
# Date: 2024-04-24
197-
# xmlsec==1.3.14 breaking tests or all builds, can be removed once a fix is available
198-
# Issue for unpinning: https://github.com/openedx/edx-platform/issues/35264
199-
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 # XML parser
5+
lxml[html_clean] # 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

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

requirements/edx/base.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -715,19 +715,21 @@ loremipsum==1.0.5
715715
# via ora2
716716
lti-consumer-xblock==9.11.3
717717
# via -r requirements/edx/kernel.in
718-
lxml==4.9.4
718+
lxml[html-clean,html_clean]==5.3.0
719719
# via
720-
# -c requirements/edx/../constraints.txt
721720
# -r requirements/edx/kernel.in
722721
# edx-i18n-tools
723722
# edxval
724723
# lti-consumer-xblock
724+
# lxml-html-clean
725725
# olxcleaner
726726
# openedx-calc
727727
# ora2
728728
# python3-saml
729729
# xblock
730730
# xmlsec
731+
lxml-html-clean==0.3.1
732+
# via lxml
731733
mailsnake==1.6.4
732734
# via -r requirements/edx/bundled.in
733735
mako==1.3.6
@@ -1301,10 +1303,8 @@ xblock-utils==4.0.0
13011303
# via
13021304
# edx-sga
13031305
# xblock-poll
1304-
xmlsec==1.3.13
1305-
# via
1306-
# -c requirements/edx/../constraints.txt
1307-
# python3-saml
1306+
xmlsec==1.3.14
1307+
# via python3-saml
13081308
xss-utils==0.6.0
13091309
# via -r requirements/edx/kernel.in
13101310
yarl==1.16.0

requirements/edx/development.txt

+8-4
Original file line numberDiff line numberDiff line change
@@ -1193,21 +1193,26 @@ lti-consumer-xblock==9.11.3
11931193
# via
11941194
# -r requirements/edx/doc.txt
11951195
# -r requirements/edx/testing.txt
1196-
lxml==4.9.4
1196+
lxml[html-clean]==5.3.0
11971197
# via
1198-
# -c requirements/edx/../constraints.txt
11991198
# -r requirements/edx/doc.txt
12001199
# -r requirements/edx/testing.txt
12011200
# edx-i18n-tools
12021201
# edxval
12031202
# lti-consumer-xblock
1203+
# lxml-html-clean
12041204
# olxcleaner
12051205
# openedx-calc
12061206
# ora2
12071207
# pyquery
12081208
# python3-saml
12091209
# xblock
12101210
# xmlsec
1211+
lxml-html-clean==0.3.1
1212+
# via
1213+
# -r requirements/edx/doc.txt
1214+
# -r requirements/edx/testing.txt
1215+
# lxml
12111216
mailsnake==1.6.4
12121217
# via
12131218
# -r requirements/edx/doc.txt
@@ -2293,9 +2298,8 @@ xblock-utils==4.0.0
22932298
# -r requirements/edx/testing.txt
22942299
# edx-sga
22952300
# xblock-poll
2296-
xmlsec==1.3.13
2301+
xmlsec==1.3.14
22972302
# via
2298-
# -c requirements/edx/../constraints.txt
22992303
# -r requirements/edx/doc.txt
23002304
# -r requirements/edx/testing.txt
23012305
# python3-saml

requirements/edx/doc.txt

+7-4
Original file line numberDiff line numberDiff line change
@@ -863,19 +863,23 @@ loremipsum==1.0.5
863863
# ora2
864864
lti-consumer-xblock==9.11.3
865865
# via -r requirements/edx/base.txt
866-
lxml==4.9.4
866+
lxml[html-clean]==5.3.0
867867
# via
868-
# -c requirements/edx/../constraints.txt
869868
# -r requirements/edx/base.txt
870869
# edx-i18n-tools
871870
# edxval
872871
# lti-consumer-xblock
872+
# lxml-html-clean
873873
# olxcleaner
874874
# openedx-calc
875875
# ora2
876876
# python3-saml
877877
# xblock
878878
# xmlsec
879+
lxml-html-clean==0.3.1
880+
# via
881+
# -r requirements/edx/base.txt
882+
# lxml
879883
mailsnake==1.6.4
880884
# via -r requirements/edx/base.txt
881885
mako==1.3.6
@@ -1607,9 +1611,8 @@ xblock-utils==4.0.0
16071611
# -r requirements/edx/base.txt
16081612
# edx-sga
16091613
# xblock-poll
1610-
xmlsec==1.3.13
1614+
xmlsec==1.3.14
16111615
# via
1612-
# -c requirements/edx/../constraints.txt
16131616
# -r requirements/edx/base.txt
16141617
# python3-saml
16151618
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 # XML parser
106+
lxml[html_clean] # 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)