Remove excess logs in dab validate command#3651
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reduces console logging noise during dab validate by removing or downgrading several informational logs emitted during schema validation and metadata initialization, and adjusts tests that previously asserted on those removed logs.
Changes:
- Suppressed per-entity REST path logs and other informational messages during validate-only execution paths.
- Consolidated MCP “missing fields” warnings into a single warning (with per-entity details moved to Debug).
- Updated Service tests to stop asserting on removed informational logs.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Service.Tests/Configuration/ConfigurationTests.cs | Removes assertions that expected now-removed schema validation info logs. |
| src/Core/Services/MetadataProviders/SqlMetadataProvider.cs | Skips REST-path/per-entity REST-disabled info logs when running in validate-only mode. |
| src/Core/Services/MetadataProviders/MsSqlMetadataProvider.cs | Skips trigger/REST-path info logs in validate-only mode; reduces validate output noise. |
| src/Core/Configurations/RuntimeConfigValidator.cs | Removes an informational “Validating entity relationships.” log during validate-only runs. |
| src/Core/Configurations/JsonConfigSchemaValidator.cs | Removes an informational “schema satisfied” log on successful schema validation. |
| src/Cli/ConfigGenerator.cs | Removes “Validating config file” info log; consolidates MCP missing-fields warnings (per-entity -> Debug, plus one Warning). |
| src/Cli/Commands/ValidateOptions.cs | Changes invalid-config final message from Error to Information. |
|
This PR removes assertions but doesnt add in any new ones, could consider adding in a negative case that asserts the suppressed logs are absent when isValidateOnly is true to help prevent any regression. |
aaronburtle
left a comment
There was a problem hiding this comment.
Looks good, just a couple comments.
Added new test to ensure suppressed logs are absent when isValidateOnly is true |
souvikghosh04
left a comment
There was a problem hiding this comment.
the downgrading of LogError to LogInformation can have some impact on users. we should check this.
Why make this change?
dab validateoutputs too much #3266What is this change?
Remove excessive logs when the user uses
dab validate.This includes:
fielddescriptions when using MCP)dab start. All of this is done in order to ensure that the logs indab validateare not cluttered. (e.g. logs related to REST paths for entities when enabled)How was this tested?
Tested manually by running
dab validateand seeing that the logs are as expected, and randab startto ensure previous logs didn't change.Sample Request(s)
Previous

dab validatelogs:New

dab validatelogs: