Skip to content

Commit

Permalink
Refer TODO's to existing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bnaecker committed Jun 25, 2024
1 parent 7cefed7 commit 3dddfc3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 6 additions & 4 deletions oximeter/db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ impl From<model::DbTimeseriesSchema> for TimeseriesSchema {
schema.timeseries_name.as_str(),
)
.expect("Invalid timeseries name in database"),
// TODO(ben): Convert from real values once in the DB.
// TODO-cleanup: Fill these in from the values in the database. See
// https://github.com/oxidecomputer/omicron/issues/5942.
description: Default::default(),
version: oximeter::schema::default_schema_version(),
authz_scope: oximeter::schema::AuthzScope::Fleet,
Expand Down Expand Up @@ -241,9 +242,10 @@ pub struct TimeseriesPageSelector {

pub(crate) type TimeseriesKey = u64;

// TODO(ben) The timeseries key needs to take the schema version into account.
// This will require a schema change to ClickHouse and a destructive update,
// since all previous keys will be invalid.
// TODO-cleanup: Add the timeseries version in to the computation of the key.
// This will require a full drop of the database, since we're changing the
// sorting key and the timeseries key on each past sample. See
// https://github.com/oxidecomputer/omicron/issues/5942 for more details.
pub(crate) fn timeseries_key(sample: &Sample) -> TimeseriesKey {
timeseries_key_for(
&sample.timeseries_name,
Expand Down
8 changes: 5 additions & 3 deletions oximeter/db/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ pub(crate) struct DbFieldList {
pub types: Vec<DbFieldType>,
#[serde(rename = "fields.source")]
pub sources: Vec<DbFieldSource>,
// TODO(ben): Add descriptions here
// TODO-completeness: Populate the description from the database here. See
// https://github.com/oxidecomputer/omicron/issues/5942 for more details.
//#[serde(rename = "fields.description")]
//pub descriptions: Vec<String>,
}
Expand Down Expand Up @@ -151,8 +152,9 @@ pub(crate) struct DbTimeseriesSchema {
pub datum_type: DbDatumType,
#[serde(with = "serde_timestamp")]
pub created: DateTime<Utc>,
// TODO(ben): Add authz scope, version, and units here, once they are
// tracked in CRDB and ClickHouse.
// TODO-completeness: Add the authorization scope, version, and units once
// they are tracked in the database. See
// https://github.com/oxidecomputer/omicron/issues/5942 for more details.
}

impl From<TimeseriesSchema> for DbTimeseriesSchema {
Expand Down

0 comments on commit 3dddfc3

Please sign in to comment.