Skip to content

Commit 6c6282d

Browse files
committed
chore: remove servers webhook (#1051)
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
1 parent a5febc2 commit 6c6282d

File tree

11 files changed

+84
-99
lines changed

11 files changed

+84
-99
lines changed

fern/definition/servers/__package__.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ types:
7979
This should be set to a safe default, and can be overridden during a
8080
DELETE request if needed.
8181
type: optional<long>
82-
webhook_url:
83-
docs: >-
84-
A url to send to which events from the server running will be sent
85-
type: optional<string>
8682

8783
CreateServerNetworkRequest:
8884
properties:

lib/util/core/src/route.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,8 @@ pub fn billing(team_id: Uuid) -> String {
104104
format!("{}/groups/{}/billing", origin_hub(), team_id)
105105
}
106106

107-
pub fn opengb_env(project_name_id: &str, env_name_id: &str) -> GlobalResult<String> {
107+
pub fn backend_endpoint(backend_slug: &str) -> GlobalResult<String> {
108108
let domain_main = unwrap!(domain_main(), "dns not enabled");
109109

110-
Ok(format!(
111-
"https://{}--{}.backend.{}",
112-
project_name_id, env_name_id, domain_main,
113-
))
110+
Ok(format!("https://{}.backend.{}", backend_slug, domain_main,))
114111
}

proto/backend/ds.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ import "proto/backend/captcha.proto";
77
import "proto/backend/region.proto";
88

99
message Server {
10+
reserved 8;
11+
1012
rivet.common.Uuid server_id = 1;
1113
rivet.common.Uuid game_id = 2;
1214
rivet.common.Uuid datacenter_id = 3;
1315
rivet.common.Uuid cluster_id = 4;
1416
map<string, string> tags = 5;
1517
rivet.backend.ds.ServerResources resources = 6;
1618
int64 kill_timeout_ms = 7;
17-
optional string webhook_url = 8;
1819
int64 create_ts = 9;
1920
optional int64 start_ts = 10;
2021
optional int64 destroy_ts = 11;

svc/api/servers/src/route/servers.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ pub async fn create(
7474
tags: tags,
7575
resources: Some((*body.resources).api_into()),
7676
kill_timeout_ms: body.kill_timeout.unwrap_or_default(),
77-
webhook_url: body.webhook_url,
7877
image_id: Some(body.image.into()),
7978
args: body.arguments.unwrap_or_default(),
8079
network_mode: backend::ds::NetworkMode::api_from(

svc/api/servers/tests/basic.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ async fn create_http() -> GlobalResult<()> {
157157
environment: Some(HashMap::new()),
158158
image: ctx.image_id,
159159
kill_timeout: Some(0),
160-
webhook_url: None,
161160
tags: None,
162161
network: Box::new(models::ServersCreateServerNetworkRequest {
163162
mode: Some(models::ServersNetworkMode::Bridge),
@@ -202,7 +201,6 @@ async fn list_builds_with_tags() -> GlobalResult<()> {
202201
environment: Some(HashMap::new()),
203202
image: ctx.image_id,
204203
kill_timeout: Some(0),
205-
webhook_url: None,
206204
tags: None,
207205
network: Box::new(models::ServersCreateServerNetworkRequest {
208206
mode: Some(models::ServersNetworkMode::Bridge),

svc/pkg/ds/db/servers/migrations/20240501133910_init.up.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ CREATE TABLE servers (
1010
resources_cpu_millicores INT NOT NULL,
1111
resources_memory_mib INT NOT NULL,
1212
kill_timeout_ms INT NOT NULL,
13-
webhook_url STRING,
1413

1514
create_ts INT NOT NULL,
1615
start_ts INT,

svc/pkg/ds/ops/server-create/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ pub async fn handle(
192192
resources_cpu_millicores,
193193
resources_memory_mib,
194194
kill_timeout_ms,
195-
webhook_url,
196195
create_ts,
197196
image_id,
198197
args,
@@ -247,7 +246,6 @@ pub async fn handle(
247246
resources.cpu_millicores,
248247
resources.memory_mib,
249248
ctx.kill_timeout_ms,
250-
ctx.webhook_url.clone(),
251249
create_ts, // 10
252250
unwrap!(ctx.image_id).as_uuid(),
253251
&ctx.args,
@@ -1400,7 +1398,6 @@ pub async fn handle(
14001398
memory_mib: resources.memory_mib,
14011399
}),
14021400
kill_timeout_ms: ctx.kill_timeout_ms,
1403-
webhook_url: ctx.webhook_url.clone(),
14041401
create_ts,
14051402
start_ts: None,
14061403
destroy_ts: None,

svc/pkg/ds/ops/server-create/tests/integration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ async fn create(ctx: TestCtx) {
105105
datacenter_id: faker_region.region_id,
106106
resources: Some(proto::backend::ds::ServerResources { cpu_millicores: 100, memory_mib: 200 }),
107107
kill_timeout_ms: 0,
108-
webhook_url: Some("https://rivettest.free.beeceptor.com".to_string()),
108+
// webhook_url: Some("https://rivettest.free.beeceptor.com".to_string()),
109109
tags: vec![(String::from("test"), String::from("123"))]
110110
.into_iter()
111111
.collect(),

svc/pkg/ds/ops/server-get/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ struct Server {
1313
resources_cpu_millicores: i64,
1414
resources_memory_mib: i64,
1515
kill_timeout_ms: i64,
16-
webhook_url: Option<String>,
1716
create_ts: i64,
1817
start_ts: Option<i64>,
1918
destroy_ts: Option<i64>,
@@ -83,7 +82,6 @@ pub async fn handle(
8382
resources_cpu_millicores,
8483
resources_memory_mib,
8584
kill_timeout_ms,
86-
webhook_url,
8785
create_ts,
8886
start_ts,
8987
destroy_ts,
@@ -218,7 +216,6 @@ pub async fn handle(
218216
memory_mib: server.resources_memory_mib.try_into()?,
219217
}),
220218
kill_timeout_ms: server.kill_timeout_ms,
221-
webhook_url: server.webhook_url,
222219
args: server.args,
223220
environment,
224221
image_id: Some(server.image_id.into()),

svc/pkg/ds/proto/server-create.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ import "proto/common.proto";
66
import "proto/backend/ds.proto";
77

88
message Request {
9+
reserved 8;
10+
911
rivet.common.Uuid game_id = 1;
1012
rivet.common.Uuid datacenter_id = 2;
1113
rivet.common.Uuid cluster_id = 3;
1214
map<string, string> tags = 5;
1315
rivet.backend.ds.ServerResources resources = 6;
1416
int64 kill_timeout_ms = 7;
15-
optional string webhook_url = 8;
1617
rivet.common.Uuid image_id = 9;
1718
repeated string args = 10;
1819
rivet.backend.ds.NetworkMode network_mode = 11;

0 commit comments

Comments
 (0)