Skip to content

Registry tool: store structured artifacts as YAML instead of serialized protobuf #946

@timburks

Description

@timburks

Informal feedback has suggested that our practice of storing artifacts as serialized protos puts too much of a burden on registry users, requiring them to write code to convert YAML or JSON equivalents into serialized protos before posting them in artifact contents fields.

It seems overly-restrictive to require all artifacts to be text, but most of the artifacts that we use could be stored as text (e.g. YAML), and this would allow users easily to view and modify artifact contents with HTTP methods.

Note that this isn't a problem for users of the registry tool, which automatically serializes the appropriate types.

Moving forward, we might take the following steps:

  • Modify registry apply to take an optional argument that causes it to store artifacts as YAML instead of serializing them as proto. Mime types for artifacts might become application/yaml;type=KIND, where KIND is the value of the Kind field in YAML representations.
  • Update registry subcommands that read artifacts to support both serialized protos and YAML.
  • Update applications that use artifacts to support both serialized protos and YAML.
  • Make YAML the default representation.
  • Consider deprecating serialized proto representations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Pressing

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions