Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenDream support and SessionId #1666

Merged
merged 196 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
6e015f8
WIP OpenDream Support
Cyberboss Oct 9, 2023
5b468ca
Move DotnetHelper to Host Common lib
Cyberboss Oct 9, 2023
e5c895f
Rename `ByondManager` to `EngineManager`
Cyberboss Oct 9, 2023
c4c656f
Rename `IByondInstaller` to `IEngineInstaller`.
Cyberboss Oct 9, 2023
809ba41
Implement most of OpenDreamInstaller
Cyberboss Oct 9, 2023
b93b9bf
Rename Byond namespace to Engine
Cyberboss Oct 10, 2023
05fe8af
Merge branch 'V6' into OpenDream
Cyberboss Oct 12, 2023
98e8404
Make some repostory progress reporters optional
Cyberboss Oct 12, 2023
90d516c
More OpenDream engine implementation
Cyberboss Oct 12, 2023
f00cb55
Setup dependency injection for mapping IEngineInstallers and global O…
Cyberboss Oct 13, 2023
10a0937
Slowly pulling OpenDream stuff together
Cyberboss Oct 13, 2023
d4b3583
More OpenDream Integration
Cyberboss Oct 14, 2023
1b8759b
Some monitor cleanups
Cyberboss Oct 14, 2023
35602aa
Merge branch 'V6' into OpenDream
Cyberboss Oct 14, 2023
6bc7c63
Set `TgsEngineBuild` MSBuild property for the OD guys to work with
Cyberboss Oct 14, 2023
e706f4c
Fix up all tests except the two main Live ones
Cyberboss Oct 14, 2023
a3e3733
Get most of the BYOND integration test working
Cyberboss Oct 14, 2023
a6907d3
Missed a spot
Cyberboss Oct 14, 2023
abf7fee
Merge branch 'V6' into OpenDream
Cyberboss Oct 14, 2023
59cefa9
Fix a VS message
Cyberboss Oct 14, 2023
22f9a3b
Rework OD test to be alongside main tests
Cyberboss Oct 14, 2023
46ed0ab
Fix bad assumption about DummyGitHubService
Cyberboss Oct 14, 2023
e6615e0
Don't reuse compat ports for OD in Live test
Cyberboss Oct 14, 2023
7d2b80f
Check OD interop version
Cyberboss Oct 14, 2023
57b2c8e
Simplify an `ObjectDisposedException`
Cyberboss Oct 14, 2023
2f4aaab
Additional logging around engine deletion
Cyberboss Oct 14, 2023
a70cbc2
Rearrange some logging to make more sense in an async context
Cyberboss Oct 14, 2023
61830a7
Use a thread safe order of operations here just in case
Cyberboss Oct 14, 2023
188932e
Compare `ByondVersion` not `Version`
Cyberboss Oct 14, 2023
9c5c5b2
Woe is me for not using operator overloading
Cyberboss Oct 14, 2023
a1f2a04
Rearrange OD compat test slightly
Cyberboss Oct 14, 2023
e36fd18
Fix issue with non-existent BYOND cfg dir
Cyberboss Oct 14, 2023
84c0fcd
Redo how ByondVersion is implemented to support custom OD builds
Cyberboss Oct 15, 2023
e05e79b
Setup Windows Firewall handling for OpenDream
Cyberboss Oct 15, 2023
9995f44
Log `ByondVersion` not `Version`
Cyberboss Oct 15, 2023
947ec44
Fix stream seeking in test
Cyberboss Oct 15, 2023
7671eee
Simplify OD install paths
Cyberboss Oct 15, 2023
0544c02
Log OD build output
Cyberboss Oct 15, 2023
1f2e449
Fix OD build paths being too long on Windows
Cyberboss Oct 15, 2023
cb7bddb
Fix test OD repo extraction
Cyberboss Oct 15, 2023
bf021d5
ADHD telling me to remove this period
Cyberboss Oct 15, 2023
2568524
Fix `OpenDreamInstallation` constructor
Cyberboss Oct 15, 2023
4e78b3e
Fix `CustomIteration` not being set for OD engines
Cyberboss Oct 15, 2023
b8b9ad1
Fix BYOND specific `WatchdogTest` asserts
Cyberboss Oct 15, 2023
0f03897
Fix using wrong OD `DMCompiler.exe`
Cyberboss Oct 15, 2023
692c2f6
Remove --verbose flag from OD compiler invocation
Cyberboss Oct 15, 2023
1416f18
Quote .dme path in OD compiler command line
Cyberboss Oct 15, 2023
df2f30f
Merge branch 'V6' into OpenDream
Cyberboss Oct 15, 2023
1eeba3a
Rename ByondVersion to EngineVersion
Cyberboss Oct 15, 2023
a4a3b78
Clean up ByondResponse
Cyberboss Oct 15, 2023
32873fa
More API sanity for `EngineVersion`s
Cyberboss Oct 15, 2023
cba40d8
Make .dme modification use saner line endings
Cyberboss Oct 15, 2023
9081ad4
Additional failure state for Bridge requests
Cyberboss Oct 15, 2023
eb51674
Fix engine version parsing
Cyberboss Oct 15, 2023
a1f1dbc
Make a log message correct
Cyberboss Oct 15, 2023
0fefec9
Fix OpenDream engine parameter encoding
Cyberboss Oct 15, 2023
0853fd3
Rename BYOND bin const to be more specific
Cyberboss Oct 15, 2023
1e70e2d
Handle OpenDream tripping over `PortBindTest`
Cyberboss Oct 15, 2023
8877352
Make some live tests more generic for OpenDream
Cyberboss Oct 15, 2023
9ed98e2
Fix OpenDream installation layout
Cyberboss Oct 15, 2023
46a6dfe
Yeah, just commit this debug code for now
Cyberboss Oct 15, 2023
421e4f8
Increase port bind test delay
Cyberboss Oct 15, 2023
4fbdb9a
Fix socket lingering
Cyberboss Oct 15, 2023
ed00399
Make some logging engine agnostic
Cyberboss Oct 15, 2023
0b254fa
Fix engine port detection under test
Cyberboss Oct 15, 2023
5d5fbea
Hopefully fixes socket bind testing for the last time
Cyberboss Oct 15, 2023
c299825
Some `OpenDreamInstaller` unit tests
Cyberboss Oct 15, 2023
63aace2
Add some repository manager unit tests
Cyberboss Oct 15, 2023
498e523
Fix retesting live catching in-use files sometimes
Cyberboss Oct 16, 2023
64baf37
Bind conflicts again!
Cyberboss Oct 16, 2023
89ad990
Fix test assumption confusion
Cyberboss Oct 16, 2023
5fdaacc
Use the new system for finding the topic port
Cyberboss Oct 16, 2023
2e53c08
Cargo cult fix for bind test
Cyberboss Oct 16, 2023
15a3c12
Fix more bad ports with test topics
Cyberboss Oct 16, 2023
f615a34
Rage comments
Cyberboss Oct 16, 2023
37c6e1b
Slight expression extraction to help with debugging
Cyberboss Oct 16, 2023
068f756
FUCK ADDRESS REUSE ERRORS
Cyberboss Oct 16, 2023
257b7be
Make reboots a lot faster
Cyberboss Oct 16, 2023
71d803c
More OD test fixes
Cyberboss Oct 16, 2023
4fca324
Remove debug code
Cyberboss Oct 16, 2023
bb5fd19
Fix other failing test
Cyberboss Oct 16, 2023
2a7ac83
Merge branch 'V6' into OpenDream
Cyberboss Oct 16, 2023
b397b05
This reboot was too fast
Cyberboss Oct 16, 2023
512aa8f
Fix test cleaning
Cyberboss Oct 16, 2023
0413f8b
Fix test location
Cyberboss Oct 16, 2023
05c8afc
Remove unused field
Cyberboss Oct 16, 2023
9a3d02a
BYOND -> Engine nomenclature changes
Cyberboss Oct 16, 2023
8e5f2dd
Undo breaking API 10 changes
Cyberboss Oct 16, 2023
d76ed91
FUCKING SOCKET REUSE
Cyberboss Oct 16, 2023
04bf89f
More DMAPI updates for OpenDream
Cyberboss Oct 16, 2023
a71f23e
Fix event tests
Cyberboss Oct 16, 2023
33f0933
Stop spamming firewall exceptions on dev machines
Cyberboss Oct 16, 2023
dfff65c
Respect `SkipAddingByondFirewallException` for OD
Cyberboss Oct 16, 2023
c462fab
Use deterministic temp paths in integration tests
Cyberboss Oct 16, 2023
7082b7e
Avoid using preview language feature
Cyberboss Oct 16, 2023
98e1c19
Possibly fix address reuse issue forever
Cyberboss Oct 16, 2023
e9d3892
Log OpenDream build exit code
Cyberboss Oct 16, 2023
6c4046c
Fix temp path issue in version tests
Cyberboss Oct 16, 2023
ef8b2e8
SocketOption.DontLinger is Windows only
Cyberboss Oct 16, 2023
5608b93
Fix various CI test issues
Cyberboss Oct 16, 2023
25c997d
Add OpenDream build step to CI
Cyberboss Oct 16, 2023
2747b91
Fix DMAPI build OD submodule update
Cyberboss Oct 16, 2023
97e4ad2
Fix `General:OpenDreamGitUrl` serialization
Cyberboss Oct 16, 2023
4599e46
Fix test timeouts for OpenDream installation
Cyberboss Oct 16, 2023
8d1cef7
Correct CI step name
Cyberboss Oct 16, 2023
96222d8
Switch to new packager
Cyberboss Oct 20, 2023
66ace82
Merge branch 'V6' into OpenDream
Cyberboss Oct 21, 2023
a2b4d97
Fix IIOManager documentation comments
Cyberboss Oct 21, 2023
24e21f6
Fix OD engine installation
Cyberboss Oct 21, 2023
45f5f74
Remove some unused usings
Cyberboss Oct 21, 2023
61278a8
Rename `byondLock` variables to `engineLock`
Cyberboss Oct 21, 2023
1480e48
Take advantage of Robust's logging cvars
Cyberboss Oct 21, 2023
c6b435c
More engine generic deployment chat messages
Cyberboss Oct 21, 2023
d6881f6
Correct i before e typos
Cyberboss Oct 21, 2023
0ca70d8
Fix API things relating to ByondVersion and ByondRights
Cyberboss Oct 21, 2023
7643e91
Fix `EngineController.Update` permissions
Cyberboss Oct 21, 2023
8eb8976
Default to new EngineVersion property in model
Cyberboss Oct 21, 2023
22707da
Additional logging
Cyberboss Oct 21, 2023
cf0194b
Fix engine version ordering in controller
Cyberboss Oct 21, 2023
08e16c1
Fix path correction in OpenDreamInstaller
Cyberboss Oct 21, 2023
6124b4c
Fix Engine delete job title
Cyberboss Oct 21, 2023
2ec897f
Make compiler step name engine agnostic
Cyberboss Oct 21, 2023
63f0843
Remove redundant check
Cyberboss Oct 21, 2023
ba5823c
Set minimum required OD commit to https://github.com/OpenDreamProject…
Cyberboss Oct 21, 2023
aa0ca83
Sort usings
Cyberboss Oct 21, 2023
cba6d1b
Test we're populating the old `CompileJob.ByondVersion` for compatibi…
Cyberboss Oct 21, 2023
e8e0f12
Workaround for https://github.com/OpenDreamProject/OpenDream/issues/1519
Cyberboss Oct 21, 2023
8f73c33
Use CVar `opendream.json_path` to prevent unknown argument warning
Cyberboss Oct 21, 2023
186d5d6
Engine agnostic job name
Cyberboss Oct 21, 2023
73fa2ee
Switch Byond column names to Engine in database
Cyberboss Oct 21, 2023
8834fdb
Fix failing unit test
Cyberboss Oct 21, 2023
30f2afe
Merge branch 'V6' into OpenDream
Cyberboss Oct 24, 2023
13cf7bb
Merge branch 'V6' into OpenDream
Cyberboss Oct 25, 2023
e7652c2
Merge branch 'V6' into OpenDream
Cyberboss Oct 25, 2023
0f3fc4a
Address a VS message
Cyberboss Nov 5, 2023
a01bea5
We're officially API breaking!
Cyberboss Nov 5, 2023
3fce862
Very naughty merge of 'V6' into OpenDream
Cyberboss Nov 9, 2023
0c74497
Merge branch 'V6' into OpenDream
Cyberboss Nov 11, 2023
80d5098
Rename `ShaIsParent` to `CommittishIsParent`
Cyberboss Nov 11, 2023
de714c3
We now have the `tgs-min-compat` OD tag
Cyberboss Nov 11, 2023
7310359
OD uses UDP, so bind test to account for that
Cyberboss Nov 11, 2023
b2bce2c
Merge branch 'V6' into OpenDream
Cyberboss Nov 12, 2023
d2acb3c
Merge branch 'V6' into OpenDream
Cyberboss Nov 12, 2023
be741ed
Most minor of code cleanups
Cyberboss Nov 12, 2023
d8dd0f3
Merge branch 'V6' into OpenDream
Cyberboss Nov 12, 2023
baa893e
Test OpenDream with TGS deployment
Cyberboss Nov 14, 2023
0b81771
Terminate OD builds if cancelled
Cyberboss Nov 14, 2023
25c9cc4
Log spam for OD build hang
Cyberboss Nov 14, 2023
a0fd49f
Merge branch 'V6' into OpenDream
Cyberboss Nov 14, 2023
75db9af
Move `EngineVersion` to core models namespace
Cyberboss Nov 15, 2023
d0fcfa0
Seal `EngineVersion`
Cyberboss Nov 15, 2023
b7b3f0d
Use OD's specific dotnet version where appropriate
Cyberboss Nov 15, 2023
f286b0f
Fix logic error in `EngineCommand`
Cyberboss Nov 15, 2023
4788cea
Merge branch 'V6' into OpenDream
Cyberboss Nov 15, 2023
f5ebfae
Update Remora.Discord and Serilog.Extensions.Logging
Cyberboss Nov 15, 2023
f87f36f
Correct .yml formatting
Cyberboss Nov 15, 2023
f405edd
Hack to see if we can get any output out of this hung process
Cyberboss Nov 16, 2023
a3e5828
Merge branch 'V6' into OpenDream
Cyberboss Nov 16, 2023
4537845
Make this workaround generic
Cyberboss Nov 16, 2023
6977472
These environment variables are preventing SDK detection from working…
Cyberboss Nov 17, 2023
85aa8d0
Simplify a name
Cyberboss Nov 17, 2023
e24d4d9
Clean up points where we `TellWorldToReboot()`
Cyberboss Nov 17, 2023
ffb7dcf
Merge branch 'V6' into OpenDream
Cyberboss Nov 17, 2023
08f1a1e
This test doesn't apply to OD
Cyberboss Nov 17, 2023
a4b00b0
Merge branch 'V6' into OpenDream
Cyberboss Nov 17, 2023
fab05fd
Fix misuse of OD logging cvars
Cyberboss Nov 18, 2023
dac01b4
Fix calling `TrustDmbPath` on multiple installers
Cyberboss Nov 18, 2023
2f8e566
Do not use `AdvancedWatchdog` features for non-Byond engines
Cyberboss Nov 18, 2023
33e1aaf
Merge branch 'V6' into OpenDream
Cyberboss Nov 18, 2023
d145f48
Disallow custom chat commands while the server is rebooting
Cyberboss Nov 19, 2023
b1b5d71
Cancel pending topic requests when the server dies or reboots
Cyberboss Nov 19, 2023
d744504
Minor documentation update for `IChatTrackingContext`
Cyberboss Nov 19, 2023
882e08f
More guards against sending topic requests while the server is starti…
Cyberboss Nov 19, 2023
0e7cf63
Remove redundant checks in `SendRawTopic`
Cyberboss Nov 19, 2023
8b9ff88
Make jobs hub test start/stop ordering deterministic
Cyberboss Nov 19, 2023
6a051f4
Fix `NullReferenceException` in `SessionController`
Cyberboss Nov 19, 2023
421733b
Add another test logging exception for EFCore cancellation errors
Cyberboss Nov 19, 2023
0a874c6
Add another error log exception to tests
Cyberboss Nov 19, 2023
cc4b4de
Wait for DD proccesses to exit after killing
Cyberboss Nov 19, 2023
1374914
This seems to be a fairly reproducible topic hang, which is nice to have
Cyberboss Nov 19, 2023
54ec0a7
More `Assert`s, more better
Cyberboss Nov 19, 2023
2cfdf21
Fix `ChatManager` `NullReferenceException`
Cyberboss Nov 19, 2023
03de22e
Remove potential GetGuildAsync spam when mapping Discord channels
Cyberboss Nov 19, 2023
7f3888d
Add live tests helper for UseBasicWatchdog
Cyberboss Nov 19, 2023
ee8aab0
Fix race condition in `ChatManager.ChangeChannels`
Cyberboss Nov 19, 2023
c649af9
Version bump to 5.18.2
Cyberboss Nov 19, 2023
669cc83
Fix using the wrong task when awaiting reboots for topic requests
Cyberboss Nov 19, 2023
a8c2d49
Use a float here cause why not?
Cyberboss Nov 19, 2023
70edd0a
Fix downloading configuration files locking at the transfer level
Cyberboss Nov 19, 2023
8f51c5f
Add `SessionId` to `DreamDaemonResponse`
Cyberboss Nov 19, 2023
34ddb2f
Do not duplicate logging here
Cyberboss Nov 19, 2023
b01700e
Log sleep_offline with Export and Topic
Cyberboss Nov 19, 2023
f4a4e08
Correct overzealous watchdog restarts
Cyberboss Nov 19, 2023
2432c22
Merge branch 'V6' into OpenDream
Cyberboss Nov 19, 2023
6967d9f
Merge branch 'NeverEndingTrainOfFixes' into OpenDream
Cyberboss Nov 19, 2023
84c5359
Fix basic watchdog tests
Cyberboss Nov 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 74 additions & 11 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ on:

