Skip to content

Versioned blobs, persistence naming, and SQL schemas in flux-versioned-types - #159

Merged
louisponet merged 7 commits into
mainfrom
lopo/versioned_telemetry
Sep 14, 2026
Merged

louisponet merged 7 commits into
mainfrom
lopo/versioned_telemetry

Conversation

@louisponet

Copy link
Copy Markdown
Contributor

Brings the builder telemetry machinery that is generic over metadata into flux: VersionedBlob (single latest on-disk format), InternalMetadata, TelemetrySchema plus its derive, and versioned_telemetry macros that always emit schemas with a name-derived, overridable persist directory.

@louisponet
louisponet requested a review from a team September 14, 2026 12:04
Comment thread crates/flux-versioned-types/src/lib.rs Outdated
$crate::__versioned_telemetry_inner!($name, $dir => $($tokens)*);
};
($name:ident => $($tokens:tt)*) => {
$crate::__versioned_telemetry_inner!($name, stringify!($name) => $($tokens)*);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better don't allow to have persistable without manual specification of dir name? Because in our repos we sometimes have same name in different namesapaces like bundle::X, transaction::X and stringify!($name) will produce only X

#[doc(hidden)]
macro_rules! __versioned_telemetry_inner {
($name:ident, $dir:expr => $($tokens:tt)*) => {
$crate::evolve_struct! {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we use enums somewhere for versioned_telemetry? Because here is only struct impl

metadata: &Metadata,
) -> Self {
Self {
type_hash: T::TYPE_HASH ^ 123_456,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be we can move that 123456 const to variable to use it in both encode/decode places? Tbh don't know why we even use it if hash already random

@louisponet
louisponet merged commit a8bd261 into main Sep 14, 2026
3 checks passed
@louisponet
louisponet deleted the lopo/versioned_telemetry branch September 14, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants