Skip to content

Commit f07238c

Browse files
committed
[teams 2/5] client-api: Add parent parameter to publish endpoint
This is the minimal patch to implement the private controldb side of the teams feature. The parameter is ignored for now.
1 parent e0b8e6f commit f07238c

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

crates/client-api/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ pub struct DatabaseDef {
163163
pub num_replicas: Option<NonZeroU8>,
164164
/// The host type of the supplied program.
165165
pub host_type: HostType,
166+
pub parent: Option<Identity>,
166167
}
167168

168169
/// Parameters for resetting a database via [`ControlStateDelegate::reset_database`].

crates/client-api/src/routes/database.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,8 @@ pub struct PublishDatabaseQueryParams {
681681
policy: MigrationPolicy,
682682
#[serde(default)]
683683
host_type: HostType,
684+
#[allow(unused)] // ignore for now
685+
parent: Option<NameOrIdentity>,
684686
}
685687

686688
pub async fn publish<S: NodeDelegate + ControlStateDelegate>(
@@ -692,6 +694,7 @@ pub async fn publish<S: NodeDelegate + ControlStateDelegate>(
692694
token,
693695
policy,
694696
host_type,
697+
parent: _, // ignore for now
695698
}): Query<PublishDatabaseQueryParams>,
696699
Extension(auth): Extension<SpacetimeAuth>,
697700
program_bytes: Bytes,
@@ -762,6 +765,7 @@ pub async fn publish<S: NodeDelegate + ControlStateDelegate>(
762765
program_bytes,
763766
num_replicas,
764767
host_type,
768+
parent: None,
765769
},
766770
schema_migration_policy,
767771
)
@@ -914,6 +918,7 @@ pub async fn pre_publish<S: NodeDelegate + ControlStateDelegate>(
914918
program_bytes,
915919
num_replicas: None,
916920
host_type,
921+
parent: None,
917922
},
918923
style,
919924
)

crates/testing/src/modules.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ impl CompiledModule {
210210
program_bytes: self.program_bytes(),
211211
num_replicas: None,
212212
host_type: self.host_type,
213+
parent: None,
213214
},
214215
MigrationPolicy::Compatible,
215216
)

0 commit comments

Comments
 (0)