Skip to content

Add yaml spec generation - #355

Merged
2maz merged 1 commit into
mainfrom
2maz/add_yaml_spec_generation
Sep 4, 2025
Merged

Add yaml spec generation#355
2maz merged 1 commit into
mainfrom
2maz/add_yaml_spec_generation

Conversation

@2maz

@2maz 2maz commented Sep 4, 2025

Copy link
Copy Markdown
Collaborator

The spec file is intended to be used for validation of the table spec implementation, e.g., as in slurm-monitor's sqlalchemy definitions

Example output

# AUTOMATICALLY GENERATED BY `process-doc -w -yaml`.  DO NOT EDIT.
# Edit `util/formats/newfmt/types.go`, then in `util/process-doc` run `make install`.

MetadataObject:
  fields:
    producer:
      type: 'NonemptyString'
      doc: 'The name of the component that generated the data (eg "sonar", "slurm-monitor")'
    version:
      type: 'NonemptyString'
      doc: 'The semver of the producer'
    format:
      type: 'uint64'
      doc: 'The data format version'
    attrs:
      type: '[]KVPair'
      doc: 'An array of generator-dependent attribute values'
    token:
      type: 'string'
      doc: 'EXPERIMENTAL / UNDERSPECIFIED.  An API token to be used with Envelope.Data.Attributes.Cluster, it proves that the producer of the datum was authorized to produce data for that cluster name.'
``

@2maz
2maz requested a review from lars-t-hansen September 4, 2025 07:55
@2maz 2maz changed the title Add yaml spec generation [WIP] Add yaml spec generation Sep 4, 2025
Comment thread util/process-doc/process-doc.go Outdated
Comment thread util/process-doc/process-doc.go Outdated
Comment thread util/process-doc/process-doc.go

@lars-t-hansen lars-t-hansen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Before landing, please run make install here so that all output files are in sync with the script, and add the generated files to the commit. Also please squash changes when landing.

@2maz
2maz force-pushed the 2maz/add_yaml_spec_generation branch from eac1a6c to 90b8781 Compare September 4, 2025 11:05
The spec file is intended to be used for validation of the table spec implementation, e.g.,
as in slurm-monitor's sqlalchemy definitions
@2maz
2maz force-pushed the 2maz/add_yaml_spec_generation branch from 90b8781 to 3f5cbc2 Compare September 4, 2025 11:11
@2maz 2maz changed the title [WIP] Add yaml spec generation Add yaml spec generation Sep 4, 2025
@2maz
2maz merged commit 2c90c0b into main Sep 4, 2025
4 checks passed
@2maz
2maz deleted the 2maz/add_yaml_spec_generation branch September 4, 2025 11:53
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