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

v6.11.0 Release #1961

Merged
merged 198 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
198 commits
Select commit Hold shift + click to select a range
9ac92d1
Further GraphQL API Implementation
Cyberboss Sep 11, 2024
ed2de22
More GraphQL development
Cyberboss Sep 11, 2024
74fa26f
Implement baby's first pagination on `User`s
Cyberboss Sep 11, 2024
b2fa1c0
Fix VS complaining about a duplicate type name
Cyberboss Sep 11, 2024
99e6220
Fix issues with Swagger generation
Cyberboss Sep 11, 2024
a5b4afb
Add a basic GQL errored login test
Cyberboss Sep 11, 2024
edd41aa
Apply code suggestion
Cyberboss Sep 11, 2024
84f5ee7
Properly setup GraphQL `IUserName` for TGS user
Cyberboss Sep 11, 2024
ede12a6
Enable @defer
Cyberboss Sep 11, 2024
673bfcb
Upgrade to HotChocolate 14 RC. Setup DataLoaders, Filtering, and Sort…
Cyberboss Sep 12, 2024
a2ed580
Add missing dependency comment
Cyberboss Sep 12, 2024
ba5d5e4
Fix build warnings
Cyberboss Sep 12, 2024
d3168f9
NotFound/Gone don't throw for GraphQL AuthorityInvokers
Cyberboss Sep 12, 2024
27e668d
Move API specific `IAuthorityInvoker`s out of Core namespace
Cyberboss Sep 12, 2024
e2abe41
Fix a null referencing issue
Cyberboss Sep 12, 2024
a96c6dc
Split `AuthorityInvoker` into GraphQL and REST
Cyberboss Sep 12, 2024
194f53d
Document a warning suppression
Cyberboss Sep 12, 2024
429ca72
Merge branch 'dev' into MoreGraphQL
Cyberboss Sep 12, 2024
12ba7d4
Cleanup where the RemoteGateway exception is thrown
Cyberboss Sep 12, 2024
c400e7a
Expose `ITokenFactory`'s signing key
Cyberboss Sep 12, 2024
a345414
Swarm servers sync their token signing key
Cyberboss Sep 12, 2024
99baac3
Version Swarm API separately from core version. Allow slight differen…
Cyberboss Sep 12, 2024
b529385
Fix dynamic signing key switching
Cyberboss Sep 13, 2024
7247086
Fix Swarm tests
Cyberboss Sep 13, 2024
e218853
Merge branch 'PrivateKeySharing' into MoreGraphQL
Cyberboss Sep 13, 2024
d94892c
`AddQueryFieldToMutationPayloads`
Cyberboss Sep 13, 2024
6494f35
Simplify a `new` expression
Cyberboss Sep 13, 2024
4bdc799
Fix swarm protocol unit tests
Cyberboss Sep 13, 2024
04a72ad
Merge pull request #1929 from tgstation/PrivateKeySharing
Cyberboss Sep 13, 2024
0744c88
Fix semver type specification
Cyberboss Sep 13, 2024
8765916
Merge branch 'dev' into MoreGraphQL
Cyberboss Sep 13, 2024
68c6ba3
Fix @authorize directives not showing up.
Cyberboss Sep 13, 2024
69a107e
.csproj cleanup
Cyberboss Sep 13, 2024
d143411
Disable the cost analyzer
Cyberboss Sep 14, 2024
30f3bd5
API surface restructuring for GraphQL. Lockdown some API information …
Cyberboss Sep 14, 2024
dcedf3a
Implement OAuthConnections loading for GraphQL
Cyberboss Sep 14, 2024
886a166
Give SwarmNode a specific `NodeId` field and unmangle `Identifier`
Cyberboss Sep 14, 2024
614a299
Cleanup `Program`. Add bypass for update path/host watchdog args
Cyberboss Sep 14, 2024
0f5841a
Fix RawRequestTests assertions
Cyberboss Sep 14, 2024
0c34ff1
Apply code suggestions
Cyberboss Sep 14, 2024
a8d8ee8
Node auth cleanup + some user group implementation
Cyberboss Sep 14, 2024
308a08d
More UserGroup querying work
Cyberboss Sep 14, 2024
ff262b2
Improve `LoginPayload`
Cyberboss Sep 14, 2024
f6c0929
Fix UTF file BOM thingy
Cyberboss Sep 14, 2024
6e4aa50
Implement `UserGroup.UsersQueryable`
Cyberboss Sep 14, 2024
a131fea
Changing port allocation tactics for the millionth time
Cyberboss Sep 14, 2024
0166adc
Do not catch `ArgumentException`s in this retry loop
Cyberboss Sep 15, 2024
0c0bf28
Do not enable BananaCakePop without `HostApiDocumentation`
Cyberboss Sep 15, 2024
90d0d09
Link GraphQL API documentation
Cyberboss Sep 15, 2024
269476c
Revert "Disable the cost analyzer"
Cyberboss Sep 15, 2024
bca2a22
Apply code suggestion
Cyberboss Sep 15, 2024
73b038c
Correct some documentation comments
Cyberboss Sep 15, 2024
c420b63
Implement permission set querying and authority
Cyberboss Sep 15, 2024
bfe12f0
Do not enforce cost limits when debugging
Cyberboss Sep 15, 2024
547fb9d
Use IUserGroupAuthority functions in the controller
Cyberboss Sep 15, 2024
f9587f4
Fix UserGroupController permissions declaration
Cyberboss Sep 15, 2024
3c85d7d
Remove unused GQL field
Cyberboss Sep 15, 2024
1bd6286
Fix some naming issues with Connections
Cyberboss Sep 15, 2024
5b135fb
Makes sense to have recursive lookups here. Cost analyzer should be p…
Cyberboss Sep 15, 2024
998a635
Having `PermissionSet` as a `Node` causes complex issues with mutations
Cyberboss Sep 15, 2024
8c9904f
Correct a documentation comment
Cyberboss Sep 15, 2024
f796969
Setup skeleton create user mutations
Cyberboss Sep 15, 2024
3ffbb74
Better support NoContent results in authorities
Cyberboss Sep 15, 2024
9019396
Clean up GraphQL username retrieval
Cyberboss Sep 15, 2024
0160d17
Implement GraphQL user creation, `UserAuthority.Update`, and make con…
Cyberboss Sep 15, 2024
b802596
Apply a bunch of code suggestions
Cyberboss Sep 15, 2024
8e030ed
Some code cleanup regarding port allocation
Cyberboss Sep 15, 2024
5a527e2
Bump YamlDotNet from 16.1.0 to 16.1.2
dependabot[bot] Sep 16, 2024
0868621
Merge pull request #1932 from tgstation/dependabot/nuget/YamlDotNet-1…
tgstation-server-ci[bot] Sep 16, 2024
902863c
Merge branch 'master' into dev
tgstation-server-ci[bot] Sep 17, 2024
c9c24a5
Flesh out GraphQL client
Cyberboss Sep 18, 2024
a313797
Apply code suggestions
Cyberboss Sep 18, 2024
55c1795
Implement remaining user mutations
Cyberboss Sep 18, 2024
fa2fb00
Skeleton UserGroup mutations
Cyberboss Sep 18, 2024
d8aa878
Merge branch 'master' into dev
tgstation-server-ci[bot] Sep 19, 2024
cc5ddc2
Allow null permission sets and enabled status on user/group creation
Cyberboss Sep 19, 2024
5f0fa33
Fix invalid AuthenticationContexts being able to be dispatched to GQL…
Cyberboss Sep 19, 2024
f37883a
Hopefully fix issues with auth pipeline for good
Cyberboss Sep 20, 2024
c6f30f7
Fix a CA1506 warning
Cyberboss Sep 21, 2024
2223063
Apply code suggestion
Cyberboss Sep 21, 2024
f9218e6
Fix naming of rights flags fields
Cyberboss Sep 21, 2024
07a317e
Apply some code suggestions
Cyberboss Sep 21, 2024
8139422
Fix documentation comments for `IGraphQLAuthorityInvoker` params
Cyberboss Sep 21, 2024
8ccfd68
Note about how `updateUsers` can remove users from groups
Cyberboss Sep 21, 2024
25a0e49
Document user group mutations
Cyberboss Sep 21, 2024
2c3542a
Remember the basics:
Cyberboss Sep 21, 2024
af21ba5
Implement user group mutations
Cyberboss Sep 21, 2024
36694ec
Simplify REST paginated result transformations
Cyberboss Sep 21, 2024
dc03964
Fix some logging placeholders
Cyberboss Sep 21, 2024
2ba4740
Fix the EFCore warning for unordered queryables. Will need to revisit…
Cyberboss Sep 22, 2024
4ca97d2
Rework the 0-length password on create with OAuth scenario to be a li…
Cyberboss Sep 22, 2024
1d7e12d
Fix BOM
Cyberboss Sep 22, 2024
eb2a5c0
Apply code suggestion
Cyberboss Sep 22, 2024
3fc08cc
Fix cyclomatic complexity warning
Cyberboss Sep 22, 2024
6b276f6
Breakup `UserMutations` more to mitigate potential bad requests
Cyberboss Sep 22, 2024
00467fd
Primary constructors cannot have readonly parameters. Not worth using.
Cyberboss Sep 22, 2024
b92af3f
Make page sizes consistent across REST/GQL
Cyberboss Sep 22, 2024
da15190
Fix issues with `RightsTypeInterceptor`
Cyberboss Sep 22, 2024
92b007d
Correct bad argument assertions
Cyberboss Sep 22, 2024
8b09eb7
Implement SxS GraphQL users tests
Cyberboss Sep 22, 2024
3c2ba81
Add missing newline
Cyberboss Sep 22, 2024
c3c51d5
Bump Remora.Discord from 2024.2.0 to 2024.3.0
dependabot[bot] Sep 23, 2024
47b87d9
Merge pull request #1937 from tgstation/dependabot/nuget/Remora.Disco…
tgstation-server-ci[bot] Sep 23, 2024
d7c5374
Fold `TokenValidator` into `AuthenticationContextFactory`
Cyberboss Sep 23, 2024
d0d2db5
Implement basic session invalidation subscriptions
Cyberboss Sep 24, 2024
af60f4f
Fix warnings, test build errors, and disable IDE0290
Cyberboss Sep 24, 2024
0b87147
Fix issue with GQL auth and no roles
Cyberboss Sep 24, 2024
e14d998
Correct GQL Authorize policies
Cyberboss Sep 24, 2024
1931b25
Fix build warning
Cyberboss Sep 24, 2024
f38a21f
Move to saner namespace
Cyberboss Sep 24, 2024
2c01e50
Bump Swashbuckle.AspNetCore.Newtonsoft from 6.7.3 to 6.8.0
dependabot[bot] Sep 24, 2024
14bc1ac
Fix Linux live tests user count being off
Cyberboss Sep 24, 2024
e5f08c3
Split up which jobs `TGS_TEST_GRAPHQL` is set in more
Cyberboss Sep 24, 2024
5faf6ee
Add missing subscription `CancellationToken`
Cyberboss Sep 24, 2024
1cb77e1
Add `User` subscriptions without event senders
Cyberboss Sep 24, 2024
315ffd4
Merge pull request #1938 from tgstation/dependabot/nuget/Swashbuckle.…
tgstation-server-ci[bot] Sep 24, 2024
7a42f8d
Bump Swashbuckle.AspNetCore from 6.7.3 to 6.8.0
dependabot[bot] Sep 24, 2024
f65c19b
Merge branch 'master' into dev
tgstation-server-ci[bot] Sep 24, 2024
fbda701
Merge pull request #1939 from tgstation/dependabot/nuget/Swashbuckle.…
tgstation-server-ci[bot] Sep 24, 2024
89770a6
Don't bring database models into the GraphQL type system
Cyberboss Sep 24, 2024
4ccc773
Make extension method for authentication errors
Cyberboss Sep 24, 2024
6de91eb
Very basic subscription tests and client support
Cyberboss Sep 24, 2024
0b966c6
Fixup `UserSubscriptions`
Cyberboss Sep 25, 2024
36ee7d7
Implement user subscription topic sending
Cyberboss Sep 25, 2024
33c2e53
Update HotChocolate
Cyberboss Sep 25, 2024
333e896
User subscription tests
Cyberboss Sep 25, 2024
5c8808f
Bump Microsoft.IdentityModel.JsonWebTokens from 8.0.2 to 8.1.0
dependabot[bot] Sep 25, 2024
1d80d68
Bump Microsoft.Diagnostics.NETCore.Client from 0.2.532401 to 0.2.547301
dependabot[bot] Sep 25, 2024
b36ede9
Work around a race condition
Cyberboss Sep 25, 2024
12d5e55
Merge pull request #1941 from tgstation/dependabot/nuget/Microsoft.Id…
tgstation-server-ci[bot] Sep 25, 2024
f5a4458
Merge pull request #1942 from tgstation/dependabot/nuget/Microsoft.Di…
tgstation-server-ci[bot] Sep 25, 2024
a979c49
Workaround for https://github.com/ChilliCream/graphql-platform/issues…
Cyberboss Sep 26, 2024
61a7844
Merge pull request #1936 from tgstation/graphql
Cyberboss Sep 26, 2024
8f2f4a2
Bump YamlDotNet from 16.1.2 to 16.1.3
dependabot[bot] Sep 27, 2024
ad5445c
Bump Npgsql.EntityFrameworkCore.PostgreSQL from 8.0.4 to 8.0.8
dependabot[bot] Sep 27, 2024
97228e9
Fix new PR comments sometimes not happening
Cyberboss Sep 27, 2024
f8973b7
Tweaking test port due to conflict in GitHub actions for the gorillio…
Cyberboss Sep 27, 2024
18eb5e9
Merge pull request #1944 from tgstation/dependabot/nuget/YamlDotNet-1…
tgstation-server-ci[bot] Sep 28, 2024
fff6410
Merge pull request #1945 from tgstation/dependabot/nuget/Npgsql.Entit…
tgstation-server-ci[bot] Sep 28, 2024
02d3d16
Revert "Tweaking test port due to conflict in GitHub actions for the …
Cyberboss Sep 30, 2024
a9fc80b
Revert "Some code cleanup regarding port allocation"
Cyberboss Sep 30, 2024
87e8896
Revert "Changing port allocation tactics for the millionth time"
Cyberboss Sep 30, 2024
564e903
Add some buffer time to allow subscriptions to catch up
Cyberboss Oct 2, 2024
fbb41a3
Merge branch 'dev' into MillionthCIFix
Cyberboss Oct 2, 2024
330fbdf
Bro
Cyberboss Oct 2, 2024
d24abb5
Fix potential race conditions with user subscription test
Cyberboss Oct 3, 2024
9d2b1d5
Increase subscription buffers
Cyberboss Oct 3, 2024
74860d7
Merge pull request #1946 from tgstation/MillionthCIFix
Cyberboss Oct 3, 2024
e040fcd
Bump Elastic.CommonSchema.Serilog from 8.11.1 to 8.12.1
dependabot[bot] Oct 3, 2024
c466187
Bump StrawberryShake.Server from 13.9.12 to 13.9.14
dependabot[bot] Oct 3, 2024
cfa554d
Bump Swashbuckle.AspNetCore from 6.8.0 to 6.8.1
dependabot[bot] Oct 3, 2024
726de98
Merge branch 'master' into dev
tgstation-server-ci[bot] Oct 3, 2024
5c4f558
Refactor IrcProvider just a little
craftxbox Sep 20, 2024
8e9cb0e
Changes from review
craftxbox Sep 20, 2024
0efd4c4
debug var for irc provider
craftxbox Oct 2, 2024
16e0359
Update README.md
craftxbox Oct 2, 2024
4123991
bump the config version
craftxbox Oct 4, 2024
94aafc1
fix the tests (i forgot about them)
craftxbox Oct 4, 2024
41711e3
Merge pull request #1949 from tgstation/dependabot/nuget/Swashbuckle.…
tgstation-server-ci[bot] Oct 4, 2024
772554f
Bump Swashbuckle.AspNetCore.Newtonsoft from 6.8.0 to 6.8.1
dependabot[bot] Oct 4, 2024
4bba254
Bump MSTest.TestAdapter from 3.6.0 to 3.6.1
dependabot[bot] Oct 4, 2024
9fea6f8
Merge pull request #1951 from tgstation/dependabot/nuget/Elastic.Comm…
tgstation-server-ci[bot] Oct 4, 2024
91831b5
Merge pull request #1953 from tgstation/dependabot/nuget/MSTest.TestA…
tgstation-server-ci[bot] Oct 4, 2024
36e711d
Bump MSTest.TestFramework from 3.6.0 to 3.6.1
dependabot[bot] Oct 4, 2024
6588066
Merge pull request #1948 from tgstation/dependabot/nuget/StrawberrySh…
tgstation-server-ci[bot] Oct 4, 2024
59aba1f
Merge branch 'dev' into dev
craftxbox Oct 4, 2024
f764e3e
Merge pull request #1952 from tgstation/dependabot/nuget/MSTest.TestF…
tgstation-server-ci[bot] Oct 5, 2024
0e8e623
Merge pull request #1947 from tgstation/dependabot/nuget/Swashbuckle.…
tgstation-server-ci[bot] Oct 5, 2024
e82b1a6
Merge pull request #1935 from craftxbox/dev
Cyberboss Oct 5, 2024
449e3ad
Make authorized gateway information fields properly non-nullable
Cyberboss Oct 6, 2024
e240d86
Pull together all the metadata, documentation, tooling, etc to start …
Cyberboss Oct 6, 2024
09572f6
Merge branch 'dev' into GraphQLGitHub
Cyberboss Oct 6, 2024
b2dcec3
Correct an actions step name
Cyberboss Oct 6, 2024
5e86d0c
Fix some GraphQL holes in release notes
Cyberboss Oct 6, 2024
8f734af
Fix changelog.yml deserialization
Cyberboss Oct 6, 2024
86a6971
Reorganize GraphQL types and make OAuthProviders stronger
Cyberboss Oct 6, 2024
8699ad1
Fix build warnings
Cyberboss Oct 6, 2024
dab44e6
Fix linter issue
Cyberboss Oct 6, 2024
674276e
Case insensitive parse for OAuthConnections
Cyberboss Oct 6, 2024
11de859
Fix build
Cyberboss Oct 6, 2024
0c01d9f
Merge pull request #1954 from tgstation/GraphQLGitHub [RESTDeploy][GQ…
Cyberboss Oct 6, 2024
4cad4e0
Fix issues with login result fields being null
Cyberboss Oct 7, 2024
8d6fb4c
Bump webpanel version
Cyberboss Oct 7, 2024
64eb9bc
Bump API library versions
Cyberboss Oct 7, 2024
bb8a983
Fix ensure-release CD job
Cyberboss Oct 7, 2024
d706658
Merge pull request #1955 from tgstation/MoreShit [NugetDeploy][GQLDep…
Cyberboss Oct 7, 2024
a48df97
Bump Microsoft.IdentityModel.JsonWebTokens from 8.1.0 to 8.1.1
dependabot[bot] Oct 7, 2024
df1751c
Update Wix to 5.0.2
Cyberboss Oct 7, 2024
d518dcc
Merge pull request #1958 from tgstation/FullWixVersionBump
Cyberboss Oct 7, 2024
345bc23
Merge pull request #1957 from tgstation/dependabot/nuget/Microsoft.Id…
tgstation-server-ci[bot] Oct 7, 2024
4ee0671
Bump webpanel to 6.4.0
Cyberboss Oct 8, 2024
e95361e
Pre-empt the patch tuesday PRs
Cyberboss Oct 8, 2024
e4ce4ae
Update to HotChocolate 14RC3
Cyberboss Oct 8, 2024
17805d1
Merge branch 'dev' of https://github.com/tgstation/tgstation-server i…
Cyberboss Oct 8, 2024
e4d64d6
Fix dotnet-ef version
Cyberboss Oct 8, 2024
cc10ef0
Merge pull request #1959 from tgstation/PackageUpdates
Cyberboss Oct 9, 2024
a21d4d5
Bump Microsoft.EntityFrameworkCore.InMemory from 8.0.8 to 8.0.10
dependabot[bot] Oct 9, 2024
764e519
Merge pull request #1960 from tgstation/dependabot/nuget/Microsoft.En…
tgstation-server-ci[bot] Oct 9, 2024
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
9 changes: 5 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ This prevents nesting levels from getting deeper then they need to be.

