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

Fix error in log stream when server is idle #565

Merged
merged 1 commit into from
May 28, 2024

Conversation

ExcuseMi
Copy link
Contributor

Fixes TypeError: cannot unpack non-iterable NoneType object when server has be idle in the log stream.
The scenario occurs when last_seen is None and the tail returns None

image

Fixes
TypeError: cannot unpack non-iterable NoneType object when server has be idle in the log stream.
The scenario occurs when last_seen is None and the tail returns None
logs: list[tuple[StreamID, StructuredLogLineWithMetaData]] = []
tail_log: tuple[StreamID, StructuredLogLineWithMetaData] = self.log_stream.tail()
if tail_log:
logs.append(tail_log)
else:
logs: list[tuple[StreamID, StructuredLogLineWithMetaData]] = (
self.log_stream.read(last_id=last_seen, block_ms=block_ms)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can log_stream.read also return None?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def read(

It returns a list or a StreamNoElements exception (which is handled). Doesn't have the same problem as tail and head as these just want to return a tuple instead of list.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. I didn't dig any deeper... just wondered. My C++ sensibilities are still bothered by the two logs variable "declarations" at a scope deeper than the usage. Oh python...

@cemathey cemathey merged commit 3f59440 into MarechJ:master May 28, 2024
timraay added a commit that referenced this pull request May 31, 2024
commit 3b66c4e
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 29 15:40:11 2024 -0600

    Return a dict for get_slots

commit d436388
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 29 14:02:45 2024 -0600

    Add comments, typing

commit bd9c59e
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 29 13:46:00 2024 -0600

    Rework Faction for easier consumption of API data

commit e431408
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 29 12:15:51 2024 -0600

    Rename and correct typing

commit 9c13d42
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 14:43:32 2024 -0600

    Fix typo

commit ab2e1a0
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 13:41:20 2024 -0600

    Don't include `self` in API documentation

commit c0500b7
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 13:41:09 2024 -0600

    Remove unused file

commit 6839794
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 12:48:28 2024 -0600

    Rename do_reconnect_gameserver to reconnect_gameserver

commit dfe1f95
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 12:31:58 2024 -0600

    Install dependencies in one go

commit baab261
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 12:12:16 2024 -0600

    Update compose file for running the backend/frontend dev servers

commit f971d86
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 12:11:43 2024 -0600

    Reduce disk utilization

commit a5e6cac
Merge: 2f5d6da edac694
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 11:49:56 2024 -0600

    Merge branch 'master' into feat/autosettings_all_rcon_methods

commit edac694
Author: ElGuillermo <66552553+ElGuillermo@users.noreply.github.com>
Date:   Tue May 28 19:34:43 2024 +0200

    Update README.md (#566)

commit 9680848
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 28 11:34:09 2024 -0600

    Bump sqlalchemy from 2.0.29 to 2.0.30 (#570)

    Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 2.0.29 to 2.0.30.
    - [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
    - [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES.rst)
    - [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

    ---
    updated-dependencies:
    - dependency-name: sqlalchemy
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 3f59440
Author: ExcuseMi <ExcuseMi@users.noreply.github.com>
Date:   Tue May 28 19:33:11 2024 +0200

    Fix error in log stream when server is idle (#565)

    Fixes
    TypeError: cannot unpack non-iterable NoneType object when server has be idle in the log stream.
    The scenario occurs when last_seen is None and the tail returns None

commit 21abeb6
Author: Florian <florian.schmidt.welzow@t-online.de>
Date:   Tue May 28 19:32:26 2024 +0200

    Salvage stats when player reconnects (#568)

    Previously, when a player disconnects and then reconnects to the server
    the stats gained in the previous session where lost. The CRCON would
    always only save the 'higher' stats value to compensate this a bit, which
    was far from perfect.
    With this commit, the CRCON will try to salvage the previously gained stats
    and combine them after the round ended.

commit 33efff1
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 28 11:30:37 2024 -0600

    Bump rq from 1.16.1 to 1.16.2 (#569)

    Bumps [rq](https://github.com/rq/rq) from 1.16.1 to 1.16.2.
    - [Release notes](https://github.com/rq/rq/releases)
    - [Changelog](https://github.com/rq/rq/blob/master/CHANGES.md)
    - [Commits](rq/rq@v1.16.1...v1.16.2)

    ---
    updated-dependencies:
    - dependency-name: rq
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 094c479
Author: C. Eric Mathey <48801688+cemathey@users.noreply.github.com>
Date:   Tue May 28 11:29:08 2024 -0600

    Include player ID when kicking, can't retrieve it from the game server post kick (#573)

commit 3c7f255
Author: Florian <florian.schmidt.welzow@t-online.de>
Date:   Tue May 28 19:28:26 2024 +0200

    align max players of automod to documentation (#575)

    The documentation mentions max players in seeding automod to be
    exclusive, but the code handled it inclusive. This commit aligns the
    code to the documentation again.

commit 5373159
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 28 11:28:00 2024 -0600

    Bump pytest from 8.1.1 to 8.2.1 (#577)

    Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.1.1 to 8.2.1.
    - [Release notes](https://github.com/pytest-dev/pytest/releases)
    - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
    - [Commits](pytest-dev/pytest@8.1.1...8.2.1)

    ---
    updated-dependencies:
    - dependency-name: pytest
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 468607e
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 28 11:27:23 2024 -0600

    Bump requests from 2.31.0 to 2.32.2 (#579)

    Bumps [requests](https://github.com/psf/requests) from 2.31.0 to 2.32.2.
    - [Release notes](https://github.com/psf/requests/releases)
    - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
    - [Commits](psf/requests@v2.31.0...v2.32.2)

    ---
    updated-dependencies:
    - dependency-name: requests
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 2f5d6da
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 10:25:46 2024 -0600

    Support errors_as_json for InvalidKeysConfigurationError

commit 93ae6e6
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 10:15:14 2024 -0600

    Remove upload_vips and rename async_upload_vips

commit 40eb693
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 09:53:02 2024 -0600

    Fix arguments for unwatch_player

commit cf0c5ad
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 09:38:57 2024 -0600

    Return unban_profanities and result as a bool and not str

commit edd4090
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 09:24:48 2024 -0600

    Return temp_ban and result as a bool and not str and add type hints

commit 847decc
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 15:32:49 2024 -0600

    Return switch_player_now and  switch_player_on_death result as a bool and not str

commit d1103b5
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 14:59:23 2024 -0600

    Refactor set_welcome_message

commit 6815ee6
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 14:36:12 2024 -0600

    Accept set_votekick_thresholds threshold_pairs as a list of tuples

commit 6af7899
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 14:35:08 2024 -0600

    Return set_votekick_enabled result as a bool and not str

commit 4f8185a
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 14:06:14 2024 -0600

    Return set_vip_slots_num result as a bool and not str and change parameter name

commit 0621d6f
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 13:59:34 2024 -0600

    Return set_team_switch_cooldown result as a bool and not str

commit 08f76c1
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 13:19:40 2024 -0600

    Accept either lists of strings or dicts for StandardBroadcastMessages

commit 9de1b87
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 11:37:21 2024 -0600

    Return set_queue_length result as a bool and not str and change parameter name

commit 1c32221
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 11:27:55 2024 -0600

    Remove set_name it was already moved to RconAPI as set_server_name

commit 8f42a99
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 11:15:12 2024 -0600

    Return set_max_ping_autokick result as a bool and not str

commit 0a6d9b0
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 11:11:10 2024 -0600

    Rename set_map_votemap_whitelist to set_votemap_whitelist and standardize parameter name

commit ae4c268
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 10:20:28 2024 -0600

    Move user config error conversion (str or JSON) to the API exposure level

commit 9ab90ac
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 16:31:13 2024 -0600

    Return set_idle_autokick_time result as a bool and not str

commit 71eb083
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 16:00:24 2024 -0600

    Refactor set_broadcast

commit 82adedc
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 15:04:19 2024 -0600

    Return set_autobalance_threshold result as a bool and not str

commit d88d903
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 14:54:13 2024 -0600

    Rename bool_ parameter to value

commit ef19f73
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 14:26:54 2024 -0600

    Return set_autobalance_enabled result as a bool and not str

commit c2ab2c5
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 13:31:33 2024 -0600

    Bandaid AutoBroadcastUserConfig (accept both UI format as one string and the JSON format)

commit 2728724
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 13:13:49 2024 -0600

    Rename server_list endpoint get_server_list

commit f099fe2
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 12:20:08 2024 -0600

    Return reset_votekick_thresholds result as a bool and not str

commit 074a824
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 12:06:47 2024 -0600

    Return remove_vip result as a bool and not str

commit 897b0a8
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 11:57:47 2024 -0600

    Return results as boolean, accept player ID for perma ban and fix remove temp/perma ban due to receiving parsed banlogs not raw banlogs

commit e8d457f
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 10:21:43 2024 -0600

    Return remove_all_vips result as a bool and not str

commit 2086c60
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 10:19:58 2024 -0600

    Return command result for remove_map_from_rotation

commit 772f077
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 09:54:43 2024 -0600

    Fix player count in browser page title

commit b3b707c
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 09:48:29 2024 -0600

    Fix player slots (current, max) usage

commit d1efa04
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 09:47:46 2024 -0600

    Return punish result as a bool and not str

commit aa75c92
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Apr 29 10:19:17 2024 -0600

    Bump black from 24.4.0 to 24.4.2 (#562)

    Bumps [black](https://github.com/psf/black) from 24.4.0 to 24.4.2.
    - [Release notes](https://github.com/psf/black/releases)
    - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
    - [Commits](psf/black@24.4.0...24.4.2)

    ---
    updated-dependencies:
    - dependency-name: black
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 36f9ac2
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Apr 29 10:14:14 2024 -0600

    Bump pydantic from 2.7.0 to 2.7.1 (#563)

    Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.7.0 to 2.7.1.
    - [Release notes](https://github.com/pydantic/pydantic/releases)
    - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
    - [Commits](pydantic/pydantic@v2.7.0...v2.7.1)

    ---
    updated-dependencies:
    - dependency-name: pydantic
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 4d37232
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Apr 29 10:11:16 2024 -0600

    Bump redis from 5.0.3 to 5.0.4 (#564)

    Bumps [redis](https://github.com/redis/redis-py) from 5.0.3 to 5.0.4.
    - [Release notes](https://github.com/redis/redis-py/releases)
    - [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
    - [Commits](redis/redis-py@v5.0.3...v5.0.4)

    ---
    updated-dependencies:
    - dependency-name: redis
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 2af20bf
Author: C. Eric Mathey <48801688+cemathey@users.noreply.github.com>
Date:   Fri Apr 26 11:59:07 2024 -0600

    Update map picture lookup (#560)

commit b21fbb8
Author: ElGuillermo <66552553+ElGuillermo@users.noreply.github.com>
Date:   Fri Apr 26 19:58:55 2024 +0200

    Update seeding_rules.py (#559)

    adding new skirmish maps

    Signed-off-by: ElGuillermo <66552553+ElGuillermo@users.noreply.github.com>
cemathey added a commit that referenced this pull request Aug 21, 2024
* Rename map pictures based on environment, Layers can report their map name

* Use custom JSON response to automatically serialize pydantic objects

* Make discord auditing more consistent with formatting, include command name

* Remove redundant model dumps

* Don't use player name as author message for camera notifications

* Refactor Layer for clarity and include properties

* Add type hint for Layer model dumps

* Return Layers from get_gamestate

* Return Layers from public_info

* Allow pickling

* Return Layers from get_map

* Remove unused map image lookup

* Add type hints

* Return Layers instead of map names, accept map IDs for API calls

* Return Layers for votemap stuff

* Fix match recording, _RESTART no longer part of map names

* Display images/names properly

* Remove get_players_fast, merge with get_players

* Convert layers to map IDs as strings for auto settings

* Return add_admin result as a bool

* Return null errors unless overridden

* Return game server result message for add_map_to_rotation

* Record command name in logs

* Include bans + player comments in player profile

* Return player IDs and not steam IDs for online/ingame mods

* Add new DB models

* Blacklist WIP 1

* Rename fields for clarity (steam_id_64 -> player_id) etc.

* Convert remove_admin to return boolean status

* Rename add_map_to_whitelist for consistency

* Rename votemap endpoints for clarity

* Return the result of each specific map addition for add_maps_to_rotation

* Accept null expiration dates for add_vip

* Convert add_vip to return boolean status

* Convert ban_profanities to return boolean status

* Update doc string

* Fix VIP uploads

* Add logger

* Remove deprecated date_scoreboard endpoint

* Use the actual name and not the function name for API doc generation

* Allow POST for logout

* Return a text response when an improper request is received

* Update documentation

* Fix key names

* Move get_date_scoreboard to API class

* Fix key names

* Fix get_log_stream_config allowed HTTP methods

* Return a mutable dict for GET methods

* Fix parameters + document get_logs

* Ensure get_next_map always returns game server result + invalidate caches properly

* Remove get_online_console_admins it's a duplicate of get_online_mods

* Fix typing

* Return structured bans for get_perma_bans and get_temp_bans

* Remove unused class, fix profile view

* Fix get_bans

* Move get_player_comments to RconAPI

* Fix player actions

* Move get_player_messages to RconAPI

* Implement all standard blacklist behavior

* Handle list parameters properly for GET requests

* Serialize timedeltas as total_seconds, raise error when unknown type encountered

* Return time remaining as number of seconds

* Update comments

* Remove get_server_stats the data for it is not currently recorded

* Remove get_server_stats the data for it is not currently recorded

* Allow non string dict keys when serializing to JSON

* Return get_vip_slots_num as an int

* Return votekick threshhold as a list of tuple pairs

* Rename votekick threshold endpoints for clarity

* Remove old blacklist stuff

* Add TODO

* Return kick result as a bool and not str

* Rename live_scoreboard endpoint to get_live_scoreboard

* Return perma ban result as a bool and not str

* Move post_player_comment to RconAPI

* Fix invalid import

* Return player slots (current, max) as a tuple

* Rename public_info endpoint get_public_info and refactor output

* Forgot to save

* Return punish result as a bool and not str

* Fix player slots (current, max) usage

* Fix player count in browser page title

* Return command result for remove_map_from_rotation

* Return remove_all_vips result as a bool and not str

* Merge with new model changes

* Return results as boolean, accept player ID for perma ban and fix remove temp/perma ban due to receiving parsed banlogs not raw banlogs

* Return remove_vip result as a bool and not str

* Return reset_votekick_thresholds result as a bool and not str

* Rename server_list endpoint get_server_list

* Bandaid AutoBroadcastUserConfig (accept both UI format as one string and the JSON format)

* Return set_autobalance_enabled result as a bool and not str

* Rename bool_ parameter to value

* Return set_autobalance_threshold result as a bool and not str

* Refactor set_broadcast

* Return set_idle_autokick_time result as a bool and not str

* Move user config error conversion (str or JSON) to the API exposure level

* Rename set_map_votemap_whitelist to set_votemap_whitelist and standardize parameter name

* Return set_max_ping_autokick result as a bool and not str

* Remove set_name it was already moved to RconAPI as set_server_name

* Return set_queue_length result as a bool and not str and change parameter name

* Accept either lists of strings or dicts for StandardBroadcastMessages

* Return set_team_switch_cooldown result as a bool and not str

* Return set_vip_slots_num result as a bool and not str and change parameter name

* Return set_votekick_enabled result as a bool and not str

* Accept set_votekick_thresholds threshold_pairs as a list of tuples

* Refactor set_welcome_message

* Return switch_player_now and  switch_player_on_death result as a bool and not str

* Return temp_ban and result as a bool and not str and add type hints

* Return unban_profanities and result as a bool and not str

* Fix arguments for unwatch_player

* Remove upload_vips and rename async_upload_vips

* Support errors_as_json for InvalidKeysConfigurationError

* Reduce disk utilization

* Update compose file for running the backend/frontend dev servers

* Install dependencies in one go

* Rename do_reconnect_gameserver to reconnect_gameserver

* Remove unused file

* Don't include `self` in API documentation

* Fix typo

* Rename and correct typing

* Rework Faction for easier consumption of API data

* Add comments, typing

* Return a dict for get_slots

* Add missing docstring

* Clean up imports

* Create .gitattributes

* Squashed commit of the following:

commit 3b66c4e
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 29 15:40:11 2024 -0600

    Return a dict for get_slots

commit d436388
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 29 14:02:45 2024 -0600

    Add comments, typing

commit bd9c59e
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 29 13:46:00 2024 -0600

    Rework Faction for easier consumption of API data

commit e431408
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 29 12:15:51 2024 -0600

    Rename and correct typing

commit 9c13d42
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 14:43:32 2024 -0600

    Fix typo

commit ab2e1a0
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 13:41:20 2024 -0600

    Don't include `self` in API documentation

commit c0500b7
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 13:41:09 2024 -0600

    Remove unused file

commit 6839794
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 12:48:28 2024 -0600

    Rename do_reconnect_gameserver to reconnect_gameserver

commit dfe1f95
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 12:31:58 2024 -0600

    Install dependencies in one go

commit baab261
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 12:12:16 2024 -0600

    Update compose file for running the backend/frontend dev servers

commit f971d86
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 12:11:43 2024 -0600

    Reduce disk utilization

commit a5e6cac
Merge: 2f5d6da edac694
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 11:49:56 2024 -0600

    Merge branch 'master' into feat/autosettings_all_rcon_methods

commit edac694
Author: ElGuillermo <66552553+ElGuillermo@users.noreply.github.com>
Date:   Tue May 28 19:34:43 2024 +0200

    Update README.md (#566)

commit 9680848
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 28 11:34:09 2024 -0600

    Bump sqlalchemy from 2.0.29 to 2.0.30 (#570)

    Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 2.0.29 to 2.0.30.
    - [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
    - [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/main/CHANGES.rst)
    - [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

    ---
    updated-dependencies:
    - dependency-name: sqlalchemy
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 3f59440
Author: ExcuseMi <ExcuseMi@users.noreply.github.com>
Date:   Tue May 28 19:33:11 2024 +0200

    Fix error in log stream when server is idle (#565)

    Fixes
    TypeError: cannot unpack non-iterable NoneType object when server has be idle in the log stream.
    The scenario occurs when last_seen is None and the tail returns None

commit 21abeb6
Author: Florian <florian.schmidt.welzow@t-online.de>
Date:   Tue May 28 19:32:26 2024 +0200

    Salvage stats when player reconnects (#568)

    Previously, when a player disconnects and then reconnects to the server
    the stats gained in the previous session where lost. The CRCON would
    always only save the 'higher' stats value to compensate this a bit, which
    was far from perfect.
    With this commit, the CRCON will try to salvage the previously gained stats
    and combine them after the round ended.

commit 33efff1
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 28 11:30:37 2024 -0600

    Bump rq from 1.16.1 to 1.16.2 (#569)

    Bumps [rq](https://github.com/rq/rq) from 1.16.1 to 1.16.2.
    - [Release notes](https://github.com/rq/rq/releases)
    - [Changelog](https://github.com/rq/rq/blob/master/CHANGES.md)
    - [Commits](rq/rq@v1.16.1...v1.16.2)

    ---
    updated-dependencies:
    - dependency-name: rq
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 094c479
Author: C. Eric Mathey <48801688+cemathey@users.noreply.github.com>
Date:   Tue May 28 11:29:08 2024 -0600

    Include player ID when kicking, can't retrieve it from the game server post kick (#573)

commit 3c7f255
Author: Florian <florian.schmidt.welzow@t-online.de>
Date:   Tue May 28 19:28:26 2024 +0200

    align max players of automod to documentation (#575)

    The documentation mentions max players in seeding automod to be
    exclusive, but the code handled it inclusive. This commit aligns the
    code to the documentation again.

commit 5373159
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 28 11:28:00 2024 -0600

    Bump pytest from 8.1.1 to 8.2.1 (#577)

    Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.1.1 to 8.2.1.
    - [Release notes](https://github.com/pytest-dev/pytest/releases)
    - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
    - [Commits](pytest-dev/pytest@8.1.1...8.2.1)

    ---
    updated-dependencies:
    - dependency-name: pytest
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 468607e
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue May 28 11:27:23 2024 -0600

    Bump requests from 2.31.0 to 2.32.2 (#579)

    Bumps [requests](https://github.com/psf/requests) from 2.31.0 to 2.32.2.
    - [Release notes](https://github.com/psf/requests/releases)
    - [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
    - [Commits](psf/requests@v2.31.0...v2.32.2)

    ---
    updated-dependencies:
    - dependency-name: requests
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 2f5d6da
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 10:25:46 2024 -0600

    Support errors_as_json for InvalidKeysConfigurationError

commit 93ae6e6
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 10:15:14 2024 -0600

    Remove upload_vips and rename async_upload_vips

commit 40eb693
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 09:53:02 2024 -0600

    Fix arguments for unwatch_player

commit cf0c5ad
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 09:38:57 2024 -0600

    Return unban_profanities and result as a bool and not str

commit edd4090
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 28 09:24:48 2024 -0600

    Return temp_ban and result as a bool and not str and add type hints

commit 847decc
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 15:32:49 2024 -0600

    Return switch_player_now and  switch_player_on_death result as a bool and not str

commit d1103b5
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 14:59:23 2024 -0600

    Refactor set_welcome_message

commit 6815ee6
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 14:36:12 2024 -0600

    Accept set_votekick_thresholds threshold_pairs as a list of tuples

commit 6af7899
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 14:35:08 2024 -0600

    Return set_votekick_enabled result as a bool and not str

commit 4f8185a
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 14:06:14 2024 -0600

    Return set_vip_slots_num result as a bool and not str and change parameter name

commit 0621d6f
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 13:59:34 2024 -0600

    Return set_team_switch_cooldown result as a bool and not str

commit 08f76c1
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 13:19:40 2024 -0600

    Accept either lists of strings or dicts for StandardBroadcastMessages

commit 9de1b87
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 11:37:21 2024 -0600

    Return set_queue_length result as a bool and not str and change parameter name

commit 1c32221
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 11:27:55 2024 -0600

    Remove set_name it was already moved to RconAPI as set_server_name

commit 8f42a99
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 11:15:12 2024 -0600

    Return set_max_ping_autokick result as a bool and not str

commit 0a6d9b0
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 11:11:10 2024 -0600

    Rename set_map_votemap_whitelist to set_votemap_whitelist and standardize parameter name

commit ae4c268
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Wed May 22 10:20:28 2024 -0600

    Move user config error conversion (str or JSON) to the API exposure level

commit 9ab90ac
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 16:31:13 2024 -0600

    Return set_idle_autokick_time result as a bool and not str

commit 71eb083
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 16:00:24 2024 -0600

    Refactor set_broadcast

commit 82adedc
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 15:04:19 2024 -0600

    Return set_autobalance_threshold result as a bool and not str

commit d88d903
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 14:54:13 2024 -0600

    Rename bool_ parameter to value

commit ef19f73
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 14:26:54 2024 -0600

    Return set_autobalance_enabled result as a bool and not str

commit c2ab2c5
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 13:31:33 2024 -0600

    Bandaid AutoBroadcastUserConfig (accept both UI format as one string and the JSON format)

commit 2728724
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 13:13:49 2024 -0600

    Rename server_list endpoint get_server_list

commit f099fe2
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 12:20:08 2024 -0600

    Return reset_votekick_thresholds result as a bool and not str

commit 074a824
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 12:06:47 2024 -0600

    Return remove_vip result as a bool and not str

commit 897b0a8
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 11:57:47 2024 -0600

    Return results as boolean, accept player ID for perma ban and fix remove temp/perma ban due to receiving parsed banlogs not raw banlogs

commit e8d457f
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 10:21:43 2024 -0600

    Return remove_all_vips result as a bool and not str

commit 2086c60
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 10:19:58 2024 -0600

    Return command result for remove_map_from_rotation

commit 772f077
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 09:54:43 2024 -0600

    Fix player count in browser page title

commit b3b707c
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 09:48:29 2024 -0600

    Fix player slots (current, max) usage

commit d1efa04
Author: C. Eric Mathey <emathey@protonmail.com>
Date:   Tue May 21 09:47:46 2024 -0600

    Return punish result as a bool and not str

commit aa75c92
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Apr 29 10:19:17 2024 -0600

    Bump black from 24.4.0 to 24.4.2 (#562)

    Bumps [black](https://github.com/psf/black) from 24.4.0 to 24.4.2.
    - [Release notes](https://github.com/psf/black/releases)
    - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
    - [Commits](psf/black@24.4.0...24.4.2)

    ---
    updated-dependencies:
    - dependency-name: black
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 36f9ac2
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Apr 29 10:14:14 2024 -0600

    Bump pydantic from 2.7.0 to 2.7.1 (#563)

    Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.7.0 to 2.7.1.
    - [Release notes](https://github.com/pydantic/pydantic/releases)
    - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
    - [Commits](pydantic/pydantic@v2.7.0...v2.7.1)

    ---
    updated-dependencies:
    - dependency-name: pydantic
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 4d37232
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Apr 29 10:11:16 2024 -0600

    Bump redis from 5.0.3 to 5.0.4 (#564)

    Bumps [redis](https://github.com/redis/redis-py) from 5.0.3 to 5.0.4.
    - [Release notes](https://github.com/redis/redis-py/releases)
    - [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
    - [Commits](redis/redis-py@v5.0.3...v5.0.4)

    ---
    updated-dependencies:
    - dependency-name: redis
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit 2af20bf
Author: C. Eric Mathey <48801688+cemathey@users.noreply.github.com>
Date:   Fri Apr 26 11:59:07 2024 -0600

    Update map picture lookup (#560)

commit b21fbb8
Author: ElGuillermo <66552553+ElGuillermo@users.noreply.github.com>
Date:   Fri Apr 26 19:58:55 2024 +0200

    Update seeding_rules.py (#559)

    adding new skirmish maps

    Signed-off-by: ElGuillermo <66552553+ElGuillermo@users.noreply.github.com>

* Add type hints

* Cast session number, will be a str when called through the API

* Add strtobool utility

* Cast type

* Cast types for get_players_by_appearance

* Cast types for get_recent_logs

* Make strtobool usage consistent

* Add typing

* Make strtobool accept None values

* Add typing

* Cast types for get_historical_logs_records

* Add typing

* Fix strtobool failing when passed an actual bool

* Add missing permissions

* Undo database migration for renaming steam IDs

* Fix model creation due to field renaming

* Finish blacklist functionality

* Add blacklist interface

* (fix) "Remove VIP" button uses wrong hook

* Allow VAC hook to add to blacklist

* Update pre-commit black version

* Don't silently swallow SQL exceptions

* Split the difference and use new style names declaratively and old style names in postgres

* Display server name correctly due to API change

* Simplify get_votemap_status results

* Fix unsafe message formatting

* Change dialog title when editing record

* Fix PlayerView not using new blacklist system

* Log which rule conditions were not met for and clarify log messages

* Fix broken data migration

* Fix bunker template copying

* Create migration for blacklist permissions

* Fix typo in permission name

* Implement Barricade websocket protocol

* Add U15.1 layers and images

* Pin numpy to allow image builds

* Remove unused file/permissions

* Pin numpy

* Fix migration due to previous migration being reverted

* Fix foreign key name due to previous db revision being discarded

* WIP Command implementations

* Correct merged maps

* Remove deprecated blacklist option from settings page

* Include frontend build data for local builds

* Remove build data for supervisor/backend containers which use the maintenance image to avoid building untagged/unused images for local builds

* Accommodate possible nulls for `reason` and `by` when migrating records

* Use correct model field name

* Correct broadcast map name

* Update method name

* Slots is a dict and not a tuple now

* Correct parameter name

* Only convert current blacklists

* Correct parameter name

* Correct parameter name

* Correct parameter name

* Fix adding VIP from the settings page

* Correct parameter name

* Correctly compare new/old rotations to enable/disable save button

* Load old style standard broadcast messages correctly

* Use get_next_map for `next_map` message to force population

* Pass through the output parameter for CSV downloads

* Add typing

* Add CSV option back in for get_historical_logs

* Use the correct required HTTP method

* Remove default rules for autosettings so it can be enabled by default

* Fix setting user configs by auto settings

* Log when auto settings contains a command name that is not valid

* Game server temp/perma ban removal now accepts player IDs and ban logs are deprecated

* Fix date display and correct player 1 field name

* Fix scorebot due to v10 API changes

* Set map image URL correctly

* Fix missing newline in player reports

* Update documentation for removed parameters

* Show vote map selection properly

* Don't forward temp bans

* Update tooltip

* Remove duplicate styling

* Correct paramter names

* Fix faction lookup when parsing unknown maps

* Add migration to remove unused permissions

* Fix typo: Change "commmand" to "command (#621)

* Fix typo: Change "commmand" to "command

* Filter before adding logs

* Correct sync method parameter name for edit_blacklist

* Fix map rotation faction labels

* FIX - new kick() function player_name parameter wasn't updated in auto_kick.py (#613)

FIX - new kick() function player_name parameter wasn't updated in auto_kick.py

Signed-off-by: ElGuillermo <66552553+ElGuillermo@users.noreply.github.com>

* Add typing and delete unused imports

* Correct get_own_user_permissions not showing permissions from groups, include groups in output

* UI: Blacklist dialog for GameView and PlayerView (#623)

* UI: Blacklist dialog for GameView and PlayerView
* UI: Blacklist Dialog server input warning text

* Record blacklist authors properly

* Fix broken scoreboard name

* Expand Barricade protocol

* Fix circular import

* Fixes to barricade WS server

* Index was never deleted, remove so alembic downgrade can process

* Drop the blacklistsyncmethod Postgres ENUM when downgrading

* Barricade integration (#629)

* Implement Barricade websocket protocol

Signed-off-by: Tim Raaymakers <43066279+timraay@users.noreply.github.com>

* Fix missing describe_log_stream_config endpoint

* UI: VIP Dialog design & better management (#627)

* UI: VIP Dialog for LiveView
* feat: vip dialog ui/ux improvements

---------

Co-authored-by: Jonathan Müller <52619285+LordofAgents@users.noreply.github.com>

* Handle null VIP expiration

* Remove extra code from merge conflict fix

* Remove temp/perma ban from live view; add perma to history player grid

* Fix get_status showing unknown for the current map until the first get_gamestate call is performed

* Skip selection if only one blacklist exists

* Log auto settings changes to Discord

* Add 15.2 maps

* Update auto_settings.py (#631)

`rcon.current_map` wasn't available as `get_gamestate`, which gives the values, never was called.

(WTH) Abu got it right : https://discord.com/channels/685692524442026020/1273640810176315442/1275419238940672051

Signed-off-by: ElGuillermo <66552553+ElGuillermo@users.noreply.github.com>

* Wip   automods harmonization (#633)

Standardize parameters between auto mods.

* Format all python code with black

---------

Signed-off-by: ElGuillermo <66552553+ElGuillermo@users.noreply.github.com>
Signed-off-by: Tim Raaymakers <43066279+timraay@users.noreply.github.com>
Signed-off-by: C. Eric Mathey <48801688+cemathey@users.noreply.github.com>
Co-authored-by: Tim Raaymakers <43066279+timraay@users.noreply.github.com>
Co-authored-by: Jonathan Müller <52619285+LordofAgents@users.noreply.github.com>
Co-authored-by: ElGuillermo <66552553+ElGuillermo@users.noreply.github.com>
Co-authored-by: David Rosendorf <rosendorf.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants