From d49264aafcbed31d456a781d05fe23d68a462d21 Mon Sep 17 00:00:00 2001 From: Luke Policinski Date: Tue, 14 Jul 2026 12:05:25 -0400 Subject: [PATCH] feature: cpu warnings --- generated/schema.graphql | 22 ++++++++++- generated/schema.ts | 32 +++++++++------- generated/types.ts | 38 +++++++++++++++++++ .../tables/public_game_server_nodes.yaml | 1 + .../down.sql | 2 + .../up.sql | 2 + .../game-server-node.controller.ts | 2 + .../game-server-node.service.ts | 6 ++- 8 files changed, 90 insertions(+), 15 deletions(-) create mode 100644 hasura/migrations/default/1871000000100_game_server_node_cpu_warnings/down.sql create mode 100644 hasura/migrations/default/1871000000100_game_server_node_cpu_warnings/up.sql diff --git a/generated/schema.graphql b/generated/schema.graphql index a3ecbd86..91b02942 100644 --- a/generated/schema.graphql +++ b/generated/schema.graphql @@ -15108,7 +15108,7 @@ type events { """filter the rows returned""" where: event_players_bool_exp ): event_players_aggregate! - starts_at: timestamptz + starts_at: timestamptz! """An array relationship""" teams( @@ -15822,6 +15822,10 @@ type game_server_nodes { ): jsonb cpu_sockets: Int cpu_threads_per_core: Int + cpu_warnings( + """JSON select path""" + path: String + ): jsonb cs2_launch_options( """JSON select path""" path: String @@ -16001,6 +16005,7 @@ input game_server_nodes_aggregate_order_by { input game_server_nodes_append_input { cpu_frequency_info: jsonb cpu_governor_info: jsonb + cpu_warnings: jsonb cs2_launch_options: jsonb cs2_video_settings: jsonb gpu_info: jsonb @@ -16074,6 +16079,7 @@ input game_server_nodes_bool_exp { cpu_governor_info: jsonb_comparison_exp cpu_sockets: Int_comparison_exp cpu_threads_per_core: Int_comparison_exp + cpu_warnings: jsonb_comparison_exp cs2_launch_options: jsonb_comparison_exp cs2_video_settings: jsonb_comparison_exp csgo_build_id: Int_comparison_exp @@ -16134,6 +16140,7 @@ delete the field or element with specified path (for JSON arrays, negative integ input game_server_nodes_delete_at_path_input { cpu_frequency_info: [String!] cpu_governor_info: [String!] + cpu_warnings: [String!] cs2_launch_options: [String!] cs2_video_settings: [String!] gpu_info: [String!] @@ -16146,6 +16153,7 @@ delete the array element with specified index (negative integers count from the input game_server_nodes_delete_elem_input { cpu_frequency_info: Int cpu_governor_info: Int + cpu_warnings: Int cs2_launch_options: Int cs2_video_settings: Int gpu_info: Int @@ -16158,6 +16166,7 @@ delete key/value pair or string element. key/value pairs are matched based on th input game_server_nodes_delete_key_input { cpu_frequency_info: String cpu_governor_info: String + cpu_warnings: String cs2_launch_options: String cs2_video_settings: String gpu_info: String @@ -16192,6 +16201,7 @@ input game_server_nodes_insert_input { cpu_governor_info: jsonb cpu_sockets: Int cpu_threads_per_core: Int + cpu_warnings: jsonb cs2_launch_options: jsonb cs2_video_settings: jsonb csgo_build_id: Int @@ -16398,6 +16408,7 @@ input game_server_nodes_order_by { cpu_governor_info: order_by cpu_sockets: order_by cpu_threads_per_core: order_by + cpu_warnings: order_by cs2_launch_options: order_by cs2_video_settings: order_by csgo_build_id: order_by @@ -16450,6 +16461,7 @@ input game_server_nodes_pk_columns_input { input game_server_nodes_prepend_input { cpu_frequency_info: jsonb cpu_governor_info: jsonb + cpu_warnings: jsonb cs2_launch_options: jsonb cs2_video_settings: jsonb gpu_info: jsonb @@ -16478,6 +16490,9 @@ enum game_server_nodes_select_column { """column name""" cpu_threads_per_core + """column name""" + cpu_warnings + """column name""" cs2_launch_options @@ -16649,6 +16664,7 @@ input game_server_nodes_set_input { cpu_governor_info: jsonb cpu_sockets: Int cpu_threads_per_core: Int + cpu_warnings: jsonb cs2_launch_options: jsonb cs2_video_settings: jsonb csgo_build_id: Int @@ -16833,6 +16849,7 @@ input game_server_nodes_stream_cursor_value_input { cpu_governor_info: jsonb cpu_sockets: Int cpu_threads_per_core: Int + cpu_warnings: jsonb cs2_launch_options: jsonb cs2_video_settings: jsonb csgo_build_id: Int @@ -16934,6 +16951,9 @@ enum game_server_nodes_update_column { """column name""" cpu_threads_per_core + """column name""" + cpu_warnings + """column name""" cs2_launch_options diff --git a/generated/schema.ts b/generated/schema.ts index bf5c679e..9834da64 100644 --- a/generated/schema.ts +++ b/generated/schema.ts @@ -5531,7 +5531,7 @@ export interface events { players: event_players[] /** An aggregate relationship */ players_aggregate: event_players_aggregate - starts_at: (Scalars['timestamptz'] | null) + starts_at: Scalars['timestamptz'] /** An array relationship */ teams: event_teams[] /** An aggregate relationship */ @@ -5824,6 +5824,7 @@ export interface game_server_nodes { cpu_governor_info: (Scalars['jsonb'] | null) cpu_sockets: (Scalars['Int'] | null) cpu_threads_per_core: (Scalars['Int'] | null) + cpu_warnings: (Scalars['jsonb'] | null) cs2_launch_options: Scalars['jsonb'] cs2_video_settings: Scalars['jsonb'] csgo_build_id: (Scalars['Int'] | null) @@ -6004,7 +6005,7 @@ export interface game_server_nodes_mutation_response { /** select columns of table "game_server_nodes" */ -export type game_server_nodes_select_column = 'build_id' | 'cpu_cores_per_socket' | 'cpu_frequency_info' | 'cpu_governor_info' | 'cpu_sockets' | 'cpu_threads_per_core' | 'cs2_launch_options' | 'cs2_video_settings' | 'csgo_build_id' | 'demo_network_limiter' | 'disk_available_gb' | 'disk_used_percent' | 'enabled' | 'enabled_for_match_making' | 'end_port_range' | 'gpu' | 'gpu_demos_enabled' | 'gpu_info' | 'gpu_rendering_enabled' | 'gpu_streaming_enabled' | 'id' | 'label' | 'lan_ip' | 'node_ip' | 'offline_at' | 'pin_build_id' | 'pin_plugin_runtime' | 'pin_plugin_version' | 'public_ip' | 'region' | 'shader_bake_progress' | 'shader_bake_progress_stage' | 'shader_bake_status' | 'shader_bake_status_history' | 'start_port_range' | 'status' | 'supports_cpu_pinning' | 'supports_low_latency' | 'token' | 'update_status' +export type game_server_nodes_select_column = 'build_id' | 'cpu_cores_per_socket' | 'cpu_frequency_info' | 'cpu_governor_info' | 'cpu_sockets' | 'cpu_threads_per_core' | 'cpu_warnings' | 'cs2_launch_options' | 'cs2_video_settings' | 'csgo_build_id' | 'demo_network_limiter' | 'disk_available_gb' | 'disk_used_percent' | 'enabled' | 'enabled_for_match_making' | 'end_port_range' | 'gpu' | 'gpu_demos_enabled' | 'gpu_info' | 'gpu_rendering_enabled' | 'gpu_streaming_enabled' | 'id' | 'label' | 'lan_ip' | 'node_ip' | 'offline_at' | 'pin_build_id' | 'pin_plugin_runtime' | 'pin_plugin_version' | 'public_ip' | 'region' | 'shader_bake_progress' | 'shader_bake_progress_stage' | 'shader_bake_status' | 'shader_bake_status_history' | 'start_port_range' | 'status' | 'supports_cpu_pinning' | 'supports_low_latency' | 'token' | 'update_status' /** select "game_server_nodes_aggregate_bool_exp_bool_and_arguments_columns" columns of table "game_server_nodes" */ @@ -6104,7 +6105,7 @@ export interface game_server_nodes_sum_fields { /** update columns of table "game_server_nodes" */ -export type game_server_nodes_update_column = 'build_id' | 'cpu_cores_per_socket' | 'cpu_frequency_info' | 'cpu_governor_info' | 'cpu_sockets' | 'cpu_threads_per_core' | 'cs2_launch_options' | 'cs2_video_settings' | 'csgo_build_id' | 'demo_network_limiter' | 'disk_available_gb' | 'disk_used_percent' | 'enabled' | 'enabled_for_match_making' | 'end_port_range' | 'gpu' | 'gpu_demos_enabled' | 'gpu_info' | 'gpu_rendering_enabled' | 'gpu_streaming_enabled' | 'id' | 'label' | 'lan_ip' | 'node_ip' | 'offline_at' | 'pin_build_id' | 'pin_plugin_runtime' | 'pin_plugin_version' | 'public_ip' | 'region' | 'shader_bake_progress' | 'shader_bake_progress_stage' | 'shader_bake_status' | 'shader_bake_status_history' | 'start_port_range' | 'status' | 'supports_cpu_pinning' | 'supports_low_latency' | 'token' | 'update_status' +export type game_server_nodes_update_column = 'build_id' | 'cpu_cores_per_socket' | 'cpu_frequency_info' | 'cpu_governor_info' | 'cpu_sockets' | 'cpu_threads_per_core' | 'cpu_warnings' | 'cs2_launch_options' | 'cs2_video_settings' | 'csgo_build_id' | 'demo_network_limiter' | 'disk_available_gb' | 'disk_used_percent' | 'enabled' | 'enabled_for_match_making' | 'end_port_range' | 'gpu' | 'gpu_demos_enabled' | 'gpu_info' | 'gpu_rendering_enabled' | 'gpu_streaming_enabled' | 'id' | 'label' | 'lan_ip' | 'node_ip' | 'offline_at' | 'pin_build_id' | 'pin_plugin_runtime' | 'pin_plugin_version' | 'public_ip' | 'region' | 'shader_bake_progress' | 'shader_bake_progress_stage' | 'shader_bake_status' | 'shader_bake_status_history' | 'start_port_range' | 'status' | 'supports_cpu_pinning' | 'supports_low_latency' | 'token' | 'update_status' /** aggregate var_pop on columns */ @@ -43682,6 +43683,9 @@ export interface game_server_nodesGenqlSelection{ path?: (Scalars['String'] | null)} } | boolean | number cpu_sockets?: boolean | number cpu_threads_per_core?: boolean | number + cpu_warnings?: { __args: { + /** JSON select path */ + path?: (Scalars['String'] | null)} } | boolean | number cs2_launch_options?: { __args: { /** JSON select path */ path?: (Scalars['String'] | null)} } | boolean | number @@ -43805,7 +43809,7 @@ export interface game_server_nodes_aggregate_order_by {avg?: (game_server_nodes_ /** append existing jsonb value of filtered columns with new jsonb value */ -export interface game_server_nodes_append_input {cpu_frequency_info?: (Scalars['jsonb'] | null),cpu_governor_info?: (Scalars['jsonb'] | null),cs2_launch_options?: (Scalars['jsonb'] | null),cs2_video_settings?: (Scalars['jsonb'] | null),gpu_info?: (Scalars['jsonb'] | null),shader_bake_status_history?: (Scalars['jsonb'] | null)} +export interface game_server_nodes_append_input {cpu_frequency_info?: (Scalars['jsonb'] | null),cpu_governor_info?: (Scalars['jsonb'] | null),cpu_warnings?: (Scalars['jsonb'] | null),cs2_launch_options?: (Scalars['jsonb'] | null),cs2_video_settings?: (Scalars['jsonb'] | null),gpu_info?: (Scalars['jsonb'] | null),shader_bake_status_history?: (Scalars['jsonb'] | null)} /** input type for inserting array relation for remote table "game_server_nodes" */ @@ -43842,19 +43846,19 @@ export interface game_server_nodes_avg_order_by {build_id?: (order_by | null),cp /** Boolean expression to filter rows from the table "game_server_nodes". All fields are combined with a logical 'AND'. */ -export interface game_server_nodes_bool_exp {_and?: (game_server_nodes_bool_exp[] | null),_not?: (game_server_nodes_bool_exp | null),_or?: (game_server_nodes_bool_exp[] | null),available_server_count?: (Int_comparison_exp | null),build_id?: (Int_comparison_exp | null),cpu_cores_per_socket?: (Int_comparison_exp | null),cpu_frequency_info?: (jsonb_comparison_exp | null),cpu_governor_info?: (jsonb_comparison_exp | null),cpu_sockets?: (Int_comparison_exp | null),cpu_threads_per_core?: (Int_comparison_exp | null),cs2_launch_options?: (jsonb_comparison_exp | null),cs2_video_settings?: (jsonb_comparison_exp | null),csgo_build_id?: (Int_comparison_exp | null),demo_network_limiter?: (Int_comparison_exp | null),disk_available_gb?: (Int_comparison_exp | null),disk_used_percent?: (Int_comparison_exp | null),e_region?: (server_regions_bool_exp | null),e_status?: (e_game_server_node_statuses_bool_exp | null),enabled?: (Boolean_comparison_exp | null),enabled_for_match_making?: (Boolean_comparison_exp | null),end_port_range?: (Int_comparison_exp | null),gpu?: (Boolean_comparison_exp | null),gpu_demos_enabled?: (Boolean_comparison_exp | null),gpu_info?: (jsonb_comparison_exp | null),gpu_rendering_enabled?: (Boolean_comparison_exp | null),gpu_streaming_enabled?: (Boolean_comparison_exp | null),id?: (String_comparison_exp | null),label?: (String_comparison_exp | null),lan_ip?: (inet_comparison_exp | null),node_ip?: (inet_comparison_exp | null),offline_at?: (timestamptz_comparison_exp | null),pin_build_id?: (Int_comparison_exp | null),pin_plugin_runtime?: (String_comparison_exp | null),pin_plugin_version?: (String_comparison_exp | null),pinned_version?: (game_versions_bool_exp | null),plugin_supported?: (Boolean_comparison_exp | null),public_ip?: (inet_comparison_exp | null),region?: (String_comparison_exp | null),servers?: (servers_bool_exp | null),servers_aggregate?: (servers_aggregate_bool_exp | null),shader_bake_progress?: (numeric_comparison_exp | null),shader_bake_progress_stage?: (String_comparison_exp | null),shader_bake_status?: (String_comparison_exp | null),shader_bake_status_history?: (jsonb_comparison_exp | null),start_port_range?: (Int_comparison_exp | null),status?: (e_game_server_node_statuses_enum_comparison_exp | null),supports_cpu_pinning?: (Boolean_comparison_exp | null),supports_low_latency?: (Boolean_comparison_exp | null),token?: (String_comparison_exp | null),total_server_count?: (Int_comparison_exp | null),update_status?: (String_comparison_exp | null),version?: (game_versions_bool_exp | null)} +export interface game_server_nodes_bool_exp {_and?: (game_server_nodes_bool_exp[] | null),_not?: (game_server_nodes_bool_exp | null),_or?: (game_server_nodes_bool_exp[] | null),available_server_count?: (Int_comparison_exp | null),build_id?: (Int_comparison_exp | null),cpu_cores_per_socket?: (Int_comparison_exp | null),cpu_frequency_info?: (jsonb_comparison_exp | null),cpu_governor_info?: (jsonb_comparison_exp | null),cpu_sockets?: (Int_comparison_exp | null),cpu_threads_per_core?: (Int_comparison_exp | null),cpu_warnings?: (jsonb_comparison_exp | null),cs2_launch_options?: (jsonb_comparison_exp | null),cs2_video_settings?: (jsonb_comparison_exp | null),csgo_build_id?: (Int_comparison_exp | null),demo_network_limiter?: (Int_comparison_exp | null),disk_available_gb?: (Int_comparison_exp | null),disk_used_percent?: (Int_comparison_exp | null),e_region?: (server_regions_bool_exp | null),e_status?: (e_game_server_node_statuses_bool_exp | null),enabled?: (Boolean_comparison_exp | null),enabled_for_match_making?: (Boolean_comparison_exp | null),end_port_range?: (Int_comparison_exp | null),gpu?: (Boolean_comparison_exp | null),gpu_demos_enabled?: (Boolean_comparison_exp | null),gpu_info?: (jsonb_comparison_exp | null),gpu_rendering_enabled?: (Boolean_comparison_exp | null),gpu_streaming_enabled?: (Boolean_comparison_exp | null),id?: (String_comparison_exp | null),label?: (String_comparison_exp | null),lan_ip?: (inet_comparison_exp | null),node_ip?: (inet_comparison_exp | null),offline_at?: (timestamptz_comparison_exp | null),pin_build_id?: (Int_comparison_exp | null),pin_plugin_runtime?: (String_comparison_exp | null),pin_plugin_version?: (String_comparison_exp | null),pinned_version?: (game_versions_bool_exp | null),plugin_supported?: (Boolean_comparison_exp | null),public_ip?: (inet_comparison_exp | null),region?: (String_comparison_exp | null),servers?: (servers_bool_exp | null),servers_aggregate?: (servers_aggregate_bool_exp | null),shader_bake_progress?: (numeric_comparison_exp | null),shader_bake_progress_stage?: (String_comparison_exp | null),shader_bake_status?: (String_comparison_exp | null),shader_bake_status_history?: (jsonb_comparison_exp | null),start_port_range?: (Int_comparison_exp | null),status?: (e_game_server_node_statuses_enum_comparison_exp | null),supports_cpu_pinning?: (Boolean_comparison_exp | null),supports_low_latency?: (Boolean_comparison_exp | null),token?: (String_comparison_exp | null),total_server_count?: (Int_comparison_exp | null),update_status?: (String_comparison_exp | null),version?: (game_versions_bool_exp | null)} /** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */ -export interface game_server_nodes_delete_at_path_input {cpu_frequency_info?: (Scalars['String'][] | null),cpu_governor_info?: (Scalars['String'][] | null),cs2_launch_options?: (Scalars['String'][] | null),cs2_video_settings?: (Scalars['String'][] | null),gpu_info?: (Scalars['String'][] | null),shader_bake_status_history?: (Scalars['String'][] | null)} +export interface game_server_nodes_delete_at_path_input {cpu_frequency_info?: (Scalars['String'][] | null),cpu_governor_info?: (Scalars['String'][] | null),cpu_warnings?: (Scalars['String'][] | null),cs2_launch_options?: (Scalars['String'][] | null),cs2_video_settings?: (Scalars['String'][] | null),gpu_info?: (Scalars['String'][] | null),shader_bake_status_history?: (Scalars['String'][] | null)} /** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */ -export interface game_server_nodes_delete_elem_input {cpu_frequency_info?: (Scalars['Int'] | null),cpu_governor_info?: (Scalars['Int'] | null),cs2_launch_options?: (Scalars['Int'] | null),cs2_video_settings?: (Scalars['Int'] | null),gpu_info?: (Scalars['Int'] | null),shader_bake_status_history?: (Scalars['Int'] | null)} +export interface game_server_nodes_delete_elem_input {cpu_frequency_info?: (Scalars['Int'] | null),cpu_governor_info?: (Scalars['Int'] | null),cpu_warnings?: (Scalars['Int'] | null),cs2_launch_options?: (Scalars['Int'] | null),cs2_video_settings?: (Scalars['Int'] | null),gpu_info?: (Scalars['Int'] | null),shader_bake_status_history?: (Scalars['Int'] | null)} /** delete key/value pair or string element. key/value pairs are matched based on their key value */ -export interface game_server_nodes_delete_key_input {cpu_frequency_info?: (Scalars['String'] | null),cpu_governor_info?: (Scalars['String'] | null),cs2_launch_options?: (Scalars['String'] | null),cs2_video_settings?: (Scalars['String'] | null),gpu_info?: (Scalars['String'] | null),shader_bake_status_history?: (Scalars['String'] | null)} +export interface game_server_nodes_delete_key_input {cpu_frequency_info?: (Scalars['String'] | null),cpu_governor_info?: (Scalars['String'] | null),cpu_warnings?: (Scalars['String'] | null),cs2_launch_options?: (Scalars['String'] | null),cs2_video_settings?: (Scalars['String'] | null),gpu_info?: (Scalars['String'] | null),shader_bake_status_history?: (Scalars['String'] | null)} /** input type for incrementing numeric columns in table "game_server_nodes" */ @@ -43862,7 +43866,7 @@ export interface game_server_nodes_inc_input {build_id?: (Scalars['Int'] | null) /** input type for inserting data into table "game_server_nodes" */ -export interface game_server_nodes_insert_input {build_id?: (Scalars['Int'] | null),cpu_cores_per_socket?: (Scalars['Int'] | null),cpu_frequency_info?: (Scalars['jsonb'] | null),cpu_governor_info?: (Scalars['jsonb'] | null),cpu_sockets?: (Scalars['Int'] | null),cpu_threads_per_core?: (Scalars['Int'] | null),cs2_launch_options?: (Scalars['jsonb'] | null),cs2_video_settings?: (Scalars['jsonb'] | null),csgo_build_id?: (Scalars['Int'] | null),demo_network_limiter?: (Scalars['Int'] | null),disk_available_gb?: (Scalars['Int'] | null),disk_used_percent?: (Scalars['Int'] | null),e_region?: (server_regions_obj_rel_insert_input | null),e_status?: (e_game_server_node_statuses_obj_rel_insert_input | null),enabled?: (Scalars['Boolean'] | null),enabled_for_match_making?: (Scalars['Boolean'] | null),end_port_range?: (Scalars['Int'] | null),gpu?: (Scalars['Boolean'] | null),gpu_demos_enabled?: (Scalars['Boolean'] | null),gpu_info?: (Scalars['jsonb'] | null),gpu_rendering_enabled?: (Scalars['Boolean'] | null),gpu_streaming_enabled?: (Scalars['Boolean'] | null),id?: (Scalars['String'] | null),label?: (Scalars['String'] | null),lan_ip?: (Scalars['inet'] | null),node_ip?: (Scalars['inet'] | null),offline_at?: (Scalars['timestamptz'] | null),pin_build_id?: (Scalars['Int'] | null),pin_plugin_runtime?: (Scalars['String'] | null),pin_plugin_version?: (Scalars['String'] | null),pinned_version?: (game_versions_obj_rel_insert_input | null),public_ip?: (Scalars['inet'] | null),region?: (Scalars['String'] | null),servers?: (servers_arr_rel_insert_input | null),shader_bake_progress?: (Scalars['numeric'] | null),shader_bake_progress_stage?: (Scalars['String'] | null),shader_bake_status?: (Scalars['String'] | null),shader_bake_status_history?: (Scalars['jsonb'] | null),start_port_range?: (Scalars['Int'] | null),status?: (e_game_server_node_statuses_enum | null),supports_cpu_pinning?: (Scalars['Boolean'] | null),supports_low_latency?: (Scalars['Boolean'] | null),token?: (Scalars['String'] | null),update_status?: (Scalars['String'] | null),version?: (game_versions_obj_rel_insert_input | null)} +export interface game_server_nodes_insert_input {build_id?: (Scalars['Int'] | null),cpu_cores_per_socket?: (Scalars['Int'] | null),cpu_frequency_info?: (Scalars['jsonb'] | null),cpu_governor_info?: (Scalars['jsonb'] | null),cpu_sockets?: (Scalars['Int'] | null),cpu_threads_per_core?: (Scalars['Int'] | null),cpu_warnings?: (Scalars['jsonb'] | null),cs2_launch_options?: (Scalars['jsonb'] | null),cs2_video_settings?: (Scalars['jsonb'] | null),csgo_build_id?: (Scalars['Int'] | null),demo_network_limiter?: (Scalars['Int'] | null),disk_available_gb?: (Scalars['Int'] | null),disk_used_percent?: (Scalars['Int'] | null),e_region?: (server_regions_obj_rel_insert_input | null),e_status?: (e_game_server_node_statuses_obj_rel_insert_input | null),enabled?: (Scalars['Boolean'] | null),enabled_for_match_making?: (Scalars['Boolean'] | null),end_port_range?: (Scalars['Int'] | null),gpu?: (Scalars['Boolean'] | null),gpu_demos_enabled?: (Scalars['Boolean'] | null),gpu_info?: (Scalars['jsonb'] | null),gpu_rendering_enabled?: (Scalars['Boolean'] | null),gpu_streaming_enabled?: (Scalars['Boolean'] | null),id?: (Scalars['String'] | null),label?: (Scalars['String'] | null),lan_ip?: (Scalars['inet'] | null),node_ip?: (Scalars['inet'] | null),offline_at?: (Scalars['timestamptz'] | null),pin_build_id?: (Scalars['Int'] | null),pin_plugin_runtime?: (Scalars['String'] | null),pin_plugin_version?: (Scalars['String'] | null),pinned_version?: (game_versions_obj_rel_insert_input | null),public_ip?: (Scalars['inet'] | null),region?: (Scalars['String'] | null),servers?: (servers_arr_rel_insert_input | null),shader_bake_progress?: (Scalars['numeric'] | null),shader_bake_progress_stage?: (Scalars['String'] | null),shader_bake_status?: (Scalars['String'] | null),shader_bake_status_history?: (Scalars['jsonb'] | null),start_port_range?: (Scalars['Int'] | null),status?: (e_game_server_node_statuses_enum | null),supports_cpu_pinning?: (Scalars['Boolean'] | null),supports_low_latency?: (Scalars['Boolean'] | null),token?: (Scalars['String'] | null),update_status?: (Scalars['String'] | null),version?: (game_versions_obj_rel_insert_input | null)} /** aggregate max on columns */ @@ -43961,7 +43965,7 @@ export interface game_server_nodes_on_conflict {constraint: game_server_nodes_co /** Ordering options when selecting data from "game_server_nodes". */ -export interface game_server_nodes_order_by {available_server_count?: (order_by | null),build_id?: (order_by | null),cpu_cores_per_socket?: (order_by | null),cpu_frequency_info?: (order_by | null),cpu_governor_info?: (order_by | null),cpu_sockets?: (order_by | null),cpu_threads_per_core?: (order_by | null),cs2_launch_options?: (order_by | null),cs2_video_settings?: (order_by | null),csgo_build_id?: (order_by | null),demo_network_limiter?: (order_by | null),disk_available_gb?: (order_by | null),disk_used_percent?: (order_by | null),e_region?: (server_regions_order_by | null),e_status?: (e_game_server_node_statuses_order_by | null),enabled?: (order_by | null),enabled_for_match_making?: (order_by | null),end_port_range?: (order_by | null),gpu?: (order_by | null),gpu_demos_enabled?: (order_by | null),gpu_info?: (order_by | null),gpu_rendering_enabled?: (order_by | null),gpu_streaming_enabled?: (order_by | null),id?: (order_by | null),label?: (order_by | null),lan_ip?: (order_by | null),node_ip?: (order_by | null),offline_at?: (order_by | null),pin_build_id?: (order_by | null),pin_plugin_runtime?: (order_by | null),pin_plugin_version?: (order_by | null),pinned_version?: (game_versions_order_by | null),plugin_supported?: (order_by | null),public_ip?: (order_by | null),region?: (order_by | null),servers_aggregate?: (servers_aggregate_order_by | null),shader_bake_progress?: (order_by | null),shader_bake_progress_stage?: (order_by | null),shader_bake_status?: (order_by | null),shader_bake_status_history?: (order_by | null),start_port_range?: (order_by | null),status?: (order_by | null),supports_cpu_pinning?: (order_by | null),supports_low_latency?: (order_by | null),token?: (order_by | null),total_server_count?: (order_by | null),update_status?: (order_by | null),version?: (game_versions_order_by | null)} +export interface game_server_nodes_order_by {available_server_count?: (order_by | null),build_id?: (order_by | null),cpu_cores_per_socket?: (order_by | null),cpu_frequency_info?: (order_by | null),cpu_governor_info?: (order_by | null),cpu_sockets?: (order_by | null),cpu_threads_per_core?: (order_by | null),cpu_warnings?: (order_by | null),cs2_launch_options?: (order_by | null),cs2_video_settings?: (order_by | null),csgo_build_id?: (order_by | null),demo_network_limiter?: (order_by | null),disk_available_gb?: (order_by | null),disk_used_percent?: (order_by | null),e_region?: (server_regions_order_by | null),e_status?: (e_game_server_node_statuses_order_by | null),enabled?: (order_by | null),enabled_for_match_making?: (order_by | null),end_port_range?: (order_by | null),gpu?: (order_by | null),gpu_demos_enabled?: (order_by | null),gpu_info?: (order_by | null),gpu_rendering_enabled?: (order_by | null),gpu_streaming_enabled?: (order_by | null),id?: (order_by | null),label?: (order_by | null),lan_ip?: (order_by | null),node_ip?: (order_by | null),offline_at?: (order_by | null),pin_build_id?: (order_by | null),pin_plugin_runtime?: (order_by | null),pin_plugin_version?: (order_by | null),pinned_version?: (game_versions_order_by | null),plugin_supported?: (order_by | null),public_ip?: (order_by | null),region?: (order_by | null),servers_aggregate?: (servers_aggregate_order_by | null),shader_bake_progress?: (order_by | null),shader_bake_progress_stage?: (order_by | null),shader_bake_status?: (order_by | null),shader_bake_status_history?: (order_by | null),start_port_range?: (order_by | null),status?: (order_by | null),supports_cpu_pinning?: (order_by | null),supports_low_latency?: (order_by | null),token?: (order_by | null),total_server_count?: (order_by | null),update_status?: (order_by | null),version?: (game_versions_order_by | null)} /** primary key columns input for table: game_server_nodes */ @@ -43969,11 +43973,11 @@ export interface game_server_nodes_pk_columns_input {id: Scalars['String']} /** prepend existing jsonb value of filtered columns with new jsonb value */ -export interface game_server_nodes_prepend_input {cpu_frequency_info?: (Scalars['jsonb'] | null),cpu_governor_info?: (Scalars['jsonb'] | null),cs2_launch_options?: (Scalars['jsonb'] | null),cs2_video_settings?: (Scalars['jsonb'] | null),gpu_info?: (Scalars['jsonb'] | null),shader_bake_status_history?: (Scalars['jsonb'] | null)} +export interface game_server_nodes_prepend_input {cpu_frequency_info?: (Scalars['jsonb'] | null),cpu_governor_info?: (Scalars['jsonb'] | null),cpu_warnings?: (Scalars['jsonb'] | null),cs2_launch_options?: (Scalars['jsonb'] | null),cs2_video_settings?: (Scalars['jsonb'] | null),gpu_info?: (Scalars['jsonb'] | null),shader_bake_status_history?: (Scalars['jsonb'] | null)} /** input type for updating data in table "game_server_nodes" */ -export interface game_server_nodes_set_input {build_id?: (Scalars['Int'] | null),cpu_cores_per_socket?: (Scalars['Int'] | null),cpu_frequency_info?: (Scalars['jsonb'] | null),cpu_governor_info?: (Scalars['jsonb'] | null),cpu_sockets?: (Scalars['Int'] | null),cpu_threads_per_core?: (Scalars['Int'] | null),cs2_launch_options?: (Scalars['jsonb'] | null),cs2_video_settings?: (Scalars['jsonb'] | null),csgo_build_id?: (Scalars['Int'] | null),demo_network_limiter?: (Scalars['Int'] | null),disk_available_gb?: (Scalars['Int'] | null),disk_used_percent?: (Scalars['Int'] | null),enabled?: (Scalars['Boolean'] | null),enabled_for_match_making?: (Scalars['Boolean'] | null),end_port_range?: (Scalars['Int'] | null),gpu?: (Scalars['Boolean'] | null),gpu_demos_enabled?: (Scalars['Boolean'] | null),gpu_info?: (Scalars['jsonb'] | null),gpu_rendering_enabled?: (Scalars['Boolean'] | null),gpu_streaming_enabled?: (Scalars['Boolean'] | null),id?: (Scalars['String'] | null),label?: (Scalars['String'] | null),lan_ip?: (Scalars['inet'] | null),node_ip?: (Scalars['inet'] | null),offline_at?: (Scalars['timestamptz'] | null),pin_build_id?: (Scalars['Int'] | null),pin_plugin_runtime?: (Scalars['String'] | null),pin_plugin_version?: (Scalars['String'] | null),public_ip?: (Scalars['inet'] | null),region?: (Scalars['String'] | null),shader_bake_progress?: (Scalars['numeric'] | null),shader_bake_progress_stage?: (Scalars['String'] | null),shader_bake_status?: (Scalars['String'] | null),shader_bake_status_history?: (Scalars['jsonb'] | null),start_port_range?: (Scalars['Int'] | null),status?: (e_game_server_node_statuses_enum | null),supports_cpu_pinning?: (Scalars['Boolean'] | null),supports_low_latency?: (Scalars['Boolean'] | null),token?: (Scalars['String'] | null),update_status?: (Scalars['String'] | null)} +export interface game_server_nodes_set_input {build_id?: (Scalars['Int'] | null),cpu_cores_per_socket?: (Scalars['Int'] | null),cpu_frequency_info?: (Scalars['jsonb'] | null),cpu_governor_info?: (Scalars['jsonb'] | null),cpu_sockets?: (Scalars['Int'] | null),cpu_threads_per_core?: (Scalars['Int'] | null),cpu_warnings?: (Scalars['jsonb'] | null),cs2_launch_options?: (Scalars['jsonb'] | null),cs2_video_settings?: (Scalars['jsonb'] | null),csgo_build_id?: (Scalars['Int'] | null),demo_network_limiter?: (Scalars['Int'] | null),disk_available_gb?: (Scalars['Int'] | null),disk_used_percent?: (Scalars['Int'] | null),enabled?: (Scalars['Boolean'] | null),enabled_for_match_making?: (Scalars['Boolean'] | null),end_port_range?: (Scalars['Int'] | null),gpu?: (Scalars['Boolean'] | null),gpu_demos_enabled?: (Scalars['Boolean'] | null),gpu_info?: (Scalars['jsonb'] | null),gpu_rendering_enabled?: (Scalars['Boolean'] | null),gpu_streaming_enabled?: (Scalars['Boolean'] | null),id?: (Scalars['String'] | null),label?: (Scalars['String'] | null),lan_ip?: (Scalars['inet'] | null),node_ip?: (Scalars['inet'] | null),offline_at?: (Scalars['timestamptz'] | null),pin_build_id?: (Scalars['Int'] | null),pin_plugin_runtime?: (Scalars['String'] | null),pin_plugin_version?: (Scalars['String'] | null),public_ip?: (Scalars['inet'] | null),region?: (Scalars['String'] | null),shader_bake_progress?: (Scalars['numeric'] | null),shader_bake_progress_stage?: (Scalars['String'] | null),shader_bake_status?: (Scalars['String'] | null),shader_bake_status_history?: (Scalars['jsonb'] | null),start_port_range?: (Scalars['Int'] | null),status?: (e_game_server_node_statuses_enum | null),supports_cpu_pinning?: (Scalars['Boolean'] | null),supports_low_latency?: (Scalars['Boolean'] | null),token?: (Scalars['String'] | null),update_status?: (Scalars['String'] | null)} /** aggregate stddev on columns */ @@ -44066,7 +44070,7 @@ ordering?: (cursor_ordering | null)} /** Initial value of the column from where the streaming should start */ -export interface game_server_nodes_stream_cursor_value_input {build_id?: (Scalars['Int'] | null),cpu_cores_per_socket?: (Scalars['Int'] | null),cpu_frequency_info?: (Scalars['jsonb'] | null),cpu_governor_info?: (Scalars['jsonb'] | null),cpu_sockets?: (Scalars['Int'] | null),cpu_threads_per_core?: (Scalars['Int'] | null),cs2_launch_options?: (Scalars['jsonb'] | null),cs2_video_settings?: (Scalars['jsonb'] | null),csgo_build_id?: (Scalars['Int'] | null),demo_network_limiter?: (Scalars['Int'] | null),disk_available_gb?: (Scalars['Int'] | null),disk_used_percent?: (Scalars['Int'] | null),enabled?: (Scalars['Boolean'] | null),enabled_for_match_making?: (Scalars['Boolean'] | null),end_port_range?: (Scalars['Int'] | null),gpu?: (Scalars['Boolean'] | null),gpu_demos_enabled?: (Scalars['Boolean'] | null),gpu_info?: (Scalars['jsonb'] | null),gpu_rendering_enabled?: (Scalars['Boolean'] | null),gpu_streaming_enabled?: (Scalars['Boolean'] | null),id?: (Scalars['String'] | null),label?: (Scalars['String'] | null),lan_ip?: (Scalars['inet'] | null),node_ip?: (Scalars['inet'] | null),offline_at?: (Scalars['timestamptz'] | null),pin_build_id?: (Scalars['Int'] | null),pin_plugin_runtime?: (Scalars['String'] | null),pin_plugin_version?: (Scalars['String'] | null),public_ip?: (Scalars['inet'] | null),region?: (Scalars['String'] | null),shader_bake_progress?: (Scalars['numeric'] | null),shader_bake_progress_stage?: (Scalars['String'] | null),shader_bake_status?: (Scalars['String'] | null),shader_bake_status_history?: (Scalars['jsonb'] | null),start_port_range?: (Scalars['Int'] | null),status?: (e_game_server_node_statuses_enum | null),supports_cpu_pinning?: (Scalars['Boolean'] | null),supports_low_latency?: (Scalars['Boolean'] | null),token?: (Scalars['String'] | null),update_status?: (Scalars['String'] | null)} +export interface game_server_nodes_stream_cursor_value_input {build_id?: (Scalars['Int'] | null),cpu_cores_per_socket?: (Scalars['Int'] | null),cpu_frequency_info?: (Scalars['jsonb'] | null),cpu_governor_info?: (Scalars['jsonb'] | null),cpu_sockets?: (Scalars['Int'] | null),cpu_threads_per_core?: (Scalars['Int'] | null),cpu_warnings?: (Scalars['jsonb'] | null),cs2_launch_options?: (Scalars['jsonb'] | null),cs2_video_settings?: (Scalars['jsonb'] | null),csgo_build_id?: (Scalars['Int'] | null),demo_network_limiter?: (Scalars['Int'] | null),disk_available_gb?: (Scalars['Int'] | null),disk_used_percent?: (Scalars['Int'] | null),enabled?: (Scalars['Boolean'] | null),enabled_for_match_making?: (Scalars['Boolean'] | null),end_port_range?: (Scalars['Int'] | null),gpu?: (Scalars['Boolean'] | null),gpu_demos_enabled?: (Scalars['Boolean'] | null),gpu_info?: (Scalars['jsonb'] | null),gpu_rendering_enabled?: (Scalars['Boolean'] | null),gpu_streaming_enabled?: (Scalars['Boolean'] | null),id?: (Scalars['String'] | null),label?: (Scalars['String'] | null),lan_ip?: (Scalars['inet'] | null),node_ip?: (Scalars['inet'] | null),offline_at?: (Scalars['timestamptz'] | null),pin_build_id?: (Scalars['Int'] | null),pin_plugin_runtime?: (Scalars['String'] | null),pin_plugin_version?: (Scalars['String'] | null),public_ip?: (Scalars['inet'] | null),region?: (Scalars['String'] | null),shader_bake_progress?: (Scalars['numeric'] | null),shader_bake_progress_stage?: (Scalars['String'] | null),shader_bake_status?: (Scalars['String'] | null),shader_bake_status_history?: (Scalars['jsonb'] | null),start_port_range?: (Scalars['Int'] | null),status?: (e_game_server_node_statuses_enum | null),supports_cpu_pinning?: (Scalars['Boolean'] | null),supports_low_latency?: (Scalars['Boolean'] | null),token?: (Scalars['String'] | null),update_status?: (Scalars['String'] | null)} /** aggregate sum on columns */ @@ -113739,6 +113743,7 @@ export const enumGameServerNodesSelectColumn = { cpu_governor_info: 'cpu_governor_info' as const, cpu_sockets: 'cpu_sockets' as const, cpu_threads_per_core: 'cpu_threads_per_core' as const, + cpu_warnings: 'cpu_warnings' as const, cs2_launch_options: 'cs2_launch_options' as const, cs2_video_settings: 'cs2_video_settings' as const, csgo_build_id: 'csgo_build_id' as const, @@ -113804,6 +113809,7 @@ export const enumGameServerNodesUpdateColumn = { cpu_governor_info: 'cpu_governor_info' as const, cpu_sockets: 'cpu_sockets' as const, cpu_threads_per_core: 'cpu_threads_per_core' as const, + cpu_warnings: 'cpu_warnings' as const, cs2_launch_options: 'cs2_launch_options' as const, cs2_video_settings: 'cs2_video_settings' as const, csgo_build_id: 'csgo_build_id' as const, diff --git a/generated/types.ts b/generated/types.ts index 974028df..455b666c 100644 --- a/generated/types.ts +++ b/generated/types.ts @@ -22512,6 +22512,14 @@ export default { "cpu_threads_per_core": [ 38 ], + "cpu_warnings": [ + 1652, + { + "path": [ + 78 + ] + } + ], "cs2_launch_options": [ 1652, { @@ -22868,6 +22876,9 @@ export default { "cpu_governor_info": [ 1652 ], + "cpu_warnings": [ + 1652 + ], "cs2_launch_options": [ 1652 ], @@ -23014,6 +23025,9 @@ export default { "cpu_threads_per_core": [ 39 ], + "cpu_warnings": [ + 1654 + ], "cs2_launch_options": [ 1654 ], @@ -23152,6 +23166,9 @@ export default { "cpu_governor_info": [ 78 ], + "cpu_warnings": [ + 78 + ], "cs2_launch_options": [ 78 ], @@ -23175,6 +23192,9 @@ export default { "cpu_governor_info": [ 38 ], + "cpu_warnings": [ + 38 + ], "cs2_launch_options": [ 38 ], @@ -23198,6 +23218,9 @@ export default { "cpu_governor_info": [ 78 ], + "cpu_warnings": [ + 78 + ], "cs2_launch_options": [ 78 ], @@ -23274,6 +23297,9 @@ export default { "cpu_threads_per_core": [ 38 ], + "cpu_warnings": [ + 1652 + ], "cs2_launch_options": [ 1652 ], @@ -23749,6 +23775,9 @@ export default { "cpu_threads_per_core": [ 2781 ], + "cpu_warnings": [ + 2781 + ], "cs2_launch_options": [ 2781 ], @@ -23891,6 +23920,9 @@ export default { "cpu_governor_info": [ 1652 ], + "cpu_warnings": [ + 1652 + ], "cs2_launch_options": [ 1652 ], @@ -23929,6 +23961,9 @@ export default { "cpu_threads_per_core": [ 38 ], + "cpu_warnings": [ + 1652 + ], "cs2_launch_options": [ 1652 ], @@ -24329,6 +24364,9 @@ export default { "cpu_threads_per_core": [ 38 ], + "cpu_warnings": [ + 1652 + ], "cs2_launch_options": [ 1652 ], diff --git a/hasura/metadata/databases/default/tables/public_game_server_nodes.yaml b/hasura/metadata/databases/default/tables/public_game_server_nodes.yaml index cb5f2990..b14c5284 100644 --- a/hasura/metadata/databases/default/tables/public_game_server_nodes.yaml +++ b/hasura/metadata/databases/default/tables/public_game_server_nodes.yaml @@ -60,6 +60,7 @@ select_permissions: - cpu_governor_info - cpu_sockets - cpu_threads_per_core + - cpu_warnings - cs2_video_settings - csgo_build_id - demo_network_limiter diff --git a/hasura/migrations/default/1871000000100_game_server_node_cpu_warnings/down.sql b/hasura/migrations/default/1871000000100_game_server_node_cpu_warnings/down.sql new file mode 100644 index 00000000..0703bb35 --- /dev/null +++ b/hasura/migrations/default/1871000000100_game_server_node_cpu_warnings/down.sql @@ -0,0 +1,2 @@ +ALTER TABLE public.game_server_nodes + DROP COLUMN cpu_warnings; diff --git a/hasura/migrations/default/1871000000100_game_server_node_cpu_warnings/up.sql b/hasura/migrations/default/1871000000100_game_server_node_cpu_warnings/up.sql new file mode 100644 index 00000000..b12997f3 --- /dev/null +++ b/hasura/migrations/default/1871000000100_game_server_node_cpu_warnings/up.sql @@ -0,0 +1,2 @@ +ALTER TABLE public.game_server_nodes + ADD COLUMN cpu_warnings jsonb; diff --git a/src/game-server-node/game-server-node.controller.ts b/src/game-server-node/game-server-node.controller.ts index b8b9b614..46bf55e8 100644 --- a/src/game-server-node/game-server-node.controller.ts +++ b/src/game-server-node/game-server-node.controller.ts @@ -77,6 +77,7 @@ export class GameServerNodeController { cpus: Record; frequency: number; }; + cpuWarnings?: Array; podStats: Array; labels: Record; }): Promise { @@ -145,6 +146,7 @@ export class GameServerNodeController { gpu, "Online", rootDisk, + payload.cpuWarnings ?? [], ); if (result?.transitionedFromOffline) { diff --git a/src/game-server-node/game-server-node.service.ts b/src/game-server-node/game-server-node.service.ts index 0522612c..94ea99f9 100644 --- a/src/game-server-node/game-server-node.service.ts +++ b/src/game-server-node/game-server-node.service.ts @@ -193,6 +193,7 @@ export class GameServerNodeService { | undefined, status: e_game_server_node_statuses_enum, rootDisk?: NodeDisk, + cpuWarnings: Array = [], ) { const gpuDevicesAll = gpu?.devices ?? null; const hasGpu = (gpu?.count ?? 0) > 0 || (gpuDevicesAll?.length ?? 0) > 0; @@ -228,6 +229,7 @@ export class GameServerNodeService { supports_cpu_pinning: true, cpu_governor_info: true, cpu_frequency_info: true, + cpu_warnings: true, update_status: true, }, }); @@ -293,7 +295,8 @@ export class GameServerNodeService { cpuGovernorInfo, ) || game_server_nodes_by_pk.token || - !isJsonEqual(game_server_nodes_by_pk.cpu_frequency_info, cpuFrequencyInfo) + !isJsonEqual(game_server_nodes_by_pk.cpu_frequency_info, cpuFrequencyInfo) || + !isJsonEqual(game_server_nodes_by_pk.cpu_warnings, cpuWarnings) ) { await this.hasura.mutation({ update_game_server_nodes_by_pk: { @@ -320,6 +323,7 @@ export class GameServerNodeService { cpu_threads_per_core: cpuInfo.threadsPerCore, cpu_governor_info: cpuGovernorInfo, cpu_frequency_info: cpuFrequencyInfo, + cpu_warnings: cpuWarnings, disk_available_gb: rootDisk ? Number.isNaN(parseInt(rootDisk.available)) ? null