- Some terminology to help understand the architecture:
- An instance can be thought of as a separate server. It has a separate directory, repository, set of byond installations, etc... The only thing shared amongst instances is API surface, users, global configuration, the active tgstation-server version, and the host machine.
- API refers to the HTTP API unless otherwise specified.
- API refers to the REST API unless otherwise specified.
- The entirety of server functionality resides in the host (Tgstation.Server.Host) project.
- A Component is a service running in tgstation-server to help with instance functionality. These can only be communicated with via the HTTP or DM APIs.
- There is a difference between Watchdog and Host Watchdog. The former monitors DreamDaemon uptime, the latter handles updating tgstation-server.
Expand Down Expand Up @@ -247,7 +247,7 @@ Warning: You may need to temporarily set valid MySql credentials in [MySqlDesign

OAuth providers are hardcoded but it is fairly easy to add new ones. The flow doesn't need to be strict OAuth either (r.e. /tg/ forums). Follow the following steps:

1. Add the name to the [Tgstation.Server.Api.Models.OAuthProviders](../src/Tgstation.Server.Api/Models/OAuthProviders.cs) enum (Also necessitates a minor HTTP API version bump).
1. Add the name to the [Tgstation.Server.Api.Models.OAuthProviders](../src/Tgstation.Server.Api/Models/OAuthProviders.cs) enum (Also necessitates a minor API version bump to the HTTP APIs (REST/GraphQL)).
1. Create an implementation of [IOAuthValidator](../src/Tgstation.Server.Host/Security/OAuth/IOAuthValidator.cs).
- Most providers can simply override the [GenericOAuthValidator](../src/Tgstation.Server.Host/Security/OAuth/GenericOAuthValidator.cs).
1. Construct the implementation in the [OAuthProviders](../src/Tgstation.Server.Host/Security/OAuth/OAuthProviders.cs) class.
Expand Down Expand Up @@ -275,7 +275,8 @@ Major changes should be committed to the `VX` branch created when the time for a

We have several subcomponent APIs we ship with the core server that have their own versions.

- HTTP API
- REST API
- GraphQL API
- DreamMaker API
- Interop API
- Configuration File
Expand Down Expand Up @@ -308,7 +309,7 @@ Word commit names descriptively. Only submit work through pull requests (With th

At the time of this writing, the repository is configured to automate much of the deployment/release process.

When the new API, client, or DMAPI is ready to be released, update the `Version.props` file appropriately and merge the pull request with the text `[APIDeploy]`, `[NuGetDeploy]`, or `[DMDeploy]` respectively in the commit message (or all three!). The release will be published automatically.
When the new API, client, or DMAPI is ready to be released, update the `Version.props` file appropriately and merge the pull request with the text `[RESTDeploy]`, `[GQLDeploy]`, `[NugetDeploy]`, or `[DMDeploy]` respectively in the commit message (or all three!). The release will be published automatically.

That step should be taken for the latest API and client before releasing the core version that uses them if applicable.

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ They will be amalgamated together in the end.
Categories are used by [the release notes tool](../tools/Tgstation.Server.ReleaseNotes) to generate formatted changelists used in releases.
The default category is Core.
Only one category may be specified for a 🆑 block.
Valid categories are Core, DreamMaker API, HTTP API, Host Watchdog, Web Control Panel, Configuration, Nuget: Api, Nuget: Client, and Nuget: Common.
Valid categories are Core, DreamMaker API, REST API, GraphQL API, Host Watchdog, Web Control Panel, Configuration, Nuget: Api, Nuget: Client, and Nuget: Common.
/🆑

[Why]: # (If this does not close or work on an existing GitHub issue, please add a short description [two lines down] of why you think these changes would benefit the server. If you can't justify it in words, it might not be worth adding.)
132 changes: 120 additions & 12 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
# - Checks commit tags for deployment intents
# - Deploys DreamMaker API zip [DMDeploy] (dev/master)
# - Deploys Nuget Packages [NugetDeploy] (dev/master)
# - Deploys HTTP API swagger.json [APIDeploy] (dev/master)
# - Deploys HTTP API swagger.json [RESTDeploy] (dev/master)
# - Deploys GraphQL API schema.graphql [GQLDeploy] (dev/master)
# - Deploys tgstation-server [TGSDeploy] (master)
# - GitHub Releases: https://github.com/tgstation/tgstation-server/releases
# - Docker: https://hub.docker.com/r/tgstation/server
Expand Down Expand Up @@ -578,7 +579,6 @@ jobs:
configuration: ["Debug", "Release"]
env:
TGS_TELEMETRY_KEY_FILE: C:/tgs_telemetry_key.txt
TGS_TEST_GRAPHQL: true
runs-on: windows-latest
steps:
- name: Setup dotnet
Expand Down Expand Up @@ -627,6 +627,7 @@ jobs:
run: |
echo "TGS_TEST_DATABASE_TYPE=PostgresSql" >> $GITHUB_ENV
echo "TGS_TEST_CONNECTION_STRING=Application Name=tgstation-server;Host=127.0.0.1;Username=$USER;Database=TGS__${{ matrix.watchdog-type }}_${{ matrix.configuration }}" >> $GITHUB_ENV
echo "TGS_TEST_GRAPHQL=true" >> $GITHUB_ENV

- name: Setup MariaDB
uses: ankane/setup-mariadb@v1
Expand All @@ -638,6 +639,7 @@ jobs:
run: |
echo "TGS_TEST_DATABASE_TYPE=MariaDB" >> $GITHUB_ENV
echo "TGS_TEST_CONNECTION_STRING=Server=127.0.0.1;uid=root;database=tgs__${{ matrix.watchdog-type }}_${{ matrix.configuration }}" >> $GITHUB_ENV
echo "TGS_TEST_GRAPHQL=true" >> $GITHUB_ENV

- name: Setup MySQL
uses: ankane/setup-mysql@v1
Expand All @@ -657,6 +659,7 @@ jobs:
TGS_CONNSTRING_VALUE="Server=(localdb)\MSSQLLocalDB;Encrypt=false;Integrated Security=true;Initial Catalog=TGS_${{ matrix.watchdog-type }}_${{ matrix.configuration }};Application Name=tgstation-server"
echo "TGS_TEST_CONNECTION_STRING=$(echo $TGS_CONNSTRING_VALUE)" >> $GITHUB_ENV
echo "TGS_TEST_DATABASE_TYPE=SqlServer" >> $GITHUB_ENV
echo "TGS_TEST_GRAPHQL=true" >> $GITHUB_ENV

- name: Checkout (Branch)
uses: actions/checkout@v4
Expand Down Expand Up @@ -739,6 +742,13 @@ jobs:
name: openapi-spec
path: C:/tgs_api.json

- name: Store GraphQL Schema
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'Advanced' && matrix.database-type == 'SqlServer' }}
uses: actions/upload-artifact@v4
with:
name: graphql-schema
path: ./artifacts/tgs-api.graphql

- name: Package Server Service
if: ${{ matrix.configuration == 'Release' && matrix.watchdog-type == 'Basic' && matrix.database-type == 'PostgresSql' }}
run: |
Expand Down Expand Up @@ -855,6 +865,7 @@ jobs:
run: |
echo "TGS_TEST_DATABASE_TYPE=Sqlite" >> $GITHUB_ENV
echo "TGS_TEST_CONNECTION_STRING=Data Source=TGS_${{ matrix.watchdog-type }}_${{ matrix.configuration }}.sqlite3;Mode=ReadWriteCreate" >> $GITHUB_ENV
echo "TGS_TEST_GRAPHQL=true" >> $GITHUB_ENV

- name: Set PostgresSql Connection Info
if: ${{ matrix.database-type == 'PostgresSql' }}
Expand All @@ -874,6 +885,7 @@ jobs:
echo "TGS_TEST_DATABASE_TYPE=MySql" >> $GITHUB_ENV
echo "TGS_TEST_CONNECTION_STRING=Server=127.0.0.1;Port=3307;uid=root;pwd=mysql;database=tgs__${{ matrix.watchdog-type }}_${{ matrix.configuration }}" >> $GITHUB_ENV
echo "Database__ServerVersion=5.7.31" >> $GITHUB_ENV
echo "TGS_TEST_GRAPHQL=true" >> $GITHUB_ENV

