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

fix: print error details if catalogValidationValues.json.template is not valid #1092

Merged
merged 4 commits into from
Jan 24, 2025

Conversation

akocbek
Copy link
Contributor

@akocbek akocbek commented Jan 15, 2025

Description

Log more details in a case catalogValidationValues.json.template is not valid json file.

Examples

image image image

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

# construct error message
line_text = content[e.lineno - 1].replace("\n", "")
pointer_line = "-" * (e.colno - 1) + "^"
expecting = "Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{..}', '[..]', '$', got 'undefined'"
Copy link
Member

Choose a reason for hiding this comment

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

I think remove the expecting line, I don't think this is true for all decoding errors. Pointing to the expected error will need to be good enough

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for review. Added decoded error message.
image

image image

@akocbek akocbek merged commit 5e76b15 into main Jan 24, 2025
1 check passed
@akocbek akocbek deleted the print_message branch January 24, 2025 11:35
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.

3 participants