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: display better error message for validate_ibm_catalog_json hook #1097

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

akocbek
Copy link
Contributor

@akocbek akocbek commented Jan 28, 2025

Description

when pre-commit hook validates ibm_catalog.json file, it checks the working_directory inside ibm_catalog.json file.

It can happen that 2 flavors have the same working_directory. If pre-commit hook fails, then the following error is thrown

image

If we look the error message, it seems as the same error is printed twice, which is not true (we have 2 flavors using the same value for working_directory. We should add more details to the error message, something like:

product_label: '[Add-ons Beta] RAG Pattern in Action: Application Sample'
flavor_label: 'Banking Application - Basic (Deploy on Code Engine)'
working_directory: 'solutions/bankings':

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.

@akocbek akocbek requested a review from ocofaigh as a code owner January 28, 2025 10:59
@akocbek
Copy link
Contributor Author

akocbek commented Jan 28, 2025

new error message print:
image

@daniel-butler-irl daniel-butler-irl merged commit e14fc16 into main Jan 28, 2025
1 check passed
@daniel-butler-irl daniel-butler-irl deleted the fix_print branch January 28, 2025 11:04
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