From 0f110ff755f728e31750e40bf7e3a148d283d545 Mon Sep 17 00:00:00 2001 From: andrussal Date: Sun, 8 Mar 2026 15:52:57 +0100 Subject: [PATCH] Separate runtime internals from public modules --- .../core/src/scenario/definition/model.rs | 3 +-- .../src/scenario/definition/validation.rs | 5 +---- .../core/src/scenario/runtime/internal/mod.rs | 13 ++++++++++++ .../{ => internal}/orchestration/mod.rs | 0 .../source_orchestration_plan.rs | 0 .../orchestration/source_resolver.rs | 12 +++++------ .../providers/attach_provider.rs | 0 .../providers/external_provider.rs | 0 .../providers/managed_provider.rs | 2 +- .../runtime/{ => internal}/providers/mod.rs | 0 .../providers/source_providers.rs | 0 .../core/src/scenario/runtime/mod.rs | 20 ++++++++----------- 12 files changed, 29 insertions(+), 26 deletions(-) create mode 100644 testing-framework/core/src/scenario/runtime/internal/mod.rs rename testing-framework/core/src/scenario/runtime/{ => internal}/orchestration/mod.rs (100%) rename testing-framework/core/src/scenario/runtime/{ => internal}/orchestration/source_orchestration_plan.rs (100%) rename testing-framework/core/src/scenario/runtime/{ => internal}/orchestration/source_resolver.rs (92%) rename testing-framework/core/src/scenario/runtime/{ => internal}/providers/attach_provider.rs (100%) rename testing-framework/core/src/scenario/runtime/{ => internal}/providers/external_provider.rs (100%) rename testing-framework/core/src/scenario/runtime/{ => internal}/providers/managed_provider.rs (97%) rename testing-framework/core/src/scenario/runtime/{ => internal}/providers/mod.rs (100%) rename testing-framework/core/src/scenario/runtime/{ => internal}/providers/source_providers.rs (100%) diff --git a/testing-framework/core/src/scenario/definition/model.rs b/testing-framework/core/src/scenario/definition/model.rs index d0c792a..ca6ecc6 100644 --- a/testing-framework/core/src/scenario/definition/model.rs +++ b/testing-framework/core/src/scenario/definition/model.rs @@ -7,8 +7,7 @@ use crate::{ scenario::{ Application, ClusterControlProfile, ClusterMode, DeploymentPolicy, DynError, ExistingCluster, ExternalNodeSource, HttpReadinessRequirement, expectation::Expectation, - runtime::orchestration::SourceOrchestrationPlan, sources::ScenarioSources, - workload::Workload, + runtime::SourceOrchestrationPlan, sources::ScenarioSources, workload::Workload, }, topology::DynTopologyError, }; diff --git a/testing-framework/core/src/scenario/definition/validation.rs b/testing-framework/core/src/scenario/definition/validation.rs index 86876b2..463f6cb 100644 --- a/testing-framework/core/src/scenario/definition/validation.rs +++ b/testing-framework/core/src/scenario/definition/validation.rs @@ -6,10 +6,7 @@ use super::model::ScenarioBuildError; use crate::scenario::{ Application, ClusterControlProfile, ClusterMode, DynError, RequiresNodeControl, expectation::Expectation, - runtime::{ - context::RunMetrics, - orchestration::{SourceOrchestrationPlan, SourceOrchestrationPlanError}, - }, + runtime::{SourceOrchestrationPlan, SourceOrchestrationPlanError, context::RunMetrics}, sources::ScenarioSources, workload::Workload, }; diff --git a/testing-framework/core/src/scenario/runtime/internal/mod.rs b/testing-framework/core/src/scenario/runtime/internal/mod.rs new file mode 100644 index 0000000..4042969 --- /dev/null +++ b/testing-framework/core/src/scenario/runtime/internal/mod.rs @@ -0,0 +1,13 @@ +mod orchestration; +mod providers; + +pub use orchestration::{ + ManagedSource, SourceOrchestrationPlan, SourceOrchestrationPlanError, + build_source_orchestration_plan, orchestrate_sources, orchestrate_sources_with_providers, + resolve_sources, +}; +pub use providers::{ + ApplicationExternalProvider, AttachProvider, AttachProviderError, AttachedNode, ExternalNode, + ExternalProviderError, ManagedProviderError, ManagedProvisionedNode, SourceProviders, + StaticManagedProvider, +}; diff --git a/testing-framework/core/src/scenario/runtime/orchestration/mod.rs b/testing-framework/core/src/scenario/runtime/internal/orchestration/mod.rs similarity index 100% rename from testing-framework/core/src/scenario/runtime/orchestration/mod.rs rename to testing-framework/core/src/scenario/runtime/internal/orchestration/mod.rs diff --git a/testing-framework/core/src/scenario/runtime/orchestration/source_orchestration_plan.rs b/testing-framework/core/src/scenario/runtime/internal/orchestration/source_orchestration_plan.rs similarity index 100% rename from testing-framework/core/src/scenario/runtime/orchestration/source_orchestration_plan.rs rename to testing-framework/core/src/scenario/runtime/internal/orchestration/source_orchestration_plan.rs diff --git a/testing-framework/core/src/scenario/runtime/orchestration/source_resolver.rs b/testing-framework/core/src/scenario/runtime/internal/orchestration/source_resolver.rs similarity index 92% rename from testing-framework/core/src/scenario/runtime/orchestration/source_resolver.rs rename to testing-framework/core/src/scenario/runtime/internal/orchestration/source_resolver.rs index d6f822b..7c6895b 100644 --- a/testing-framework/core/src/scenario/runtime/orchestration/source_resolver.rs +++ b/testing-framework/core/src/scenario/runtime/internal/orchestration/source_resolver.rs @@ -1,15 +1,13 @@ use std::sync::Arc; +use super::{SourceOrchestrationMode, SourceOrchestrationPlan, SourceOrchestrationPlanError}; use crate::scenario::{ Application, DynError, NodeClients, Scenario, runtime::{ - orchestration::{ - SourceOrchestrationMode, SourceOrchestrationPlan, SourceOrchestrationPlanError, - }, - providers::{ - ApplicationExternalProvider, AttachProviderError, AttachedNode, ExternalNode, - ExternalProviderError, ManagedProviderError, ManagedProvisionedNode, SourceProviders, - StaticManagedProvider, + ApplicationExternalProvider, AttachProviderError, AttachedNode, SourceProviders, + StaticManagedProvider, + internal::{ + ExternalNode, ExternalProviderError, ManagedProviderError, ManagedProvisionedNode, }, }, }; diff --git a/testing-framework/core/src/scenario/runtime/providers/attach_provider.rs b/testing-framework/core/src/scenario/runtime/internal/providers/attach_provider.rs similarity index 100% rename from testing-framework/core/src/scenario/runtime/providers/attach_provider.rs rename to testing-framework/core/src/scenario/runtime/internal/providers/attach_provider.rs diff --git a/testing-framework/core/src/scenario/runtime/providers/external_provider.rs b/testing-framework/core/src/scenario/runtime/internal/providers/external_provider.rs similarity index 100% rename from testing-framework/core/src/scenario/runtime/providers/external_provider.rs rename to testing-framework/core/src/scenario/runtime/internal/providers/external_provider.rs diff --git a/testing-framework/core/src/scenario/runtime/providers/managed_provider.rs b/testing-framework/core/src/scenario/runtime/internal/providers/managed_provider.rs similarity index 97% rename from testing-framework/core/src/scenario/runtime/providers/managed_provider.rs rename to testing-framework/core/src/scenario/runtime/internal/providers/managed_provider.rs index 5eea666..a5ef529 100644 --- a/testing-framework/core/src/scenario/runtime/providers/managed_provider.rs +++ b/testing-framework/core/src/scenario/runtime/internal/providers/managed_provider.rs @@ -1,6 +1,6 @@ use async_trait::async_trait; -use crate::scenario::{Application, DynError, runtime::orchestration::ManagedSource}; +use crate::scenario::{Application, DynError, runtime::ManagedSource}; /// Managed node produced by the managed provider path. #[derive(Clone, Debug)] diff --git a/testing-framework/core/src/scenario/runtime/providers/mod.rs b/testing-framework/core/src/scenario/runtime/internal/providers/mod.rs similarity index 100% rename from testing-framework/core/src/scenario/runtime/providers/mod.rs rename to testing-framework/core/src/scenario/runtime/internal/providers/mod.rs diff --git a/testing-framework/core/src/scenario/runtime/providers/source_providers.rs b/testing-framework/core/src/scenario/runtime/internal/providers/source_providers.rs similarity index 100% rename from testing-framework/core/src/scenario/runtime/providers/source_providers.rs rename to testing-framework/core/src/scenario/runtime/internal/providers/source_providers.rs diff --git a/testing-framework/core/src/scenario/runtime/mod.rs b/testing-framework/core/src/scenario/runtime/mod.rs index 33420c3..c5cfa01 100644 --- a/testing-framework/core/src/scenario/runtime/mod.rs +++ b/testing-framework/core/src/scenario/runtime/mod.rs @@ -1,27 +1,23 @@ pub mod context; mod deployer; +mod internal; mod inventory; pub mod metrics; mod node_clients; -pub mod orchestration; -pub mod providers; pub mod readiness; mod runner; use async_trait::async_trait; pub use context::{CleanupGuard, RunContext, RunHandle, RunMetrics, RuntimeAssembly}; pub use deployer::{Deployer, ScenarioError}; +#[doc(hidden)] +pub use internal::{ + ApplicationExternalProvider, AttachProvider, AttachProviderError, AttachedNode, ManagedSource, + SourceOrchestrationPlan, SourceOrchestrationPlanError, SourceProviders, StaticManagedProvider, + build_source_orchestration_plan, orchestrate_sources, orchestrate_sources_with_providers, + resolve_sources, +}; pub use node_clients::NodeClients; -#[doc(hidden)] -pub use orchestration::{ - ManagedSource, SourceOrchestrationPlan, build_source_orchestration_plan, orchestrate_sources, - orchestrate_sources_with_providers, resolve_sources, -}; -#[doc(hidden)] -pub use providers::{ - ApplicationExternalProvider, AttachProvider, AttachProviderError, AttachedNode, - SourceProviders, StaticManagedProvider, -}; pub use readiness::{ HttpReadinessRequirement, ReadinessError, StabilizationConfig, wait_for_http_ports, wait_for_http_ports_with_host, wait_for_http_ports_with_host_and_requirement,