env:
TGS_DOTNET_VERSION: 8
OD_DOTNET_VERSION: 7
TGS_DOTNET_QUALITY: ga
TGS_TEST_GITHUB_TOKEN: ${{ secrets.LIVE_TESTS_TOKEN }}
TGS_RELEASE_NOTES_TOKEN: ${{ secrets.DEV_PUSH_TOKEN }}
Expand Down Expand Up @@ -164,6 +165,50 @@ jobs:
fi
exit $retval

opendream-build:
name: Build DMAPI (OpenDream)
needs: start-ci-run-gate
if: (!(cancelled() || failure()) && needs.start-ci-run-gate.result == 'success')
strategy:
fail-fast: false
matrix:
committish: [ 'master', 'tgs-min-compat' ]
runs-on: ubuntu-latest
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '${{ env.OD_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Checkout (Branch)
uses: actions/checkout@v3
if: github.event_name == 'push' || github.event_name == 'schedule'

- name: Checkout (PR Merge)
uses: actions/checkout@v3
if: github.event_name != 'push' && github.event_name != 'schedule'
with:
ref: "refs/pull/${{ github.event.number }}/merge"

- name: Checkout OpenDream
run: |
cd $HOME
git clone https://github.com/OpenDreamProject/OpenDream
cd OpenDream
git checkout ${{ matrix.committish }}
git submodule update --init --recursive

