Fix default config and improve logging for debuggability#3597
Open
Aniruddh25 wants to merge 7 commits into
Open
Fix default config and improve logging for debuggability#3597Aniruddh25 wants to merge 7 commits into
Aniruddh25 wants to merge 7 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the unusable default dab-config.json shipped in the official Docker image by replacing the Aspire-specific config at src/Service/dab-config.json (the file actually picked up during the official image build) with a generic, autoentities-based config. Also standardizes the DB connection-string environment variable name and improves a GraphQL name-violation error message.
Changes:
- Replace entity-specific dev config in
src/Service/dab-config.jsonwith a generic mssql + autoentities config matching the repo-rootdab-config.json. - Rename
ConnectionStrings__DatabasetoDAB_CONNSTRINGin Aspire AppHost wiring, and relax the rootdab-config.json(CORS*, anonymous*, autoentities pattern). - Include entity name in the GraphQL column name-violation error message for better debuggability.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Service/dab-config.json | Replaces Aspire-specific entity config with generic mssql/autoentities config baked into the Docker image. |
| dab-config.json | Adds autoentities.patterns, opens CORS to *, and broadens anonymous permissions to *. |
| src/Aspire.AppHost/AppHost.cs | Renames the connection-string env var to DAB_CONNSTRING for both mssql and pg services. |
| src/Core/Services/MetadataProviders/SqlMetadataProvider.cs | Adds entity name to the GraphQL column name-violation exception message. |
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?
src/Serviceand replace the unusable previous dab-config.json that was specific to Aspire project. This way the generic dab-config gets copied into the publish folder and lands in the official docker imageWhat is this change?
Configuration and Environment Variable Changes:
ConnectionStrings__DatabasetoDAB_CONNSTRINGthroughout the codebase, ensuring consistency and aligning with Data API Builder conventions (src/Aspire.AppHost/AppHost.cs,src/Service/dab-config.json). [1] [2] [3]mssqlindab-config.jsoninstead of using an environment variable, simplifying configuration for local development (src/Service/dab-config.json).Entity Management Simplification:
autoentitieswith a default pattern that includes all schema objects, drastically reducing manual configuration and making the setup more maintainable (dab-config.json,src/Service/dab-config.json). [1] [2]autoentitiesto automatically include all objects and generate entity names in the format{schema}_{object}(dab-config.json,src/Service/dab-config.json). [1] [2]Access and Security Relaxations for Development:
dab-config.json,src/Service/dab-config.json). [1] [2]Unauthenticatedand allowed all actions for theanonymousrole, making the API open by default for easier testing (dab-config.json,src/Service/dab-config.json). [1] [2]Minor Improvements:
src/Core/Services/MetadataProviders/SqlMetadataProvider.cs).src/Service/dab-config.json).How was this tested?