pub struct DataflowSession {
pub build_id: Option<BuildId>,
pub session_id: SessionId,
pub git_sources: BTreeMap<NodeId, GitSource>,
pub local_build: Option<BuildInfo>,
pub build_fingerprint: Option<String>,
pub resolved_dataflow: Option<Descriptor>,
pub source_fingerprint: Option<String>,
}Fields§
§build_id: Option<BuildId>§session_id: SessionId§git_sources: BTreeMap<NodeId, GitSource>§local_build: Option<BuildInfo>§build_fingerprint: Option<String>FNV-1a 64-bit hex digest of the resolved descriptor’s build-inputs.
None on sessions written before this field was introduced (treated
as “unknown” — invalidate_if_build_inputs_changed clears and rewrites).
resolved_dataflow: Option<Descriptor>The dataflow descriptor with hub: references desugared into concrete
git nodes, as built. dora start / dora run re-read the YAML from
disk, which still contains unresolved hub: fields — they use this
resolved form instead. None when the dataflow has no hub nodes.
source_fingerprint: Option<String>FNV-1a digest of the expanded (pre-desugar) descriptor as built. For a
hub dataflow the on-disk YAML can’t be re-fingerprinted directly (its
hub: references are unresolved, so kind() rejects them), so
dora start / dora daemon --run-dataflow compare this instead to
detect any on-disk edit since the build. None for non-hub dataflows.
Implementations§
Source§impl DataflowSession
impl DataflowSession
pub fn read_session(dataflow_path: &Path) -> Result<Self>
pub fn write_out_for_dataflow(&self, dataflow_path: &Path) -> Result<()>
Sourcepub fn fingerprint_source(descriptor: &Descriptor) -> Option<String>
pub fn fingerprint_source(descriptor: &Descriptor) -> Option<String>
Digest of the expanded (pre-desugar) descriptor. Used to detect any
on-disk edit to a hub dataflow since its build, since the on-disk YAML
can’t be re-fingerprinted via fingerprint_build_inputs (its hub:
references are unresolved). Returns None if serialization fails.
Sourcepub fn fingerprint_build_inputs(
resolved_nodes: &BTreeMap<NodeId, ResolvedNode>,
) -> String
pub fn fingerprint_build_inputs( resolved_nodes: &BTreeMap<NodeId, ResolvedNode>, ) -> String
Compute the build-inputs fingerprint over the resolved descriptor.
Inputs (anything that affects what dora build produces):
- per-node
buildcommand (Custom-kind nodes) - per-node
source(Local vs GitBranch with repo + branch/tag/rev) - per-node
env(sorted map, Display’d values — covers global env after resolve_aliases_and_set_defaults merges it) - per-node
deploy.working_dir(changes shift the cwd cargo/python runs in) - per-operator
buildcommand and source-kind tag (Runtime-kind nodes — distinguishes Python vs SharedLibrary vs Wasm because switching kinds is a build-system change)
Deliberately ignored (don’t affect the build):
path— where the artifact is read from at start time, not built to- operator
python:/shared-library:/wasm:path values, andconda_env— runtime artifact pointers, symmetric topathon Custom nodes deploy.machine— affects placement at start time, not build inputs
Discussed in #1444 + extended in #1947 review.
Sourcepub fn invalidate_if_build_inputs_changed(
&mut self,
resolved_nodes: &BTreeMap<NodeId, ResolvedNode>,
) -> bool
pub fn invalidate_if_build_inputs_changed( &mut self, resolved_nodes: &BTreeMap<NodeId, ResolvedNode>, ) -> bool
Compare current descriptor’s build-inputs fingerprint against the
stored one. On mismatch (including “never recorded”), clear stale
build metadata (build_id, local_build, git_sources) and store
the new fingerprint. Returns true if invalidation occurred.
Call this on dora start / dora run / dora daemon --run-dataflow before consuming build_id, and on dora build
after resolving the descriptor (so the fingerprint reflects the
build that just ran).
Trait Implementations§
Source§impl Clone for DataflowSession
impl Clone for DataflowSession
Source§fn clone(&self) -> DataflowSession
fn clone(&self) -> DataflowSession
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataflowSession
impl Debug for DataflowSession
Source§impl Default for DataflowSession
impl Default for DataflowSession
Source§impl<'de> Deserialize<'de> for DataflowSession
impl<'de> Deserialize<'de> for DataflowSession
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for DataflowSession
impl RefUnwindSafe for DataflowSession
impl Send for DataflowSession
impl Sync for DataflowSession
impl Unpin for DataflowSession
impl UnsafeUnpin for DataflowSession
impl UnwindSafe for DataflowSession
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
impl<T> Allocation for T
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FitForCBox for T
impl<T> FitForCBox for T
type CBoxWrapped = Box_<T>
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request