Skip to content

Commit ab1ff72

Browse files
committed
docs: consolidate method comments
1 parent c17c5ff commit ab1ff72

3 files changed

Lines changed: 3 additions & 41 deletions

File tree

rust/operator-binary/src/controller/build/properties/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ pub mod webserver_config;
88
/// The names of the Airflow config files assembled into the rolegroup `ConfigMap`.
99
///
1010
/// This is the single source of truth for the on-disk file names; nothing else should hard-code
11-
/// them (the Vector agent config is the exception — its name comes from the upstream
12-
/// `product_logging::framework::VECTOR_CONFIG_FILE` constant).
11+
/// them (the Vector agent config is the exception).
1312
#[derive(Clone, Copy, Debug, strum::Display)]
1413
pub enum ConfigFileName {
1514
#[strum(serialize = "webserver_config.py")]

rust/operator-binary/src/controller/mod.rs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -68,31 +68,19 @@ pub struct ValidatedRoleConfig {
6868
}
6969

7070
/// Per-rolegroup configuration: the merged CRD config plus overrides.
71-
///
72-
/// This is the generic [`stackable_operator::v2::role_utils::RoleGroupConfig`]: the merged config
73-
/// fragment in `config`, the typed `config_overrides` (role-group merged over role) and the merged
74-
/// `env_overrides`/`cli_overrides`/`pod_overrides`. The config overrides are kept typed
75-
/// ([`AirflowConfigOverrides`]) and flattened into the rendered config file later, in the build step.
7671
pub type AirflowRoleGroupConfig = stackable_operator::v2::role_utils::RoleGroupConfig<
7772
ValidatedAirflowConfig,
7873
stackable_operator::v2::role_utils::GenericCommonConfig,
7974
AirflowConfigOverrides,
8075
>;
8176

8277
/// A validated, merged Airflow role-group config: the merged [`AirflowConfig`] with its raw
83-
/// `logging` replaced by the up-front-validated [`ValidatedLogging`] (so an invalid custom log
84-
/// ConfigMap name or a missing Vector aggregator name fails reconciliation during validation).
85-
// Not `Clone`/`Debug`/`PartialEq`: `git_sync_resources` (a `GitSyncResources`) implements none of
86-
// them, mirroring nifi's `ValidatedNifiConfig`.
78+
/// `logging` replaced by the up-front-validated [`ValidatedLogging`].
8779
pub struct ValidatedAirflowConfig {
8880
pub resources: Resources<AirflowStorageConfig, NoRuntimeLimits>,
8981
pub logging: ValidatedLogging,
9082
pub affinity: StackableAffinity,
9183
pub graceful_shutdown_timeout: Option<Duration>,
92-
/// The git-sync resources (containers, volumes, mounts) for the DAGs, resolved up-front in the
93-
/// [`validate`] step (the env vars and logging differ per role group / executor, so they are
94-
/// computed there). Consumed by the StatefulSet, executor-template and env-var builders, which
95-
/// read it off here rather than reconstructing it.
9684
pub git_sync_resources: git_sync::v1alpha2::GitSyncResources,
9785
}
9886

@@ -143,10 +131,6 @@ pub struct ValidatedExecutorTemplate {
143131
}
144132

145133
/// Validated logging configuration for the containers of a role-group (or Kubernetes-executor) Pod.
146-
///
147-
/// `product_container` holds the validated log-config choice of the product's main container
148-
/// (`Container::Airflow` for the role groups, `Container::Base` for the Kubernetes-executor pod
149-
/// template). `git_sync_container` holds the log config of the git-sync sidecar (DAG fetching).
150134
#[derive(Clone, Debug, PartialEq)]
151135
pub struct ValidatedLogging {
152136
pub product_container: ValidatedContainerLogConfigChoice,
@@ -323,9 +307,6 @@ impl ValidatedCluster {
323307
}
324308

325309
/// Type-safe names for the resources of a role group.
326-
///
327-
/// Infallible: the combined name length was validated during cluster validation
328-
/// (see `validate::validate_cluster`).
329310
pub fn resource_names(
330311
&self,
331312
role_name: &RoleName,
@@ -399,9 +380,6 @@ impl ValidatedCluster {
399380

400381
/// Returns an [`ObjectMetaBuilder`] pre-filled with the namespace, the resource `name`, an owner
401382
/// reference back to this cluster, and the given recommended `labels`.
402-
///
403-
/// Consolidates the metadata chain repeated by the child-resource builders. Call sites that need
404-
/// extra labels or annotations chain them onto the returned builder before `.build()`.
405383
pub(crate) fn object_meta(&self, name: impl Into<String>, labels: Labels) -> ObjectMetaBuilder {
406384
let mut builder = ObjectMetaBuilder::new();
407385
builder

rust/operator-binary/src/controller/validate.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -259,17 +259,7 @@ pub fn validate_cluster(
259259
))
260260
}
261261

262-
/// Validate and merge one role group against its role, via the shared
263-
/// [`with_validated_config`] from `operator-rs`, returning the generic
264-
/// [`stackable_operator::v2::role_utils::RoleGroupConfig`].
265-
///
266-
/// This performs the full `default → role → role-group` merge of the config fragment (then
267-
/// validates it) *and* the role←role-group merge of the overrides in one step. The config
268-
/// overrides are kept *typed* ([`AirflowConfigOverrides`]); flattening into the rendered
269-
/// `webserver_config.py` happens later, in the build step.
270-
///
271-
/// Note the override `Merge` semantics: a role-group `null` inherits the role-level value rather
272-
/// than unsetting it (config overrides), and env overrides layer role-group on top of role.
262+
/// Validate and merge one role group against its role.
273263
#[allow(clippy::too_many_arguments)]
274264
fn validate_role_group(
275265
role: &AirflowRoleType,
@@ -335,11 +325,6 @@ fn validate_role_group(
335325
///
336326
/// `product_container` selects the product's main container (`Container::Airflow` for the role
337327
/// groups, `Container::Base` for the Kubernetes-executor pod template).
338-
///
339-
/// `vector_aggregator_config_map_name` is the discovery ConfigMap name of the Vector aggregator;
340-
/// it is required (and validated) only when the Vector agent is enabled. Mirrors hive's
341-
/// `validate_logging`. Used both per-role-group (here) and for the Kubernetes executor pod template
342-
/// (which is not a [`AirflowRole`] with role groups, so it is validated from the build step).
343328
pub(crate) fn validate_logging(
344329
logging: &Logging<Container>,
345330
product_container: &Container,

0 commit comments

Comments
 (0)