Skip to content

Provide more detailed error when jsonnet unmarshalling fails #352

Description

@arozenfe

When a buildbarn service fails reading some jsonnet configuration file, it's difficult to find out where exactly the problem is.
For instance, I tried to test the new bb_worker, and it failed with my old configuration:

Fatal error: rpc error: code = Unknown desc = Failed to read configuration from ./worker.jsonnet: Failed to unmarshal configuration: proto: (line 11:31): unknown field "address"

The address field exists in many different places in the configuration: scheduler, runners, completed action loggers, shards etc. It was hard to find out where exactly it failed.

Eventually I've found out it was due to a schema change in BlobAccessConfiguration, so I had to fix my shards.backend.grpc configuration. A more detailed error would have saved me a lot of time.

Not sure how easy it would be to implement and if the protojson package even supports it, but I thought I'll throw it in and hope for the best.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions