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

deploy: improve error messages #697

Merged
merged 5 commits into from
May 28, 2024
Merged

Conversation

josephjclark
Copy link
Collaborator

I'm trying to improve the error messaging when validating project.yaml files

So far I've not been able to make much improvement actually. I think the problems are coming out of the native yaml parser and we're not doing a good job of reporting those.

I've also managed to introduce lots of random errors by indenting the yaml at various places. these trigger blowups without any useful context. Not really sure what to do about these yet.

This might be a much bigger deal than I first thought

Maybe closes OpenFn/lightning#2140

Implementation notes:

  • I've refactored the validation tests
  • I've refactored "duplicate key" to "duplicate id", which is more user friendly
  • I'm ensuring a simple string path on an error object (this may wrong, I may have to revert to an array for consistency with the yaml validator)

@josephjclark
Copy link
Collaborator Author

Ok so while this PR does have improvements, the vague error messages in question are not coming from the CLI, they're coming straight outta lightning.

I will merge this with the next CLI release but otherwise won't push it any further

@josephjclark josephjclark changed the base branch from main to release/next May 24, 2024 16:40
@josephjclark josephjclark marked this pull request as ready for review May 24, 2024 16:52
@josephjclark josephjclark mentioned this pull request May 28, 2024
2 tasks
@josephjclark josephjclark merged commit f89c03c into release/next May 28, 2024
5 checks passed
@josephjclark josephjclark deleted the better-deploy-errors branch May 28, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Improve error messaging on CLI by specifying job names/edges in error messages
1 participant