Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Commit e8d9f65

Browse files
merge: #3497
3497: Remove unused schema variant def module and unused auth prototype code (ENG-2426) r=nickgerace a=nickgerace ## Description `SchemaVariantDefinition` no longer exists in the new engine, so this PR removes its remains from the dal. <img src="https://media0.giphy.com/media/kVgCBJOy3PuHdqT5xQ/giphy.gif"/> ## Additional Note This is a follow-up to #3474. Co-authored-by: Nick Gerace <nick@systeminit.com>
2 parents 39cdae2 + fb9e426 commit e8d9f65

4 files changed

Lines changed: 2 additions & 530 deletions

File tree

lib/dal/src/authentication_prototype.rs

Lines changed: 2 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,10 @@
1-
use std::default::Default;
2-
31
use serde::{Deserialize, Serialize};
4-
use thiserror::Error;
5-
6-
use si_data_nats::NatsError;
7-
use si_data_pg::PgError;
8-
use telemetry::prelude::*;
9-
10-
use crate::{
11-
pk, ComponentId, FuncId, HistoryEventError, SchemaVariantId, StandardModelError,
12-
TransactionsError, WsEventError,
13-
};
14-
15-
#[remain::sorted]
16-
#[derive(Error, Debug)]
17-
pub enum AuthenticationPrototypeError {
18-
#[error("this schema variant({0}) already has an authentication function")]
19-
AuthAlreadySet(SchemaVariantId),
20-
#[error("component error: {0}")]
21-
Component(String),
22-
#[error("component not found: {0}")]
23-
ComponentNotFound(ComponentId),
24-
#[error("action Func {0} not found for ActionPrototype {1}")]
25-
FuncNotFound(FuncId, AuthenticationPrototypeId),
26-
#[error("history event error: {0}")]
27-
HistoryEvent(#[from] HistoryEventError),
28-
#[error("nats txn error: {0}")]
29-
Nats(#[from] NatsError),
30-
#[error("pg error: {0}")]
31-
Pg(#[from] PgError),
32-
#[error("schema not found")]
33-
SchemaNotFound,
34-
#[error("schema variant not found")]
35-
SchemaVariantNotFound,
36-
#[error("error serializing/deserializing json: {0}")]
37-
SerdeJson(#[from] serde_json::Error),
38-
#[error("standard model error: {0}")]
39-
StandardModelError(#[from] StandardModelError),
40-
#[error("transactions error: {0}")]
41-
Transactions(#[from] TransactionsError),
42-
#[error(transparent)]
43-
WsEvent(#[from] WsEventError),
44-
}
45-
46-
pub type AuthenticationPrototypeResult<T> = Result<T, AuthenticationPrototypeError>;
47-
48-
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq, Copy)]
49-
pub struct AuthenticationPrototypeContext {
50-
pub schema_variant_id: SchemaVariantId,
51-
}
52-
53-
// Hrm - is this a universal resolver context? -- Adam
54-
impl Default for AuthenticationPrototypeContext {
55-
fn default() -> Self {
56-
Self::new(SchemaVariantId::NONE)
57-
}
58-
}
592

60-
impl AuthenticationPrototypeContext {
61-
pub fn new(schema_variant_id: SchemaVariantId) -> Self {
62-
Self { schema_variant_id }
63-
}
64-
65-
pub fn schema_variant_id(&self) -> SchemaVariantId {
66-
self.schema_variant_id
67-
}
68-
69-
pub fn set_schema_variant_id(&mut self, schema_variant_id: SchemaVariantId) {
70-
self.schema_variant_id = schema_variant_id;
71-
}
72-
}
3+
use crate::{pk, FuncId, SchemaVariantId};
734

745
pk!(AuthenticationPrototypeId);
756

76-
// An ActionPrototype joins a `FuncId` to a `SchemaVariantId` with a `ActionKind` and `name`
77-
// This only exists for deserialization of the import data
7+
// TODO(nick): remove this once import can just create the edge.
788
#[derive(Deserialize, Serialize, Debug, Clone, PartialEq, Eq)]
799
pub struct AuthenticationPrototype {
8010
pub id: AuthenticationPrototypeId,

lib/dal/src/schema/variant.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ use crate::{FuncBackendResponseType, InputSocketId};
5454

5555
use self::root_prop::RootPropChild;
5656

57-
pub mod definition;
5857
pub mod leaves;
5958
pub mod root_prop;
6059

0 commit comments

Comments
 (0)