Skip to content

Commit 642dae6

Browse files
authored
Merge pull request #35713 from openedx/feanil/ubuntu-24.04
feanil/ubuntu 24.04
2 parents d82aada + 5cb2984 commit 642dae6

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
@@ -191,8 +184,3 @@ social-auth-app-django<=5.4.1
191184
# # Date: 2024-10-14
192185
# # The edx-enterprise is currently using edx-rest-api-client==5.7.1, which needs to be updated first.
193186
# 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 # 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
@@ -708,19 +708,21 @@ loremipsum==1.0.5
708708
# via ora2
709709
lti-consumer-xblock==9.11.3
710710
# via -r requirements/edx/kernel.in
711-
lxml==4.9.4
711+
lxml[html-clean,html_clean]==5.3.0
712712
# via
713-
# -c requirements/edx/../constraints.txt
714713
# -r requirements/edx/kernel.in
715714
# edx-i18n-tools
716715
# edxval
717716
# 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
724726
mailsnake==1.6.4
725727
# via -r requirements/edx/bundled.in
726728
mako==1.3.6
@@ -1285,10 +1287,8 @@ xblock-utils==4.0.0
12851287
# via
12861288
# edx-sga
12871289
# xblock-poll
1288-
xmlsec==1.3.13
1289-
# via
1290-
# -c requirements/edx/../constraints.txt
1291-
# python3-saml
1290+
xmlsec==1.3.14
1291+
# via python3-saml
12921292
xss-utils==0.6.0
12931293
# via -r requirements/edx/kernel.in
12941294
yarl==1.17.0

requirements/edx/development.txt

+8-4
Original file line numberDiff line numberDiff line change
@@ -1183,21 +1183,26 @@ lti-consumer-xblock==9.11.3
11831183
# via
11841184
# -r requirements/edx/doc.txt
11851185
# -r requirements/edx/testing.txt
1186-
lxml==4.9.4
1186+
lxml[html-clean]==5.3.0
11871187
# via
1188-
# -c requirements/edx/../constraints.txt
11891188
# -r requirements/edx/doc.txt
11901189
# -r requirements/edx/testing.txt
11911190
# edx-i18n-tools
11921191
# edxval
11931192
# 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
12011206
mailsnake==1.6.4
12021207
# via
12031208
# -r requirements/edx/doc.txt
@@ -2270,9 +2275,8 @@ xblock-utils==4.0.0
22702275
# -r requirements/edx/testing.txt
22712276
# edx-sga
22722277
# xblock-poll
2273-
xmlsec==1.3.13
2278+
xmlsec==1.3.14
22742279
# via
2275-
# -c requirements/edx/../constraints.txt
22762280
# -r requirements/edx/doc.txt
22772281
# -r requirements/edx/testing.txt
22782282
# python3-saml

requirements/edx/doc.txt

+7-4
Original file line numberDiff line numberDiff line change
@@ -850,19 +850,23 @@ loremipsum==1.0.5
850850
# ora2
851851
lti-consumer-xblock==9.11.3
852852
# via -r requirements/edx/base.txt
853-
lxml==4.9.4
853+
lxml[html-clean]==5.3.0
854854
# via
855-
# -c requirements/edx/../constraints.txt
856855
# -r requirements/edx/base.txt
857856
# edx-i18n-tools
858857
# edxval
859858
# 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
866870
mailsnake==1.6.4
867871
# via -r requirements/edx/base.txt
868872
mako==1.3.6
@@ -1579,9 +1583,8 @@ xblock-utils==4.0.0
15791583
# -r requirements/edx/base.txt
15801584
# edx-sga
15811585
# xblock-poll
1582-
xmlsec==1.3.13
1586+
xmlsec==1.3.14
15831587
# via
1584-
# -c requirements/edx/../constraints.txt
15851588
# -r requirements/edx/base.txt
15861589
# python3-saml
15871590
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)