Fix: child-config autoentities fails validation with "No entities found" when using data-source-files#3723
Open
RubenCerna2079 with Copilot wants to merge 5 commits into
Open
Fix: child-config autoentities fails validation with "No entities found" when using data-source-files#3723RubenCerna2079 with Copilot wants to merge 5 commits into
autoentities fails validation with "No entities found" when using data-source-files#3723RubenCerna2079 with Copilot wants to merge 5 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
…alidation When using `data-source-files`, the metadata provider stores autoentity resolution counts only on the root (merged) config. ValidateRootConfig now copies those counts to each child config before per-child validation, so child configs with only autoentities correctly pass the entity-presence check instead of failing with "No entities found". Adds two regression tests: - TestChildWithDataSourceAndAutoentitiesResolvingEntitiesIsValid - TestRootAndChildBothWithAutoentitiesResolvingEntitiesIsValid
Copilot
AI
changed the title
[WIP] Fix autoentities recognition in child configuration files
Fix: child-config Jul 14, 2026
autoentities fails validation with "No entities found" when using data-source-files
RubenCerna2079
marked this pull request as ready for review
July 22, 2026 18:21
RubenCerna2079
requested review from
Alekhya-Polavarapu,
Aniruddh25,
JerryNixon,
aaronburtle,
anushakolan,
rusamant,
sourabh1007,
souvikghosh04,
stuartpa and
vadeveka
as code owners
July 22, 2026 18:21
Contributor
|
/azp run |
|
Azure Pipelines: Successfully started running 6 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a validation gap in DAB’s multi-file configuration flow: when a child config (loaded via data-source-files) uses autoentities without explicit entities, validation could incorrectly fail with “No entities found” because autoentity resolution counts were only tracked on the merged/root config.
Changes:
- Copy missing
AutoentityResolutionCountsentries from the merged/root config into each child config prior to per-child validation. - Add CLI unit tests covering child-only autoentities resolving >0 entities, and combined root+child autoentities with counts stored only on the root.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Core/Configurations/RuntimeConfigValidator.cs |
Ensures child-config validation can see autoentity resolution counts produced during metadata initialization on the merged/root config. |
src/Cli.Tests/ValidateConfigTests.cs |
Adds regression coverage for child configs using autoentities under data-source-files where counts exist only on the root config. |
Contributor
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Contributor
|
/azp run |
|
Azure Pipelines: Successfully started running 6 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why make this change?
autoentitiesin a child configuration file (referenced viadata-source-files) is not recognized — validation fails with "No entities found" #3655data-source-files) usesautoentitiesinstead of explicitentities, validation incorrectly fails with"No entities found". The sameautoentitiesblock works correctly in the top-level config. This contradicts documented behavior that states every config may satisfy the entities requirement viaautoentities.What is this change?
Root cause:
MsSqlMetadataProvider.GenerateAutoentitiesIntoEntitiesstores autoentity resolution counts only on the root (merged)RuntimeConfig.AutoentityResolutionCounts. ButValidateEntityPresencechecks the child config's ownAutoentityResolutionCounts, which is never populated — so the resolved entity count is always 0 for child configs.Fix (
RuntimeConfigValidator.ValidateRootConfig): Before validating each child config, copy any missing resolution counts from the root config into the child config. This is a no-op when child counts are already populated (e.g. in unit tests that pre-populate them directly).How was this tested?
TestChildWithDataSourceAndAutoentitiesResolvingEntitiesIsValid: child config with onlyautoentitiesresolving >0 entities (counts stored on root only) passes validation — direct regression test for the bug.TestRootAndChildBothWithAutoentitiesResolvingEntitiesIsValid: both root and child haveautoentities, all counts on root, both pass validation.Sample Request(s)
dab validate -c dab-config.json # now passes when child uses autoentities