Skip to content

Commit 06c5396

Browse files
authored
CI Patchjob (#8633)
* Test 1: User Agent * Test 2: Ubuntu Update Required * Revert Test 2: Ubuntu Update Required * Test 2: Ubuntu * Test 3: Python Test 1 * Test 3 2: Python Test 2 * Test 3 2.1: Python Test 3 * Test 3 2.2: Python Test 4 * Python Test 5 * Test 3 2.4: Python Test 6 * Python Test -1 * format test * feedback database fix * depleted test removed * version change * version update for real * fixes python * addfiles * patch1 * patch2 * dependencies fix * DreamAnnotate transfer * update * updater
1 parent 9d591e5 commit 06c5396

File tree

36 files changed

+1037
-540
lines changed

36 files changed

+1037
-540
lines changed

.github/workflows/ci_suite.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,22 @@ jobs:
1010
run_linters:
1111
if: "!contains(github.event.head_commit.message, '[ci skip]')"
1212
name: Run Linters
13-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-24.04
1414
concurrency:
1515
group: run_linters-${{ github.ref }}
1616
cancel-in-progress: true
1717
steps:
1818
- uses: actions/checkout@v3
19+
- name: Update apt and install dependencies
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y libgit2-dev libjpeg62 libjpeg62-dev libpng-dev
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.11'
26+
cache: 'pip'
27+
cache-dependency-path: 'tools/requirements.txt'
28+
- uses: actions/checkout@v3
1929
- name: Restore SpacemanDMM cache
2030
uses: actions/cache@v3
2131
with:
@@ -32,10 +42,9 @@ jobs:
3242
${{ runner.os }}-
3343
- name: Install Tools
3444
run: |
35-
pip3 install setuptools
45+
pip install -r tools/requirements.txt
3646
bash tools/ci/install_node.sh
3747
bash tools/ci/install_spaceman_dmm.sh dreamchecker
38-
tools/bootstrap/python -c ''
3948
- name: Run Linters
4049
run: |
4150
bash tools/ci/check_filedirs.sh cev_eris.dme
@@ -48,15 +57,15 @@ jobs:
4857
tools/bootstrap/python -m mapmerge2.dmm_test
4958
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1
5059
- name: Annotate Lints
51-
uses: yogstation13/DreamAnnotate@v2
60+
uses: alexkar598/DreamAnnotate@v2
5261
if: always()
5362
with:
5463
outputFile: output-annotations.txt
5564

5665
compile_all_maps:
5766
if: "!contains(github.event.head_commit.message, '[ci skip]')"
5867
name: Compile Maps
59-
runs-on: ubuntu-20.04
68+
runs-on: ubuntu-24.04
6069
concurrency:
6170
group: compile_all_maps-${{ github.ref }}
6271
cancel-in-progress: true
@@ -76,7 +85,7 @@ jobs:
7685
run_all_tests:
7786
if: "!contains(github.event.head_commit.message, '[ci skip]')"
7887
name: Integration Tests
79-
runs-on: ubuntu-20.04
88+
runs-on: ubuntu-24.04
8089
services:
8190
mysql:
8291
image: mysql:latest
@@ -104,7 +113,7 @@ jobs:
104113
run: |
105114
sudo dpkg --add-architecture i386
106115
sudo apt update || true
107-
sudo apt install -o APT::Immediate-Configure=false libssl1.1:i386
116+
sudo apt install -o APT::Immediate-Configure=false libssl3:i386
108117
bash tools/ci/install_rust_g.sh
109118
- name: Compile Tests
110119
run: |
@@ -127,7 +136,7 @@ jobs:
127136
if: "!contains(github.event.head_commit.message, '[ci skip]') && always()"
128137
needs: [run_all_tests]
129138
name: Compare Screenshot Tests
130-
runs-on: ubuntu-20.04
139+
runs-on: ubuntu-24.04
131140
steps:
132141
- uses: actions/checkout@v3
133142
# If we ever add more artifacts, this is going to break, but it'll be obvious.

cev_eris.dme

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "code\__DEFINES\craft.dm"
3131
#include "code\__DEFINES\cyborg_traits.dm"
3232
#include "code\__DEFINES\damage_organs.dm"
33+
#include "code\__DEFINES\database.dm"
3334
#include "code\__DEFINES\economy.dm"
3435
#include "code\__DEFINES\error_handler.dm"
3536
#include "code\__DEFINES\flags.dm"
@@ -226,6 +227,7 @@
226227
#include "code\controllers\subsystems\chemistry.dm"
227228
#include "code\controllers\subsystems\chunks.dm"
228229
#include "code\controllers\subsystems\craft.dm"
230+
#include "code\controllers\subsystems\database.dm"
229231
#include "code\controllers\subsystems\dcs.dm"
230232
#include "code\controllers\subsystems\economy.dm"
231233
#include "code\controllers\subsystems\evac.dm"
@@ -527,7 +529,6 @@
527529
#include "code\defines\obj.dm"
528530
#include "code\defines\procs\announce.dm"
529531
#include "code\defines\procs\AStar.dm"
530-
#include "code\defines\procs\dbcore.dm"
531532
#include "code\defines\procs\hud.dm"
532533
#include "code\defines\procs\radio.dm"
533534
#include "code\defines\procs\sd_Alert.dm"
@@ -1425,6 +1426,7 @@
14251426
#include "code\modules\admin\verbs\possess.dm"
14261427
#include "code\modules\admin\verbs\pray.dm"
14271428
#include "code\modules\admin\verbs\randomverbs.dm"
1429+
#include "code\modules\admin\verbs\reestablish_db_connection.dm"
14281430
#include "code\modules\admin\verbs\ticklag.dm"
14291431
#include "code\modules\admin\verbs\tripAI.dm"
14301432
#include "code\modules\admin\verbs\SDQL_2\SDQL_2.dm"

code/__DEFINES/database.dm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/// When a query has been queued up for execution/is being executed
2+
#define DB_QUERY_STARTED 0
3+
/// When a query is finished executing
4+
#define DB_QUERY_FINISHED 1
5+
/// When there was a problem with the execution of a query.
6+
#define DB_QUERY_BROKEN 2

code/__DEFINES/subsystems-priority.dm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ var/list/bitflags = list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096
1616
#define SS_PRIORITY_TICKER 200 // Gameticker processing.
1717
#define FIRE_PRIORITY_TGUI 110
1818
#define FIRE_PRIORITY_EXPLOSIONS 105 // Explosions!
19-
#define FIRE_PRIORITY_THROWING 106 // Throwing! after explosions since they influence throw direction
19+
#define FIRE_PRIORITY_DATABASE 104
20+
#define FIRE_PRIORITY_THROWING 103 // Throwing! after explosions since they influence throw direction
2021
#define SS_PRIORITY_HUMAN 101 // Human Life().
2122
#define SS_PRIORITY_MOB 100 // Non-human Mob Life().
2223
#define SS_PRIORITY_CHAT 100 // Chat subsystem.

code/__DEFINES/subsystems.dm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11

2+
//! ## DB defines
3+
/**
4+
* DB schema version
5+
*
6+
* Update this whenever the db schema changes
7+
*/
8+
#define DB_SCHEMA_VERSION 1
9+
10+
211
//! ## Timing subsystem
312
/**
413
* Don't run if there is an identical unique timer active
@@ -88,6 +97,7 @@
8897
// The numbers just define the ordering, they are meaningless otherwise.
8998

9099
#define INIT_ORDER_GARBAGE 99
100+
#define INIT_ORDER_DBCORE 98
91101
#define INIT_ORDER_EXPLOSIONS 97
92102
#define INIT_ORDER_STATPANELS 96
93103
#define INIT_ORDER_MAPPING 15

code/__HELPERS/text.dm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@
1313
* SQL sanitization
1414
*/
1515

16-
// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts.
17-
/proc/sanitizeSQL(var/t as text)
18-
var/sqltext = dbcon.Quote(t);
19-
return copytext(sqltext, 2, length(sqltext));//Quote() adds quotes around input, we already do that
16+
/proc/format_table_name(table as text)
17+
return sql_tableprefix + table
2018

2119
/*
2220
* Text sanitization

code/controllers/configuration.dm

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,13 +805,25 @@ GLOBAL_LIST_EMPTY(storyteller_cache)
805805
if ("address")
806806
sqladdress = value
807807
if ("port")
808-
sqlport = value
808+
sqlport = text2num(value)
809809
if ("database")
810810
sqldb = value
811811
if ("login")
812812
sqllogin = value
813813
if ("password")
814814
sqlpass = value
815+
if ("sql_tableprefix")
816+
sql_tableprefix = value
817+
if ("async_query_timeout")
818+
sql_async_query_timeout = text2num(value)
819+
if ("blocking_query_timeout")
820+
sql_blocking_query_timeout = text2num(value)
821+
if ("pooling_min_sql_connections")
822+
sql_pooling_min_sql_connections = text2num(value)
823+
if ("pooling_max_sql_connections")
824+
sql_pooling_max_sql_connections = text2num(value)
825+
if ("max_concurrent_queries")
826+
sql_max_concurrent_queries = text2num(value)
815827
else
816828
log_misc("Unknown setting in configuration: '[name]'")
817829

0 commit comments

Comments
 (0)