Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into astroidtwoboogaloo
Browse files Browse the repository at this point in the history
  • Loading branch information
V2LenKagamine committed Oct 1, 2024
2 parents 37dc57a + 6ea3484 commit ff0081a
Show file tree
Hide file tree
Showing 772 changed files with 200,869 additions and 40,820 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: github-actions
directory: /
target-branch: master
schedule:
interval: daily
labels:
- GitHub
open-pull-requests-limit: 10
47 changes: 27 additions & 20 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ concurrency:
cancel-in-progress: true

jobs:
run_linters:
start_gate:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Start Gate
runs-on: ubuntu-latest
steps:
- name: Mandatory Empty Step
run: exit 0

run_linters:
name: Run Linters
needs: start_gate
runs-on: ubuntu-22.04
timeout-minutes: 5

Expand Down Expand Up @@ -122,9 +130,8 @@ jobs:
run: tools/build/build --ci lint tgui-test

compile_all_maps:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Compile Maps
needs: [collect_data]
needs: collect_data
runs-on: ubuntu-22.04
timeout-minutes: 5

Expand All @@ -147,8 +154,8 @@ jobs:
max-required-client-version: ${{needs.collect_data.outputs.max_required_byond_client}}

collect_data:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Collect data for other tasks
needs: start_gate
runs-on: ubuntu-22.04
timeout-minutes: 5
outputs:
Expand Down Expand Up @@ -177,9 +184,8 @@ jobs:
echo "max_required_byond_client=$(grep -Ev '^[[:blank:]]{0,}#{1,}|^[[:blank:]]{0,}$' .github/max_required_byond_client.txt | tail -n1)" >> $GITHUB_OUTPUT
run_all_tests:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Integration Tests
needs: [collect_data]
needs: collect_data

strategy:
fail-fast: false
Expand All @@ -192,9 +198,9 @@ jobs:
max_required_byond_client: ${{needs.collect_data.outputs.max_required_byond_client}}

run_alternate_tests:
if: ( !contains(github.event.head_commit.message, '[ci skip]') && needs.collect_data.outputs.alternate_tests != '[]' )
if: needs.collect_data.outputs.alternate_tests != '[]'
name: Alternate Tests
needs: [collect_data]
needs: collect_data
strategy:
fail-fast: false
matrix:
Expand All @@ -207,18 +213,9 @@ jobs:
minor: ${{ matrix.setup.minor }}
max_required_byond_client: ${{needs.collect_data.outputs.max_required_byond_client}}

check_alternate_tests:
if: ( !contains(github.event.head_commit.message, '[ci skip]') && needs.collect_data.outputs.alternate_tests != '[]' )
name: Check Alternate Tests
needs: [run_alternate_tests]
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- run: echo Alternate tests passed.

compare_screenshots:
if: ( !contains(github.event.head_commit.message, '[ci skip]') && (success() || failure()) )
needs: [run_all_tests, run_alternate_tests]
if: needs.collect_data.outputs.alternate_tests == '[]' || needs.run_alternate_tests.result == 'success'
needs: [ collect_data, run_all_tests, run_alternate_tests ]
name: Compare Screenshot Tests
timeout-minutes: 15
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -255,7 +252,6 @@ jobs:
path: artifacts/screenshot_comparisons

test_windows:
if: ( !contains(github.event.head_commit.message, '[ci skip]') )
name: Windows Build
needs: [collect_data]
runs-on: windows-latest
Expand All @@ -279,3 +275,14 @@ jobs:
with:
dmb-location: tgstation.dmb
max-required-client-version: ${{needs.collect_data.outputs.max_required_byond_client}}

completion_gate: # Serves as a non-moving target for branch rulesets
if: always() && !cancelled()
name: Completion Gate
needs: [ test_windows, compare_screenshots, compile_all_maps, run_linters ]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
3 changes: 2 additions & 1 deletion .github/workflows/update_tgs_dmapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- name: Apply DMAPI update
uses: tgstation/tgs-dmapi-updater@v2
id: dmapi-update
with:
header-path: 'code/__DEFINES/tgs.dm'
library-path: 'code/modules/tgs'
Expand All @@ -41,7 +42,7 @@ jobs:
source_branch: "tgs-dmapi-update"
destination_branch: "master"
pr_title: "Automatic TGS DMAPI Update"
pr_body: "This pull request updates the TGS DMAPI to the latest version. Please note any changes that may be breaking or unimplemented in your codebase by checking what changes are in the definitions file: code/__DEFINES/tgs.dm before merging."
pr_body: "This pull request updates the TGS DMAPI to the latest version. Please note any changes that may be breaking or unimplemented in your codebase by checking what changes are in the definitions file: code/__DEFINES/tgs.dm before merging.\n\n${{ steps.dmapi-update.outputs.release-notes }}"
pr_label: "Tools"
pr_allow_empty: false
github_token: ${{ secrets.COMFY_ORANGE_PAT || secrets.GITHUB_TOKEN }}
86 changes: 83 additions & 3 deletions SQL/database_changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,99 @@ Any time you make a change to the schema files, remember to increment the databa

