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

Improve error handling and logging #86

Open
2 tasks
MoritzWeber0 opened this issue Jul 29, 2024 · 0 comments
Open
2 tasks

Improve error handling and logging #86

MoritzWeber0 opened this issue Jul 29, 2024 · 0 comments

Comments

@MoritzWeber0
Copy link
Member

MoritzWeber0 commented Jul 29, 2024

Currently, the CLI seems to be very tolerant when it comes to errors. One example that I recently saw:

2024-07-25 18:11:20,962 - WARNING  Link creation for "<LogicalFunction '[REPLACED]' (b9068884-d922-48de-a79f-555b47900e6b)>" partially successful. Some links were not created:
	Requested attribute: realizes
	AttributeError 'LogicalFunction' object has no attribute 'realizes'

The reason for the error message comes from an invalid configuration:

la:
  LogicalFunction:
    links:
      - realizes

The error message got lost in the spam of log messages. The exit code of the run was 0, the Gitlab CI/CD pipeline was green. However, this is obviously a faulty configuration.

Here is my proposal:

  • Add a validation step and try to fail fast. Stop before trying to execute a Capella2Polarion run with faulty configuration und unexpected outcome. Related to Config validation #63 and Use pydantic for config modeling and validation #66
  • Improve severity of log messages. I'd consider an unknown attribute that was explicitly requested as ERROR or EXCEPTION, not just an WARNING.
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

No branches or pull requests

1 participant