- name: Create TGS Deployment
run: |
cd $HOME/OpenDream
dotnet run -c Release --project OpenDreamPackageTool -- --tgs -o tgs_deploy

- name: Build DMAPI
run: |
cd tests/DMAPI/BasicOperation
$HOME/OpenDream/tgs_deploy/bin/compiler/DMCompiler --verbose --notices-enabled basic_operation_test.dme

pages-build:
name: Build gh-pages
runs-on: ubuntu-latest
Expand All @@ -173,7 +218,8 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Checkout (Branch)
uses: actions/checkout@v3
Expand Down Expand Up @@ -275,6 +321,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Checkout (Branch)
uses: actions/checkout@v3
Expand Down Expand Up @@ -325,6 +372,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Checkout (Branch)
uses: actions/checkout@v3
Expand Down Expand Up @@ -360,8 +408,8 @@ jobs:

windows-integration-test:
name: Windows Live Tests
needs: dmapi-build
if: (!(cancelled() || failure()) && needs.dmapi-build.result == 'success')
needs: [dmapi-build, opendream-build]
if: (!(cancelled() || failure()) && needs.dmapi-build.result == 'success' && needs.opendream-build.result == 'success')
strategy:
fail-fast: false
matrix:
Expand All @@ -380,7 +428,10 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-version: |
${{ env.TGS_DOTNET_VERSION }}.0.x
${{ env.OD_DOTNET_VERSION }}.0.x
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Set TGS_TEST_DUMP_API_SPEC
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'Advanced' && matrix.database-type == 'SqlServer' }}
Expand Down Expand Up @@ -538,8 +589,8 @@ jobs:

