repoRust.ServerManagercancel

56 Commits over 335 Days - 0.01cph!

4 Days Ago
New: support xml-style errors from API Allows to see more details about what's going wrong with the request(Azure SAS errors are xml) Tests: got the SAS error locally, saw the logs in ServerManager Bugfix: don't use a closed stream when retrying backup uploading If we fail the upload at the point of consuming the stream (so passed backupBegin), it will close the stream and fall over on Position call, making retries useless. Tests: when running own server it was erroring out on retries with stream closed exception - not anymore. Bugfix: Don't wait after last upload retry Tests: Saw the uploads fail, didn't see the log after last attempt. Update: renamed file back to BackupData I shouldn't have renamed it in the first place. Clean: removing obsolete property Tests: local run was able to upload files Bugfix: respect the cancellation token when fetching a response of request Update: limit how much time upload routine can take - also add extra logging around processGuard semaphore Tests: tested the entire flow by triggering 5 snapshots Bugfix: use the right token for some async ops Bugfix: avoid unlockign semaphore from the wrong thread If it would time out during the wait period, it would release the semaphore in finally, leading to break of unique ownership promise Clean: remove ITask inheritance from UploadPerfSnapshot It used to be a task at the start, but not anymore Update: review feedback - dispose of the nested CTS for perf snapshot uploads - Use async copy when creating an extra stream to send backup files Tests: full local server flow + 2 snapshot uploads Merge pull request #7 from Facepunch/DebugImprovements Minor fixes and more verbose HTTP errors
4 Days Ago
WIP restart server at 4am local machine time, check for >=22 hour server uptime and do not restart Staging servers (env || hostname) start the timer 10 minutes after the server is up and repeat every 5 minutes Separate rcon logic and serverinfo loop out of ConsoleInputBar and into separate class CommandManager. Swapped out usages in RunServer.cs. Finished up the CheckForServerRestart functionality. Confirmed the project still builds Was accidentally using DateTime.UtcNow instead of DateTime.Now Change the time check to prevent the extremely rare edgecase of the server attempting to restart twice Use the global cancellation token in the CommandManager, don't make a new one CommandManager takes CancellationToken, not source Rename CommandManager to more suitable ServerRcon rename vars, too Double time window to ensure we restart and store DateTimeOffset of when restart was last requested Attempt to restart multiple times if we failed due to an exception Log any errors Minor changes Merge pull request #6 from Facepunch/server_restarts Server restarts
4 Days Ago
Minor changes
5 Days Ago
Log any errors
5 Days Ago
Attempt to restart multiple times if we failed due to an exception
5 Days Ago
Double time window to ensure we restart and store DateTimeOffset of when restart was last requested
5 Days Ago
rename vars, too
5 Days Ago
Rename CommandManager to more suitable ServerRcon
6 Days Ago
Update: review feedback - dispose of the nested CTS for perf snapshot uploads - Use async copy when creating an extra stream to send backup files Tests: full local server flow + 2 snapshot uploads
6 Days Ago
Bugfix: avoid unlockign semaphore from the wrong thread If it would time out during the wait period, it would release the semaphore in finally, leading to break of unique ownership promise Clean: remove ITask inheritance from UploadPerfSnapshot It used to be a task at the start, but not anymore
9 Days Ago
CommandManager takes CancellationToken, not source
9 Days Ago
Was accidentally using DateTime.UtcNow instead of DateTime.Now Change the time check to prevent the extremely rare edgecase of the server attempting to restart twice Use the global cancellation token in the CommandManager, don't make a new one
9 Days Ago
Bugfix: use the right token for some async ops
9 Days Ago
Update: limit how much time upload routine can take - also add extra logging around processGuard semaphore Tests: tested the entire flow by triggering 5 snapshots
9 Days Ago
Bugfix: respect the cancellation token when fetching a response of request
9 Days Ago
New: support xml-style errors from API Allows to see more details about what's going wrong with the request(Azure SAS errors are xml) Tests: got the SAS error locally, saw the logs in ServerManager Bugfix: don't use a closed stream when retrying backup uploading If we fail the upload at the point of consuming the stream (so passed backupBegin), it will close the stream and fall over on Position call, making retries useless. Tests: when running own server it was erroring out on retries with stream closed exception - not anymore. Bugfix: Don't wait after last upload retry Tests: Saw the uploads fail, didn't see the log after last attempt. Update: renamed file back to BackupData I shouldn't have renamed it in the first place. Clean: removing obsolete property Tests: local run was able to upload files
11 Days Ago
Separate rcon logic and serverinfo loop out of ConsoleInputBar and into separate class CommandManager. Swapped out usages in RunServer.cs. Finished up the CheckForServerRestart functionality. Confirmed the project still builds
11 Days Ago
start the timer 10 minutes after the server is up and repeat every 5 minutes
11 Days Ago
WIP restart server at 4am local machine time, check for >=22 hour server uptime and do not restart Staging servers (env || hostname)
17 Days Ago
New: Find and upload perf snapshots - Uploads as one request, rather than a ping-pong chain - Once attempted the upload, deletes from the drive - Reacts to log messages I've yet to test it all, will do after done with Dashboard Update: Renaming BackupBeginResult -> DelegatedUploadBeginResult It's renamed on the dashboard, and will be used for 2 flows, so more fitting Update: reimplementing perf snapshot uploading to use delegation Merge: from main Update: review comments - Removed in-memory file caching and simplified code - Added a semaphore to prevent multiple concurrent uploads - Removed a flat delay when detected trigger phrase to upload a snapshot - Removed post-heartbeat attempt to find-and-upload snapshots Update: braking change mitigation - Fallback to old API json format if failing to process with new one. Update: further review feedback - Wrapped body of FindAndUpload in a try-finaly to ensure we always release a semaphore - Merged backwards compatibility support into existing DelegatedUploadBeginResult class Clean: file rename (since it no longer contains old class) Merge pull request #5 from Facepunch/PerfSnapshot Adding support for PerfSnapshot uploads to Dashboard
18 Days Ago
Update: further review feedback - Wrapped body of FindAndUpload in a try-finaly to ensure we always release a semaphore - Merged backwards compatibility support into existing DelegatedUploadBeginResult class Clean: file rename (since it no longer contains old class)
18 Days Ago
Update: review comments - Removed in-memory file caching and simplified code - Added a semaphore to prevent multiple concurrent uploads - Removed a flat delay when detected trigger phrase to upload a snapshot - Removed post-heartbeat attempt to find-and-upload snapshots Update: braking change mitigation - Fallback to old API json format if failing to process with new one.
25 Days Ago
Add a fork of CliWrap here that adds a way to access the Process instance to set affinity Automatically set server process affinity when running on a CPU with split 3D v-cache Increase timeout for running rcon commands from 10s to 30s Merge: from main
25 Days Ago
Update: Renaming BackupBeginResult -> DelegatedUploadBeginResult It's renamed on the dashboard, and will be used for 2 flows, so more fitting Update: reimplementing perf snapshot uploading to use delegation
26 Days Ago
Add a fork of CliWrap here that adds a way to access the Process instance to set affinity Automatically set server process affinity when running on a CPU with split 3D v-cache Increase timeout for running rcon commands from 10s to 30s
27 Days Ago
New: Find and upload perf snapshots - Uploads as one request, rather than a ping-pong chain - Once attempted the upload, deletes from the drive - Reacts to log messages I've yet to test it all, will do after done with Dashboard
8 Months Ago
▉▄▌▋▆▄▉ ▆▄▊▌▄▄ ▊▉▌
9 Months Ago
Check for and apply Harmony mod updates automatically while the server is running
10 Months Ago
Backup save file right after the server saves
10 Months Ago
Remove redundant cancellation token source in server manager Add some more guards to try and prevent exiting out when not actually cancelled Gracefully stop the Rust server when closing server manager with Ctrl+C
10 Months Ago
Add missing using
10 Months Ago
More logging to troubleshoot missing heartbeat issues
10 Months Ago
Workaround for issues on even older windows console hosts? Fix backspace with empty buffer exception Fix unknown commands not clearing the command input
10 Months Ago
Workaround status bar issues when running under the old windows console host
10 Months Ago
Refactor logging so it doesn't go through Console Add support for status bars at the bottom of the terminal Implement status bar to connect to the server's rcon to show performance info and allow running commands Set the -parent-pid command line argument when running the Rust server Update files before backing up server data so we don't double backup when there is a server manager update
10 Months Ago
Switch to using new backup endpoint
11 Months Ago
Update release.yml
11 Months Ago
SHA fix?
11 Months Ago
Github actions setup
11 Months Ago
Set proper API host
11 Months Ago
Fix exception in heartbeat worker when exiting with Ctrl+C
11 Months Ago
Detect server crashes and make sure it restarts
11 Months Ago
Proper timer to make sure logs are submitted after some time instead of waiting for a full batch
11 Months Ago
Make the heartbeat loop more reliable and auto-restart if it fails
11 Months Ago
▄▋▊▄▌▌ ▊▆█ ▆▌▋ ██▊▅▅▉▇▊ ▆▍▄▄▅
11 Months Ago
▍▊▌▅▄▇▌ ▆▍▋▍ ▊▋█▌ ▊█▄ ▆▅▋▍█ ▊▋▍▄█▊ ▄▉ ▅▍▄ ▍▌▉▍▄█▌ ▅▌▆▄▄▋▅ ▄▋ ▉▋▋▌ ▋▄▆▅█▄ ▇▇▊ ▌▆▋▊▊█
11 Months Ago
Fix steamcmd updating from backend when not needed
11 Months Ago
Compile fix for release builds
11 Months Ago
Add back file deletion as a part of updating
11 Months Ago
Fix steamcmd being redownloaded from backend Implement updater for server manager