Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more checks to timeseries schema #6009

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

bnaecker
Copy link
Collaborator

@bnaecker bnaecker commented Jul 6, 2024

  • Add checks for the length of all field names, timeseries names, and descriptions. All must be non-empty, and below some const limit. Add tests for these as well.
  • Add extra derives to generated target / metric types. Where possible, derive Copy, Eq, PartialOrd, Ord, and Hash, based on the types in the definitions (e.g., strings mean the type cannot be copy).

- Add checks for the length of all field names, timeseries names, and
  descriptions. All must be non-empty, and below some const limit. Add
  tests for these as well.
- Add extra derives to generated target / metric types. Where possible,
  derive Copy, Eq, PartialOrd, Ord, and Hash, based on the types in the
  definitions (e.g., strings mean the type cannot be copy).
@bnaecker bnaecker force-pushed the check-timeseries-schema-field-lengths branch from 9a1a096 to 2c68d88 Compare July 8, 2024 16:27
oximeter/impl/src/schema/codegen.rs Show resolved Hide resolved
oximeter/impl/src/schema/ir.rs Show resolved Hide resolved
oximeter/impl/src/schema/mod.rs Show resolved Hide resolved
Exhaustively match against `FieldType` to determine if it's copyable.
@bnaecker bnaecker enabled auto-merge (squash) July 8, 2024 20:13
@bnaecker bnaecker merged commit dceb1cb into main Jul 8, 2024
19 checks passed
@bnaecker bnaecker deleted the check-timeseries-schema-field-lengths branch July 8, 2024 21:19
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.

None yet

2 participants