- name: Set General__UseBasicWatchdog
if: ${{ matrix.watchdog-type == 'Basic' }}
Expand Down Expand Up @@ -1607,11 +1619,11 @@ jobs:
- name: GitHub Requires at Least One Step for a Job
run: exit 0

deploy-http:
name: Deploy HTTP API
deploy-rest:
name: Deploy REST API
needs: deployment-gate
runs-on: windows-latest
if: contains(github.event.head_commit.message, '[APIDeploy]')
if: contains(github.event.head_commit.message, '[RESTDeploy]')
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
Expand All @@ -1626,7 +1638,7 @@ jobs:
shell: powershell
run: |
[XML]$versionXML = Get-Content build/Version.props
$apiVersion = $versionXML.Project.PropertyGroup.TgsApiVersion
$apiVersion = $versionXML.Project.PropertyGroup.TgsRestVersion
echo "TGS_API_VERSION=$apiVersion" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append

- name: Retrieve OpenAPI Spec
Expand Down Expand Up @@ -1657,7 +1669,7 @@ jobs:
- name: Generate Release Notes
env:
TGS_RELEASE_NOTES_TOKEN: ${{ steps.app-token-generation.outputs.token }}
run: dotnet release_notes_bins/Tgstation.Server.ReleaseNotes.dll ${{ env.TGS_API_VERSION }} --httpapi
run: dotnet release_notes_bins/Tgstation.Server.ReleaseNotes.dll ${{ env.TGS_API_VERSION }} --restapi

- name: Create GitHub Release
uses: actions/create-release@v1
Expand All @@ -1666,7 +1678,7 @@ jobs:
GITHUB_TOKEN: ${{ steps.app-token-generation.outputs.token }}
with:
tag_name: api-v${{ env.TGS_API_VERSION }}
release_name: tgstation-server API v${{ env.TGS_API_VERSION }}
release_name: tgstation-server REST API v${{ env.TGS_API_VERSION }}
body_path: release_notes.md
commitish: ${{ github.event.head_commit.id }}

Expand All @@ -1680,6 +1692,86 @@ jobs:
asset_name: swagger.json
asset_content_type: application/json

deploy-gql:
name: Deploy GraphQL API
needs: deployment-gate
runs-on: windows-latest
if: contains(github.event.head_commit.message, '[GQLDeploy]')
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.TGS_DOTNET_VERSION }}.0.x
dotnet-quality: ${{ env.TGS_DOTNET_QUALITY }}

- name: Checkout
uses: actions/checkout@v4

- name: Parse API version
shell: powershell
run: |
[XML]$versionXML = Get-Content build/Version.props
$apiVersion = $versionXML.Project.PropertyGroup.TgsGraphQLVersion
echo "TGS_API_VERSION=$apiVersion" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
[Version]$parsedVersion = $apiVersion
if ($parsedVersion.Major -eq 0) {
echo "TGS_GRAPHQL_PRERELEASE=true" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
} else {
echo "TGS_GRAPHQL_PRERELEASE=false" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
}

- name: Retrieve GraphQL Schema
uses: actions/download-artifact@v4
with:
name: graphql-schema
path: schema

- name: Grab Most Recent Changelog
shell: powershell
run: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri https://raw.githubusercontent.com/tgstation/tgstation-server/gh-pages/changelog.yml -OutFile changelog.yml

- name: Retrieve ReleaseNotes Binaries
uses: actions/download-artifact@v4
with:
name: release_notes_bins
path: release_notes_bins

- name: Generate App Token
id: app-token-generation
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Generate Release Notes
env:
TGS_RELEASE_NOTES_TOKEN: ${{ steps.app-token-generation.outputs.token }}
run: dotnet release_notes_bins/Tgstation.Server.ReleaseNotes.dll ${{ env.TGS_API_VERSION }} --graphqlapi

- name: Create GitHub Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ steps.app-token-generation.outputs.token }}
with:
tag_name: graphql-v${{ env.TGS_API_VERSION }}
release_name: tgstation-server GraphQL API v${{ env.TGS_API_VERSION }}
body_path: release_notes.md
commitish: ${{ github.event.head_commit.id }}
prerelease: ${{ env.TGS_GRAPHQL_PRERELEASE }}

- name: Upload GraphQL Schema
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ steps.app-token-generation.outputs.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./schema/tgs-api.graphql
asset_name: tgs-api.graphql
asset_content_type: text/plain

