Skip to content

Remove excess logs in dab validate command#3651

Merged
RubenCerna2079 merged 14 commits into
mainfrom
dev/rubencerna/fix-logs-dab-validate
Jun 29, 2026
Merged

Remove excess logs in dab validate command#3651
RubenCerna2079 merged 14 commits into
mainfrom
dev/rubencerna/fix-logs-dab-validate

Conversation

@RubenCerna2079

@RubenCerna2079 RubenCerna2079 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Why make this change?

What is this change?

Remove excessive logs when the user uses dab validate.
This includes:

  • Removing unnecessary one-liner information logs
  • Reducing warning logs so that only more general warnings appear (e.g. logs related to entities missing field descriptions when using MCP)
  • Only showing certain relevant information logs when the user uses dab start. All of this is done in order to ensure that the logs in dab validate are not cluttered. (e.g. logs related to REST paths for entities when enabled)
  • Removed logs assertion in tests that used it, as those logs were removed.

How was this tested?

  • Integration Tests
  • Unit Tests
  • Manual Tests
    Tested manually by running dab validate and seeing that the logs are as expected, and ran dab start to ensure previous logs didn't change.

Sample Request(s)

Previous dab validate logs:
image

New dab validate logs:
image

@RubenCerna2079 RubenCerna2079 changed the title Remove excess logs Remove excess logs in dab validate command Jun 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread src/Cli/ConfigGenerator.cs
Comment thread src/Cli/ConfigGenerator.cs
Comment thread src/Core/Services/MetadataProviders/SqlMetadataProvider.cs Outdated
Comment thread src/Core/Services/MetadataProviders/MsSqlMetadataProvider.cs Outdated
Comment thread src/Service.Tests/Configuration/ConfigurationTests.cs Outdated
Comment thread src/Core/Services/MetadataProviders/MsSqlMetadataProvider.cs Outdated
@aaronburtle

Copy link
Copy Markdown
Contributor

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 aaronburtle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, just a couple comments.

@RubenCerna2079

RubenCerna2079 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

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.

Added new test to ensure suppressed logs are absent when isValidateOnly is true

@souvikghosh04 souvikghosh04 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the downgrading of LogError to LogInformation can have some impact on users. we should check this.

Comment thread src/Cli/Commands/ValidateOptions.cs
Comment thread src/Cli/ConfigGenerator.cs Outdated
Comment thread src/Core/Services/MetadataProviders/SqlMetadataProvider.cs
Comment thread src/Cli.Tests/ValidateConfigTests.cs
@souvikghosh04 souvikghosh04 moved this from Todo to Review In Progress in Data API builder Jun 26, 2026

@souvikghosh04 souvikghosh04 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving, as the comments have been addressed

@RubenCerna2079 RubenCerna2079 merged commit 74be0ca into main Jun 29, 2026
12 checks passed
@RubenCerna2079 RubenCerna2079 deleted the dev/rubencerna/fix-logs-dab-validate branch June 29, 2026 16:17
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Data API builder Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: dab validate outputs too much

5 participants