linux-integration-tests:
name: Linux Live Tests
needs: dmapi-build
if: (!(cancelled() || failure()) && needs.dmapi-build.result == 'success')
needs: [dmapi-build, opendream-build]
if: (!(cancelled() || failure()) && needs.dmapi-build.result == 'success' && needs.opendream-build.result == 'success')
services: # We start all dbs here so we can just code the stuff once
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
Expand Down Expand Up @@ -601,7 +652,10 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-version: |
${{ env.TGS_DOTNET_VERSION }}.0.x
${{ env.OD_DOTNET_VERSION }}.0.x
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Set Sqlite Connection Info
if: ${{ matrix.database-type == 'Sqlite' }}
Expand Down Expand Up @@ -1105,6 +1159,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Checkout (Branch)
uses: actions/checkout@v3
Expand Down Expand Up @@ -1230,6 +1285,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Retrieve Latest winget-pkgs PULL_REQUEST_TEMPLATE commit SHA from GitHub API
id: get-sha
Expand Down Expand Up @@ -1283,7 +1339,8 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -1346,7 +1403,8 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -1409,6 +1467,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -1459,6 +1518,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Checkout
uses: actions/checkout@v3
Expand All @@ -1482,6 +1542,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -1690,9 +1751,10 @@ jobs:
if: (!(cancelled() || failure()) && needs.deploy-tgs.result == 'success')
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -1780,6 +1842,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: '${{ env.TGS_DOTNET_VERSION }}.0.x'
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Install winget
uses: Cyberboss/install-winget@v1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ Exposing the builtin Kestrel server to the internet directly over HTTP is highly

System administrators will most likely have their own configuration plans, but here are some basic guides for beginners.

Once complete, test that your configuration worked by visiting your proxy site from a browser on a different computer. You should recieve a 401 Unauthorized response.
Once complete, test that your configuration worked by visiting your proxy site from a browser on a different computer. You should receive a 401 Unauthorized response.

_NOTE: Your reverse proxy setup may interfere with SSE (Server-Sent Events) which is used for real-time job updates. If you find this to be the case, please open an issue describing what you did to fix it as there may be a way for us to bypass the need for a workaround from our end._

Expand Down
2 changes: 1 addition & 1 deletion build/Version.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<TgsCommonLibraryVersion>7.0.0</TgsCommonLibraryVersion>
<TgsApiLibraryVersion>13.0.0</TgsApiLibraryVersion>
<TgsClientVersion>15.0.0</TgsClientVersion>
<TgsDmapiVersion>6.7.1</TgsDmapiVersion>
<TgsDmapiVersion>7.0.0</TgsDmapiVersion>
<TgsInteropVersion>5.7.0</TgsInteropVersion>
<TgsHostWatchdogVersion>1.4.0</TgsHostWatchdogVersion>
<TgsContainerScriptVersion>1.2.1</TgsContainerScriptVersion>
Expand Down
6 changes: 3 additions & 3 deletions docs/API.dox
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ If the provided credentials are valid and your user account is enabled you will
}
@endcode

If your account is disabled, you will recieve a 403 response.
If your account is disabled, you will receive a 403 response.

You may recognize the bearer value as a <a href="https://jwt.io">Json Web Token</a>. This is a secure representation of your identity to the server. It expires after a set period of time or until your password changes. It must be present for requests made to all other APIs. To do so add the following header to your other requests

- Authorization:Bearer `<your bearer token>`

Continue to use this token until you begin to recieve 401 responses from the API. Then repeat the process to get a new one if your credentials are still valid
Continue to use this token until you begin to receive 401 responses from the API. Then repeat the process to get a new one if your credentials are still valid

@subsection api_auth_o OAuth 2.0

Expand Down Expand Up @@ -467,7 +467,7 @@ I POST "/Config" @ref Tgstation.Server.Api.Models.ConfigurationFile => @ref Tgst

When creating a file, only @ref Tgstation.Server.Api.Models.ConfigurationFile.Path and @ref Tgstation.Server.Api.Models.ConfigurationFile.Content should be specified

If the file already exists, the @ref Tgstation.Server.Api.Models.ConfigurationFile.LastReadHash field must also be present with the last version recieved from the server for that file. If this does not match at the time of the request, 409 will be returned, indicating the file has changed since it was last viewed by the client.
If the file already exists, the @ref Tgstation.Server.Api.Models.ConfigurationFile.LastReadHash field must also be present with the last version received from the server for that file. If this does not match at the time of the request, 409 will be returned, indicating the file has changed since it was last viewed by the client.

To delete a file set @ref Tgstation.Server.Api.Models.ConfigurationFile.Content to null in the request.

Expand Down
26 changes: 18 additions & 8 deletions src/DMAPI/tgs.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tgstation-server DMAPI

#define TGS_DMAPI_VERSION "6.7.1"
#define TGS_DMAPI_VERSION "7.0.0"

// All functions and datums outside this document are subject to change with any version and should not be relied on.

Expand Down Expand Up @@ -73,12 +73,12 @@
#define TGS_EVENT_REPO_MERGE_PULL_REQUEST 3
/// Before the repository makes a sychronize operation. Parameters: Absolute repostiory path.
#define TGS_EVENT_REPO_PRE_SYNCHRONIZE 4
/// Before a BYOND install operation begins. Parameters: [/datum/tgs_version] of the installing BYOND.
#define TGS_EVENT_BYOND_INSTALL_START 5
/// When a BYOND install operation fails. Parameters: Error message
#define TGS_EVENT_BYOND_INSTALL_FAIL 6
/// When the active BYOND version changes. Parameters: (Nullable) [/datum/tgs_version] of the current BYOND, [/datum/tgs_version] of the new BYOND.
#define TGS_EVENT_BYOND_ACTIVE_VERSION_CHANGE 7
/// Before a engine install operation begins. Parameters: Version string of the installing engine.
#define TGS_EVENT_ENGINE_INSTALL_START 5
/// When a engine install operation fails. Parameters: Error message
#define TGS_EVENT_ENGINE_INSTALL_FAIL 6
/// When the active engine version changes. Parameters: (Nullable) Version string of the current engine, version string of the new engine.
#define TGS_EVENT_ENGINE_ACTIVE_VERSION_CHANGE 7
/// When the compiler starts running. Parameters: Game directory path, origin commit SHA.
#define TGS_EVENT_COMPILE_START 8
/// When a compile is cancelled. No parameters.
Expand Down Expand Up @@ -108,7 +108,7 @@
// #define TGS_EVENT_DREAM_DAEMON_LAUNCH 22
/// After a single submodule update is performed. Parameters: Updated submodule name.
#define TGS_EVENT_REPO_SUBMODULE_UPDATE 23
/// After CodeModifications are applied, before DreamMaker is run. Parameters: Game directory path, origin commit sha, byond version.
/// After CodeModifications are applied, before DreamMaker is run. Parameters: Game directory path, origin commit sha, version string of the used engine.
#define TGS_EVENT_PRE_DREAM_MAKER 24
/// Whenever a deployment folder is deleted from disk. Parameters: Game directory path.
#define TGS_EVENT_DEPLOYMENT_CLEANUP 25
Expand All @@ -122,6 +122,7 @@
/// The watchdog will restart on reboot.
#define TGS_REBOOT_MODE_RESTART 2

// Note that security levels are currently meaningless in OpenDream
/// DreamDaemon Trusted security level.
#define TGS_SECURITY_TRUSTED 0
/// DreamDaemon Safe security level.
Expand All @@ -136,6 +137,11 @@
/// DreamDaemon invisible visibility level.
#define TGS_VISIBILITY_INVISIBLE 2

/// The Build Your Own Net Dream engine.
#define TGS_ENGINE_TYPE_BYOND 0
/// The OpenDream engine.
#define TGS_ENGINE_TYPE_OPENDREAM 1

//REQUIRED HOOKS

/**
Expand Down Expand Up @@ -449,6 +455,10 @@
/world/proc/TgsVersion()
return

/// Returns the running engine type
/world/proc/TgsEngine()
return

/// Returns the current [/datum/tgs_version] of the DMAPI being used if it was activated, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping!
/world/proc/TgsApiVersion()
return
Expand Down
7 changes: 7 additions & 0 deletions src/DMAPI/tgs/core/core.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@
if(api)
return api.ApiVersion()

/world/TgsEngine()
#ifdef OPENDREAM
return TGS_ENGINE_TYPE_OPENDREAM
#else
return TGS_ENGINE_TYPE_BYOND
#endif

/world/TgsInstanceName()
var/datum/tgs_api/api = TGS_READ_GLOBAL(tgs)
if(api)
Expand Down
2 changes: 1 addition & 1 deletion src/DMAPI/tgs/v5/_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#define DMAPI5_TOPIC_REQUEST_LIMIT 65528
#define DMAPI5_TOPIC_RESPONSE_LIMIT 65529

#define DMAPI5_BRIDGE_COMMAND_PORT_UPDATE 0
#define DMAPI5_BRIDGE_COMMAND_STARTUP 1
#define DMAPI5_BRIDGE_COMMAND_PRIME 2
#define DMAPI5_BRIDGE_COMMAND_REBOOT 3
Expand All @@ -18,6 +17,7 @@

#define DMAPI5_PARAMETER_ACCESS_IDENTIFIER "accessIdentifier"
#define DMAPI5_PARAMETER_CUSTOM_COMMANDS "customCommands"
#define DMAPI5_PARAMETER_TOPIC_PORT "topicPort"

#define DMAPI5_CHUNK "chunk"
#define DMAPI5_CHUNK_PAYLOAD "payload"
Expand Down
9 changes: 8 additions & 1 deletion src/DMAPI/tgs/v5/api.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

var/datum/tgs_version/api_version = ApiVersion()
version = null // we want this to be the TGS version, not the interop version
var/list/bridge_response = Bridge(DMAPI5_BRIDGE_COMMAND_STARTUP, list(DMAPI5_BRIDGE_PARAMETER_MINIMUM_SECURITY_LEVEL = minimum_required_security_level, DMAPI5_BRIDGE_PARAMETER_VERSION = api_version.raw_parameter, DMAPI5_PARAMETER_CUSTOM_COMMANDS = ListCustomCommands()))
var/list/bridge_response = Bridge(DMAPI5_BRIDGE_COMMAND_STARTUP, list(DMAPI5_BRIDGE_PARAMETER_MINIMUM_SECURITY_LEVEL = minimum_required_security_level, DMAPI5_BRIDGE_PARAMETER_VERSION = api_version.raw_parameter, DMAPI5_PARAMETER_CUSTOM_COMMANDS = ListCustomCommands(), DMAPI5_PARAMETER_TOPIC_PORT = GetTopicPort()))
if(!istype(bridge_response))
TGS_ERROR_LOG("Failed initial bridge request!")
return FALSE
Expand Down Expand Up @@ -106,6 +106,13 @@
initialized = TRUE
return TRUE

/datum/tgs_api/v5/proc/GetTopicPort()
#if defined(OPENDREAM) && defined(OPENDREAM_TOPIC_PORT_EXISTS)
return "[world.opendream_topic_port]"
#else
return null
#endif

/datum/tgs_api/v5/proc/RequireInitialBridgeResponse()
TGS_DEBUG_LOG("RequireInitialBridgeResponse()")
var/logged = FALSE
Expand Down
9 changes: 7 additions & 2 deletions src/DMAPI/tgs/v5/bridge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,16 @@
TGS_ERROR_LOG("Failed bridge request: [bridge_request]")
return

var/response_json = file2text(export_response["CONTENT"])
if(!response_json)
var/content = export_response["CONTENT"]
if(!content)
TGS_ERROR_LOG("Failed bridge request, missing content!")
return

var/response_json = file2text(content)
if(!response_json)
TGS_ERROR_LOG("Failed bridge request, failed to load content!")
return

var/list/bridge_response = json_decode(response_json)
if(!bridge_response)
TGS_ERROR_LOG("Failed bridge request, bad json: [response_json]")
Expand Down
Loading
Loading