Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ target/
*.so
*.pyd
*.dylib
.dlt/
.amp/portals/*
/.env

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::python_plan::main::upstream_closure::upstream_closure;
use crate::python_plan::models::{LifecycleNode, RunLifecycle};
use crate::python_selection::constants::{ASSET_KIND, LOADER_KIND, TASK_KIND};

/// Ingress is every selected warehouse loader and its selected upstream tasks, assets and loaders.
/// Ingress is every selected loader and its selected upstream tasks, assets and loaders.
#[must_use]
pub fn run_lifecycle(
selected: &BTreeSet<String>,
Expand All @@ -19,7 +19,7 @@ pub fn run_lifecycle(
.filter(|name| {
nodes
.get(name.as_str())
.is_some_and(|node| node.kind == LOADER_KIND && !node.external_loader)
.is_some_and(|node| node.kind == LOADER_KIND)
})
.cloned()
.collect();
Expand Down
2 changes: 0 additions & 2 deletions crates/sqlbuild-analysis/src/python_plan/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
pub struct LifecycleNode {
/// `task`, `asset`, `loader` or `check`.
pub kind: String,
/// Whether the node is a loader that owns its own warehouse connection.
pub external_loader: bool,
}

/// Selected Python nodes split into ingress and read-side regions, each sorted.
Expand Down
5 changes: 2 additions & 3 deletions crates/sqlbuild-analysis/src/python_plan/tests/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ pub(crate) fn edges(rows: &[(&str, &[&str])]) -> HashMap<String, Vec<String>> {
.collect()
}

pub(crate) fn lifecycle_nodes(rows: &[(&str, &str, bool)]) -> HashMap<String, LifecycleNode> {
pub(crate) fn lifecycle_nodes(rows: &[(&str, &str)]) -> HashMap<String, LifecycleNode> {
rows.iter()
.map(|(name, kind, external_loader)| {
.map(|(name, kind)| {
(
(*name).to_owned(),
LifecycleNode {
kind: (*kind).to_owned(),
external_loader: *external_loader,
},
)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,26 @@ use crate::python_plan::tests::test_types::LifecycleTestCase;
fn given_selection_when_classifying_lifecycle_then_matches_python_regions() {
let test_cases = [
LifecycleTestCase {
description: "a warehouse loader pulls its selected upstream tasks into ingress",
description: "a loader pulls its selected upstream tasks into ingress",
selected: &["fetch_rates", "load_orders", "report", "check_orders"],
nodes: &[
("fetch_rates", "task", false),
("load_orders", "loader", false),
("report", "asset", false),
("check_orders", "check", false),
("fetch_rates", "task"),
("load_orders", "loader"),
("report", "asset"),
("check_orders", "check"),
],
upstream: &[("load_orders", &["fetch_rates", "unselected"])],
expected_ingress: &["fetch_rates", "load_orders"],
expected_loaders: &["load_orders"],
expected_read_side: &["report"],
},
LifecycleTestCase {
description: "external loaders are neither ingress loaders nor read-side nodes",
selected: &["sync_orders", "export"],
nodes: &[("sync_orders", "loader", true), ("export", "task", false)],
upstream: &[("export", &["sync_orders"])],
expected_ingress: &[],
expected_loaders: &[],
expected_read_side: &["export"],
},
LifecycleTestCase {
description: "a selected external loader upstream of a warehouse loader is ingress",
description: "a selected loader upstream of another loader is ingress",
selected: &["sync_orders", "load_orders"],
nodes: &[
("sync_orders", "loader", true),
("load_orders", "loader", false),
],
nodes: &[("sync_orders", "loader"), ("load_orders", "loader")],
upstream: &[("load_orders", &["sync_orders"])],
expected_ingress: &["load_orders", "sync_orders"],
expected_loaders: &["load_orders"],
expected_loaders: &["load_orders", "sync_orders"],
expected_read_side: &[],
},
];
Expand Down
4 changes: 2 additions & 2 deletions crates/sqlbuild-analysis/src/python_plan/tests/test_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ pub(crate) struct ClosureTestCase {
pub(crate) struct LifecycleTestCase {
pub(crate) description: &'static str,
pub(crate) selected: &'static [&'static str],
/// `(name, kind, external loader)`.
pub(crate) nodes: &'static [(&'static str, &'static str, bool)],
/// `(name, kind)`.
pub(crate) nodes: &'static [(&'static str, &'static str)],
pub(crate) upstream: &'static [(&'static str, &'static [&'static str])],
pub(crate) expected_ingress: &'static [&'static str],
pub(crate) expected_loaders: &'static [&'static str],
Expand Down
10 changes: 1 addition & 9 deletions crates/sqlbuild-cache/src/hosted_shapes/constants.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! The Python shape names of the natively hosted compiler shapes.

/// The Python model type a natively hosted compiler shape is captured as.
pub const HOSTED_SHAPE_TYPES: [(&str, &str); 490] = [
pub const HOSTED_SHAPE_TYPES: [(&str, &str); 488] = [
(
"sqlbuild._native:AlignedInterval",
"sqlbuild.cursor_algebra.models:AlignedInterval",
Expand Down Expand Up @@ -822,10 +822,6 @@ pub const HOSTED_SHAPE_TYPES: [(&str, &str); 490] = [
"sqlbuild._native:IntegerValue",
"sqlbuild.cursor_algebra.models:IntegerValue",
),
(
"sqlbuild._native:IntegrationLoaderConfig",
"sqlbuild.spec.contracts.models:IntegrationLoaderConfig",
),
(
"sqlbuild._native:InterpolationSite",
"sqlbuild.lint.models:InterpolationSite",
Expand Down Expand Up @@ -900,10 +896,6 @@ pub const HOSTED_SHAPE_TYPES: [(&str, &str); 490] = [
"sqlbuild._native:LoadedMacro",
"sqlbuild.compiler.compile.models:LoadedMacro",
),
(
"sqlbuild._native:LoaderConnectionMode",
"sqlbuild.compiler.discovery.types:LoaderConnectionMode",
),
(
"sqlbuild._native:LoaderDestinationParts",
"sqlbuild.spec.contracts.models:LoaderDestinationParts",
Expand Down
9 changes: 4 additions & 5 deletions crates/sqlbuild-core/src/cli_text/_helpers/plan_sections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,10 @@ pub(crate) fn python_entry_lines(
}

fn source_load_label(entry: &SourceLoadPlanText) -> String {
let strategy: String = match (&entry.integration_kind, &entry.write_strategy) {
(Some(kind), _) => format!("external ({kind})"),
(None, Some(strategy)) => strategy.clone(),
(None, None) => "self-managed".to_owned(),
};
let strategy: String = entry
.write_strategy
.clone()
.unwrap_or_else(|| "self-managed".to_owned());
let mut details: Vec<String> = Vec::new();
if let Some(column) = &entry.cursor_column {
details.push(format!("cursor: {column}"));
Expand Down
1 change: 0 additions & 1 deletion crates/sqlbuild-core/src/cli_text/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ pub struct SourceLoadPlanText {
/// `ExecutionResourceKind` value; only `loader` and `source` loads are listed.
pub resource_kind: String,
pub is_reload: bool,
pub integration_kind: Option<String>,
pub write_strategy: Option<String>,
pub cursor_column: Option<String>,
pub unique_key: Vec<String>,
Expand Down
173 changes: 0 additions & 173 deletions crates/sqlbuild-core/src/dlt_destination/_helpers/credentials.rs

This file was deleted.

2 changes: 0 additions & 2 deletions crates/sqlbuild-core/src/dlt_destination/_helpers/mod.rs

This file was deleted.

48 changes: 0 additions & 48 deletions crates/sqlbuild-core/src/dlt_destination/_helpers/request.rs

This file was deleted.

Loading
Loading