MyNameIsTrez
ef6441ca46
Edit docs/developing-for-clusterio.md ( #285 )
...
Fix grammar, punctuation and spelling mistakes in
docs/developing-for-clusterio.md.
2020-04-17 15:46:35 +02:00
Hornwitser
534408856c
Merge pull request #284 from Hornwitser/small-things-2
...
Small things 2
2020-04-11 02:04:59 +02:00
Hornwitser
430aa6d207
Disable heap and memory size tests
...
Disable the tests for the memory and heap size metrics as the travis
environment is apparently using 3x as much memory as locally.
2020-04-09 20:44:06 +02:00
Hornwitser
00d1d304d2
Fix integration test certificate path
...
Fix integration tests using the default certificate paths instead of
having them located in the dedicated test database directory. Also
increment key size to the minimum allowed of 1024.
2020-04-09 20:35:51 +02:00
Hornwitser
38c392ff6d
Fix kill logic of integration test
...
Test if the process variable exists before trying to call kill on it, as
in certain failure situations it is not set.
2020-04-09 20:08:04 +02:00
Hornwitser
4f463a8180
Reduce number of bits in generated test cert
...
Add config entry for the number of bits to use in the auto generate TLS
certificate for the master server and reduce it to 512 for the
integration test. This reduces the time needed to generate the
certificate in the integration test.
2020-04-09 20:02:29 +02:00
Hornwitser
2c855a5846
Add debug-dump-ws command
...
Add debug command to dump the WebSocket messages being sent and received
by the master server to aid in finding chatty events.
2020-04-09 19:50:01 +02:00
Hornwitser
61d92a6910
Rename master plugin onExit hook to onShutdown
...
Rename the onExit hook for master plugins to onShutdown to better
reflect when it is invoked.
2020-04-09 19:50:01 +02:00
Hornwitser
9507608e59
Rework disconnect logic for connectors
...
Rework the way disconnection at shutdown is done to properly close
the connections when the master server is shut down.
2020-04-09 19:50:01 +02:00
Hornwitser
47ea8f5477
Rename connection shutdown to prepare disconnect
...
Rename the shutdownConnection request to prepareDisconnect to better
reflect its actual purpose.
2020-04-09 16:17:38 +02:00
Hornwitser
e7d1039942
Link to writings plugins document in docs
...
Replace notice about in development plugin interface with a link to the
writing plugins document in the developing for clusterio document.
2020-04-09 16:17:38 +02:00
Hornwitser
fc04fd9ebc
Remove master branch warning
...
Remove warning of master branch being broken now that it's no longer
completely broken.
2020-04-09 16:17:38 +02:00
Hornwitser
3dc4bdaab6
Remove debug log
...
Remove debug log statement annoing events have been broadcast.
2020-04-09 16:17:38 +02:00
Hornwitser
59111cc844
Disable replay in patched save
...
Ensure that the replay is disabled after the game is patched by calling
game.disable_replay(). It's not possible to replay a patched save, and
it also stores every command sent into save, causing it to quickly grow
into an unplayably large size.
2020-04-09 16:17:38 +02:00
Hornwitser
d537e5cf6b
Fix typo in default cpu metric
...
Fix proces_cpu_seconds_total being mislabled as process_cpu_seconds.
2020-04-09 16:17:38 +02:00
Hornwitser
47c221f6f3
Fix typo in test names
...
Fix the labels function being refered to as the label function in the
test descriptions.
2020-04-09 16:17:38 +02:00
Hornwitser
56488b2c2d
Add resident memory and heap size metrics
...
Implement the default resident memory and heap size metrics.
2020-04-09 16:17:38 +02:00
Hornwitser
e908c5069b
Add autosave tracking and statistics
...
Detect when autosaves are made and track the size in a Prometheus gague.
2020-04-09 16:17:38 +02:00
Hornwitser
139585f8c6
Prevent metrics being called on createSave
...
Gate the onMetrics plugin hook behind a boolean that's set only after
the Factorio server has fully started, and reset when it stops. This
prevents errors due to plugins trying to get metrics while the server
is creating a new save or stopped.
2020-04-09 16:17:38 +02:00
Hornwitser
6bc07ad1b3
Add Factorio CPU and Memory usage statistics
...
Add per instance metrics for CPU and memory usage with the pidusage
library.
2020-04-09 16:17:38 +02:00
Hornwitser
56ee1fe955
Rework save logic with regard to start instance
...
Ensure that notifyExit is called if errors occur during startInstance
and createSave request, and rework startInstance save logic to create
a new savegame if no save is present and allow specifying the save to
load.
2020-04-09 16:17:38 +02:00
Hornwitser
62e38199bd
Rework exit notification for Instances
...
Pull the exit handler into its own method that's invoked if the startup
fails before the Factorio server is created. Also move the metrics
clearing to the exit notification method to ensure it's also invoked.
2020-04-09 16:17:38 +02:00
Hornwitser
407e3d2aed
Merge pull request #283 from clusterio/TheAIBot-patch-1
...
Fix overflow check in subspace storage
2020-04-08 15:08:32 +02:00
TheAIBot
fcfad08260
fix overflow check in subspace storage
...
Previous and new value:
0x7ffffff -- old 134.217.727
0x7fffffff -- new 2.147.483.647
2020-04-08 14:59:53 +02:00
Hornwitser
112cad8a49
Merge pull request #282 from Hornwitser/small-things
...
Small things
2020-04-06 14:50:55 +02:00
Hornwitser
ccb07d6eab
Add support for Factorio 0.18.x
...
Add option to bump patch number and override factorio_version in the
generated mod and update the serialize library to support the inventory
bar access methods of both 0.17 and 0.18.
clusterio_lib-0.1.1
2020-04-06 14:41:51 +02:00
Hornwitser
621c834126
Merge pull request #281 from Hornwitser/reconnection-logic
...
Reconnection logic
2020-04-04 18:39:36 +02:00
Hornwitser
75cd6d38db
Fix instance exit notification
...
Fix improper notification on Factorio server exit causing plugins and
the instance tracking to fail.
clusterio_lib-0.1.0
2020-04-04 15:14:23 +02:00
Hornwitser
99ac8f4f33
Add commands sent statistic
...
Track RCON commands sent.
2020-04-04 12:18:26 +02:00
Hornwitser
75067e992d
Add WebSocket usage statistics
...
Add Prometheus metrics for messages sent, connections made, connections
rejected, active connections, and active slaves.
2020-04-04 12:16:57 +02:00
Hornwitser
31b66339a0
Remove Google Analytics
...
Remove hard coded Google Analytics integration in web interface.
2020-04-04 10:15:27 +02:00
Hornwitser
8ebf0fc754
Add master server Web Root config
...
Add web_root option to the master server and use it create URLs for
resources hosted by it. This permits hosting the master server web
interface behind reverse proxy under a dedicated path.
2020-04-04 10:05:37 +02:00
Hornwitser
5e9d9097e1
Link mods when creating save
...
Ensure the mods are linked in when creating a new save.
2020-04-03 22:32:12 +02:00
Hornwitser
3343d53d75
Allow deleting unassigned instances
...
Handle delete instance requests for instances that are not assigned to a
slave.
2020-04-03 22:22:23 +02:00
Hornwitser
541d2ad337
Add missing changlog entry for 737c9924
...
Add entry to changelog noting that the clusterioMod plugin has been
renamed to subspace_storage.
2020-04-03 21:15:57 +02:00
Hornwitser
59758f1576
Rename plugin Prometheus metrics
...
Rename Prometheus metrics exported by plugins to follow the
clusterio_<plugin_name>_<metric_name> naming scheme.
2020-04-03 21:14:30 +02:00
Hornwitser
706ffd9ed2
Detail usage of single and double quoted strings
...
Add section to contributing guidelines detailing that single quoted
strings should not be used. The use of it has only resulted in the
addition of more inconsistency to the codebase.
2020-04-03 20:51:28 +02:00
Hornwitser
17973e767e
Generate API docs with JSDoc
...
Add npm docs script to generate api docs with JSDoc.
2020-04-03 20:51:28 +02:00
Hornwitser
5c16809b5b
JSDoc use autodetected module name
...
Change @module <module name> entries to just @module as JSDoc is able to
automatically determine the module name.
2020-04-03 20:51:28 +02:00
Hornwitser
ee063300ed
Check result of rcon commands in subspace_storage
...
Validate that the commands sent don't error out by checking the returned
result is empty.
2020-04-03 20:51:28 +02:00
Hornwitser
3cc84d6400
Use basicType helper in lib/database
...
Simplify the checking logic in lib/database by using the basicType
helper.
2020-04-03 20:51:28 +02:00
Hornwitser
65494a0a91
Move basicType to lib/helpers
...
Move the basicType function from the config lib to a shared helpers lib.
2020-04-03 20:51:28 +02:00
Hornwitser
f05100c94d
Remove unused files
...
Remove left over files that are no longer in use.
2020-04-03 20:51:28 +02:00
Hornwitser
9a4a535add
Expose Slave to instance plugins
...
Allow the slave object to be accessed by instance plugins through the
this.slave property.
2020-04-03 20:51:28 +02:00
Hornwitser
3ff5e630ca
Warn on unhandled Factorio ipc
...
Send warning to console if an ipc message is received but there were no
handlers registered to handle it.
2020-04-03 20:51:28 +02:00
Hornwitser
c2df80a17f
Move test/json to test/file/json
...
Move the json test files for the lib/database tests to test/file/json to
be consistent with the location of test files for other tests.
2020-04-03 20:51:28 +02:00
Hornwitser
f9f0e5b5f7
Move test/temp to temp/test
...
Move the temporary files generated by the the tests to the top level
directory temp.
2020-04-03 20:51:28 +02:00
Hornwitser
028f00e58a
Rename client.js to slave.js
...
Rename the client.js script to slave.js, and changed places where it's
refered to as client into slave.
2020-04-03 20:51:28 +02:00
Hornwitser
ae86781b0d
Add support for multiple Factorio installs
...
Allow the factorio_directory specified in the slave config to contain
multiple Factorio installs and add factior.version instance option to
select which install to use for the given instance.
2020-04-03 20:51:28 +02:00
Hornwitser
4c26fcee3a
Fix connection shutdown logic
...
Fix the WebSocket link not being properly teared down on the master
side causing the handshake to deadlock when the slave tried to connect
again.
2020-04-03 20:44:20 +02:00