Make sure to also update `DB_MAJOR_VERSION` and `DB_MINOR_VERSION`, which can be found in `code/__DEFINES/subsystem.dm`.

The latest database version is 5.24; The query to update the schema revision table is:
The latest database version is 5.26; The query to update the schema revision table is:

```sql
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 24);
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 26);
```
or

```sql
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 24);
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 26);
```

In any query remember to add a prefix to the table names if you use one.

-----------------------------------------------------
Version 5.26, 20 September 2024, by Absolucy
Properly added the previously undocumented `metric_data`, `subsystem_metrics`, `subsystem_extra_metrics`, `overwatch_whitelist`, and `overwatch_asn_ban` tables.
```sql
CREATE TABLE `metric_data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`datetime` datetime NOT NULL,
`cpu` decimal(20,10) unsigned DEFAULT NULL,
`maptick` decimal(20,10) unsigned DEFAULT NULL,
`elapsed_processed` int(15) unsigned DEFAULT NULL,
`elapsed_real` int(15) unsigned DEFAULT NULL,
`client_count` int(15) unsigned DEFAULT NULL,
`round_id` int(15) unsigned DEFAULT NULL,
`relational_id` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `overwatch_asn_ban` (
`ip` varchar(21) NOT NULL,
`asn` varchar(100) NOT NULL,
`a_ckey` varchar(30) NOT NULL,
`timestamp` datetime NOT NULL,
PRIMARY KEY (`asn`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE `overwatch_ip_cache` (
`ip` varchar(50) NOT NULL DEFAULT '',
`response` longtext NOT NULL,
PRIMARY KEY (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE `overwatch_whitelist` (
`ckey` varchar(30) NOT NULL,
`a_ckey` varchar(30) NOT NULL,
`timestamp` datetime NOT NULL,
PRIMARY KEY (`ckey`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE `subsystem_extra_metrics` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`datetime` datetime NOT NULL,
`round_id` int(15) unsigned DEFAULT NULL,
`ss_id` varchar(255) DEFAULT NULL,
`relation_id_SS` varchar(255) DEFAULT NULL,
`ss_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
CONSTRAINT `ss_value` CHECK (json_valid(`ss_value`))
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

CREATE TABLE `subsystem_metrics` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`avg_iter_count` decimal(20,6) NOT NULL DEFAULT 0.000000,
`avg_drift` decimal(20,6) NOT NULL DEFAULT 0.000000,
`datetime` datetime NOT NULL,
`round_id` int(15) unsigned DEFAULT NULL,
`ss_id` varchar(255) DEFAULT NULL,
`relational_id` varchar(255) DEFAULT NULL,
`relation_id_SS` varchar(255) DEFAULT NULL,
`cost` decimal(20,6) unsigned DEFAULT NULL,
`tick_usage` decimal(20,6) unsigned DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
```

-----------------------------------------------------
Version 5.25, 8 September 2024, by Absolucy
Added `log_directory` field to the `round` table.
```sql
ALTER TABLE `round`
ADD COLUMN `log_directory` VARCHAR(255) NULL AFTER `station_name`;

UPDATE `round`
SET `log_directory` = CONCAT(
'data/logs/',
DATE_FORMAT(`initialize_datetime`, '%Y/%m/%d'),
'/round-',
`id`
);
```

-----------------------------------------------------
Version 5.24, 17 May 2023, by LemonInTheDark
Modified the library action table to fit ckeys properly, and to properly store ips.
Expand Down
90 changes: 89 additions & 1 deletion SQL/tgstation_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,9 @@ CREATE TABLE `player` (
`lastadminrank` varchar(32) NOT NULL DEFAULT 'Player',
`accountjoindate` DATE DEFAULT NULL,
`flags` smallint(5) unsigned DEFAULT '0' NOT NULL,
`antag_tokens` tinyint(4) unsigned DEFAULT '0',
`antag_tokens` tinyint(4) unsigned DEFAULT '0',
`metacoins` int(10) unsigned NOT NULL DEFAULT '0',
`twitch_rank` VARCHAR(32) NOT NULL DEFAULT '',
`patreon_key` VARCHAR(32) NOT NULL DEFAULT 'None',
`patreon_rank` VARCHAR(32) NOT NULL DEFAULT 'None',
PRIMARY KEY (`ckey`),
Expand Down Expand Up @@ -494,6 +495,7 @@ CREATE TABLE `round` (
`shuttle_name` VARCHAR(64) NULL,
`map_name` VARCHAR(32) NULL,
`station_name` VARCHAR(80) NULL,
`log_directory` VARCHAR(255) NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
Expand Down Expand Up @@ -706,6 +708,9 @@ CREATE TABLE `telemetry_connections` (
UNIQUE INDEX `unique_constraints` (`ckey` , `telemetry_ckey` , `address` , `computer_id`)
);

--
-- Table structure for table `tutorial_completions`
--
DROP TABLE IF EXISTS `tutorial_completions`;
CREATE TABLE `tutorial_completions` (
`id` INT NOT NULL AUTO_INCREMENT,
Expand All @@ -714,6 +719,89 @@ CREATE TABLE `tutorial_completions` (
PRIMARY KEY (`id`),
UNIQUE INDEX `ckey_tutorial_unique` (`ckey`, `tutorial_key`));

--
-- Table structure for table `metric_data`
--
DROP TABLE IF EXISTS `metric_data`;
CREATE TABLE `metric_data` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`datetime` datetime NOT NULL,
`cpu` decimal(20,10) unsigned DEFAULT NULL,
`maptick` decimal(20,10) unsigned DEFAULT NULL,
`elapsed_processed` int(15) unsigned DEFAULT NULL,
`elapsed_real` int(15) unsigned DEFAULT NULL,
`client_count` int(15) unsigned DEFAULT NULL,
`round_id` int(15) unsigned DEFAULT NULL,
`relational_id` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Table structure for table `overwatch_asn_ban`
--
DROP TABLE IF EXISTS `overwatch_asn_ban`;
CREATE TABLE `overwatch_asn_ban` (
`ip` varchar(21) NOT NULL,
`asn` varchar(100) NOT NULL,
`a_ckey` varchar(30) NOT NULL,
`timestamp` datetime NOT NULL,
PRIMARY KEY (`asn`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Table structure for table `overwatch_ip_cache`
--
DROP TABLE IF EXISTS `overwatch_ip_cache`;
CREATE TABLE `overwatch_ip_cache` (
`ip` varchar(50) NOT NULL DEFAULT '',
`response` longtext NOT NULL,
PRIMARY KEY (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Table structure for table `overwatch_whitelist`
--
DROP TABLE IF EXISTS `overwatch_whitelist`;
CREATE TABLE `overwatch_whitelist` (
`ckey` varchar(30) NOT NULL,
`a_ckey` varchar(30) NOT NULL,
`timestamp` datetime NOT NULL,
PRIMARY KEY (`ckey`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Table structure for table `subsystem_extra_metrics`
--
DROP TABLE IF EXISTS `subsystem_extra_metrics`;
CREATE TABLE `subsystem_extra_metrics` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`datetime` datetime NOT NULL,
`round_id` int(15) unsigned DEFAULT NULL,
`ss_id` varchar(255) DEFAULT NULL,
`relation_id_SS` varchar(255) DEFAULT NULL,
`ss_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
CONSTRAINT `ss_value` CHECK (json_valid(`ss_value`))
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Table structure for table `metric_data`
--
DROP TABLE IF EXISTS `subsystem_metrics`;
CREATE TABLE `subsystem_metrics` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`avg_iter_count` decimal(20,6) NOT NULL DEFAULT 0.000000,
`avg_drift` decimal(20,6) NOT NULL DEFAULT 0.000000,
`datetime` datetime NOT NULL,
`round_id` int(15) unsigned DEFAULT NULL,
`ss_id` varchar(255) DEFAULT NULL,
`relational_id` varchar(255) DEFAULT NULL,
`relation_id_SS` varchar(255) DEFAULT NULL,
`cost` decimal(20,6) unsigned DEFAULT NULL,
`tick_usage` decimal(20,6) unsigned DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
Expand Down
1 change: 1 addition & 0 deletions SQL/tgstation_schema_prefixed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ CREATE TABLE `SS13_round` (
`shuttle_name` VARCHAR(64) NULL,
`map_name` VARCHAR(32) NULL,
`station_name` VARCHAR(80) NULL,
`log_directory` VARCHAR(255) NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
/area/ruin/powered/clownplanet)
"bZ" = (
/obj/machinery/door/airlock/bananium,
/turf/open/indestructible/honk,
/turf/open/floor/carpet,
/area/ruin/powered/clownplanet)
"ca" = (
/obj/item/bikehorn,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@
dir = 8
},
/obj/structure/table/reinforced,
/obj/item/botanical_lexicon,
/obj/item/book/manual/botanical_lexicon,
/turf/open/floor/mineral/plastitanium,
/area/ruin/powered/seedvault)
"bj" = (
Expand Down
Loading

0 comments on commit ff0081a

Please sign in to comment.