Skip to content

Commit da137a8

Browse files
committed
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 e55816e commit da137a8

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
@@ -170,6 +170,7 @@ pub struct DatabaseDef {
170170
pub num_replicas: Option<NonZeroU8>,
171171
/// The host type of the supplied program.
172172
pub host_type: HostType,
173+
pub parent: Option<Identity>,
173174
}
174175

175176
/// 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
@@ -679,6 +679,8 @@ pub struct PublishDatabaseQueryParams {
679679
policy: MigrationPolicy,
680680
#[serde(default)]
681681
host_type: HostType,
682+
#[allow(unused)] // ignore for now
683+
parent: Option<NameOrIdentity>,
682684
}
683685

684686
pub async fn publish<S: NodeDelegate + ControlStateDelegate>(
@@ -690,6 +692,7 @@ pub async fn publish<S: NodeDelegate + ControlStateDelegate>(
690692
token,
691693
policy,
692694
host_type,
695+
parent: _, // ignore for now
693696
}): Query<PublishDatabaseQueryParams>,
694697
Extension(auth): Extension<SpacetimeAuth>,
695698
program_bytes: Bytes,
@@ -760,6 +763,7 @@ pub async fn publish<S: NodeDelegate + ControlStateDelegate>(
760763
program_bytes,
761764
num_replicas,
762765
host_type,
766+
parent: None,
763767
},
764768
schema_migration_policy,
765769
)
@@ -912,6 +916,7 @@ pub async fn pre_publish<S: NodeDelegate + ControlStateDelegate>(
912916
program_bytes,
913917
num_replicas: None,
914918
host_type,
919+
parent: None,
915920
},
916921
style,
917922
)

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)