Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Improve error messages for failed YAML validation #3224

@varungandhi-src

Description

@varungandhi-src

I've seen people struggle in the #handbook Slack channel because the error message for validation failures is not great. Here is one example:

Team member reports to non-existent manager role slug: {"name":"Erica Freckelton","pronouns":"she/her","role":"Senior Digital Marketing Manager","reports_to":"director_demand_generation","location":"San Diego, California, United States 🇺🇸","github":"efreckelton","email":"erica.freckelton@sourcegraph.com","links":"[LinkedIn](https://www.linkedin.com/in/ericafreckelton/)","description":"Erica is a digital marketing strategist hailing from San Diego, CA. She and her trusty dog Zetty relocated from Nashville in 2020 to live with her boyfriend, Matt. You'll often catch her geeking out about digital consumer behavior, online trends, and search data. When not in front of a laptop, you'll probably find her in front of a book. Erica's one-third of the Real Friends Who Read Books, a biweekly book club podcast with her two oldest friends."}

This error has a low signal/noise ratio. Instead, it would be much better to frame it as:

error: Team member reports to non-existent manager:
- Erica Freckleton is marked as reporting to director_demand_generation
- With this change, there is no person with a manager_role_slug: director_demand_generation field.
 
This error commonly occurs when a manager is removed from the org chart.

To fix this error, first identify the current manager for Erica Freckleton.
If the manager doesn't have a manager_role_slug field, create one based on their title.
Then, copy the value from the manager_role_slug field to Erica's reports_to field.

For example, see https://github.com/sourcegraph/handbook/pull/2981/files.

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