deploy-dm:
name: Deploy DreamMaker API
needs: deployment-gate
Expand Down Expand Up @@ -1814,9 +1906,9 @@ jobs:

ensure-release:
name: Ensure TGS Release is Latest GitHub Release
needs: [deploy-dm, deploy-http]
needs: [deploy-dm, deploy-rest, deploy-gql]
runs-on: ubuntu-latest
if: (!(cancelled() || failure())) && (!contains(github.event.head_commit.message, '[TGSDeploy]')) && (needs.deploy-dm.result == 'success' || needs.deploy-http.result == 'success')
if: (!(cancelled() || failure())) && (!contains(github.event.head_commit.message, '[TGSDeploy]')) && (needs.deploy-dm.result == 'success' || needs.deploy-rest.result == 'success' || needs.deploy-gql.result == 'success')
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
Expand Down Expand Up @@ -1844,7 +1936,7 @@ jobs:

deploy-tgs:
name: Deploy TGS
needs: [deploy-dm, deploy-http, deployment-gate]
needs: [deploy-dm, deploy-rest, deploy-gql, deployment-gate]
runs-on: windows-latest
if: (!(cancelled() || failure())) && github.event.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[TGSDeploy]') && needs.deployment-gate.result == 'success'
env:
Expand Down Expand Up @@ -1936,6 +2028,12 @@ jobs:
name: openapi-spec
path: swagger

- name: Retrieve GraphQL Schema
uses: actions/download-artifact@v4
with:
name: graphql-schema
path: schema

- name: Retrieve Debian Packaging Archive
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -2031,7 +2129,7 @@ jobs:
asset_name: DMAPI.zip
asset_content_type: application/zip

- name: Upload OpenApi Spec Artifact
- name: Upload REST API Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ steps.app-token-generation.outputs.token }}
Expand All @@ -2041,6 +2139,16 @@ jobs:
asset_name: swagger.json
asset_content_type: application/json

- name: Upload GraphQL API Artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ steps.app-token-generation.outputs.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./schema/tgs-api.graphql
asset_name: tgs-api.graphql
asset_content_type: text/plain

- name: Upload Server Update Package Artifact
uses: actions/upload-release-asset@v1
env:
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/ci-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,6 @@ jobs:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Comment on new Fork PR
if: github.event.action == 'opened' && !contains(github.event.pull_request.labels.*.name, 'CI Cleared') && github.event.pull_request.user.id != 49699333
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6
with:
message: Thank you for contributing to ${{ github.event.pull_request.base.repo.name }}! The workflow '${{ github.workflow }}' requires repository secrets and will not run without approval. Maintainers can add the `CI Cleared` label to allow it to run. Note that any changes to ci-security.yml and ci-pipeline.yml will not be reflected.
GITHUB_TOKEN: ${{ steps.app-token-generation.outputs.token }}

- name: Comment on dependabot PR
if: github.event.action == 'opened' && !contains(github.event.pull_request.labels.*.name, 'CI Cleared') && github.event.pull_request.user.id == 49699333
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6
with:
message: Set the milestone to the next ${{ (github.head_ref == 'master' && 'patch') || 'minor' }} version, check for supply chain attacks, and then add the `CI Cleared` label to allow CI to run.
GITHUB_TOKEN: ${{ steps.app-token-generation.outputs.token }}

- name: "Remove Stale 'CI Cleared' Label"
if: github.event.action == 'synchronize' || github.event.action == 'reopened'
uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/new-pr-comments.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI Gated PR Comments

on:
pull_request_target:
types:
- opened
branches:
- dev
- master

jobs:
comment-on-new-pr:
name: Comment New PR
if: github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id || github.event.pull_request.user.id == 49699333
runs-on: ubuntu-latest
steps:
- name: Generate App Token
id: app-token-generation
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Comment on new Fork PR
if: github.event.pull_request.user.id != 49699333
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6
with:
message: Thank you for contributing to ${{ github.event.pull_request.base.repo.name }}! The workflow '${{ github.workflow }}' requires repository secrets and will not run without approval. Maintainers can add the `CI Cleared` label to allow it to run. Note that any changes to ci-security.yml and ci-pipeline.yml will not be reflected.
GITHUB_TOKEN: ${{ steps.app-token-generation.outputs.token }}

- name: Comment on dependabot PR
if: github.event.pull_request.user.id == 49699333
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6
with:
message: Set the milestone to the next ${{ (github.head_ref == 'master' && 'patch') || 'minor' }} version, check for supply chain attacks, and then add the `CI Cleared` label to allow CI to run.
GITHUB_TOKEN: ${{ steps.app-token-generation.outputs.token }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ Create an `appsettings.Production.yml` file next to `appsettings.yml`. This will

- `FileLogging:LogLevel`: Can be one of `Trace`, `Debug`, `Information`, `Warning`, `Error`, or `Critical`. Restricts what is put into the log files. Currently `Debug` is reccommended for help with error reporting.

- `FileLogging:ProviderNetworkDebug`: Boolean controlling whether or not Chat bot providers should log their raw network traffic. Currently only applies to IrcProvider.

- `Kestrel:Endpoints:Http:Url`: The URL (i.e. interface and ports) your application should listen on. General use case should be `http://localhost:<port>` for restricted local connections. See the Remote Access section for configuring public access to the World Wide Web. This doesn't need to be changed using the docker setup and should be mapped with the `-p` option instead

- `Database:DatabaseType`: Can be one of `SqlServer`, `MariaDB`, `MySql`, `PostgresSql`, or `Sqlite`.
Expand Down
4 changes: 2 additions & 2 deletions build/TestCommon.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<!-- Pinned: Be VERY careful about updating https://github.com/moq/moq/issues/1372 -->
<PackageReference Include="Moq" Version="4.20.72" />
<!-- Usage: MSTest execution -->
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.1" />
<!-- Usage: MSTest asserts etc... -->
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.1" />
</ItemGroup>

</Project>
Loading
Loading