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

Report Fails to Insert If Metadata Exceeds Column Limits #371

Open
Thermalight opened this issue Feb 11, 2025 · 2 comments
Open

Report Fails to Insert If Metadata Exceeds Column Limits #371

Thermalight opened this issue Feb 11, 2025 · 2 comments

Comments

@Thermalight
Copy link
Contributor

Description:

When a report is inserted into the database, metadata is extracted from checkpoints and stored in specific columns. However, if any extracted metadata exceeds the column's constraints (e.g., length limits or data type mismatches), the entire report fails to insert. This results in the loss of the full report and its associated logs, making debugging difficult.

Expected Behavior:

The report should always be inserted into the database, even if metadata cannot be inserted.
If metadata exceeds column constraints, it should either be truncated (if applicable) or ignored, while still logging an error for debugging purposes.

Proposed Solution Options:

  • Implement error handling to catch metadata insertion failures.
  • Allow the main report to be inserted even if metadata cannot be stored.
  • Log a warning when metadata is ignored due to size or format issues.
@checkiecheck
Copy link

checkiecheck commented Feb 11, 2025

As a general improvement is the current logging on db inserts not showing the bind variables. It would already help if those (bing values) are shown on errors.

insert could be retried with null value for the column with error in this case, the improved log will show the required intell to analyse and act on.

@jacodg
Copy link
Contributor

jacodg commented Feb 12, 2025

Why a null value? I would say that the Ladybug can truncate the string to the max length for the column before doing the insert?

@jacodg jacodg added this to Ladybug Feb 12, 2025
@github-project-automation github-project-automation bot moved this to To do in Ladybug Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

No branches or pull requests

3 participants