-
Notifications
You must be signed in to change notification settings - Fork 279
[Cherry-pick] Bug fixes/Upgrades/Enhancements to release 1.1 #2217
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
Merged
Conversation
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
## Why make this change? Closes #1635 ## What is this change? Checking if Application Name is already present in the PgSql connection string. I f yes, we append DAB APP NAME with ',' as separator else, we add an Application Name property to connection string. ## How was this tested? - [ ] Unit Tests ## Sample Request(s) If Application Name is specified by the developer, then DAB will append to it, else will add Application Name property --------- Co-authored-by: Aniruddh Munde <anmunde@microsoft.com>
## Why make this change? - Closes #2206 - As noted in #2207, now that false positive vulnerability alert no longer shows due to correct patched versions being recognized by dotnet restore. - Merging Directory to 1.1 branch. ## What is this change? - For .net6 updates npgsql to 7.0.7. - Removes "ignore" tag on serialization/deserialization test that broke because of the npgsql version used. ## How was this tested? - [x] Unit Tests - `dotnet format` step passes without dotnet restore vulnerability alert. - unit test `TestDictionaryDatabaseObjectSerializationDeserialization` unignored
## Why make this change? - Closes #2200, an issue with `dab validate -c "path_to_config.json"` where environment variable `@env('ENV_VAR_NAME')` references are unresolved during config schema validation and schema validation always fails. The issue specifically calls out an error when an environment variable is used for the property `database-type` can't resolve an environment variable and properly set an enum value (mssql, pgsql, mysql, etc) for the property. ## What is this change? - This change corrects how `RuntimeConfigValidator::ValidateConfigSchema(...)` resolves environment variables in the runtime config. The usage of `string jsonData = runtimeConfig.ToJson();` converts the runtime config object (which already has environment variables resolved) into valid json which can then be validated against `dab.draft.schema.json`. ## How was this tested? - [x] Integration Tests: added a test which exercises the code path that validates the dab runtime config against the dab json schema. By ensuring that no schema validation errors occur due to unresolved environment variables. ## Sample Request(s) Add the file `launchSettings.json` to `src/Cli/Properties` with the following contents: ```json { "profiles": { "start": { "commandName": "Project", "commandLineArgs": "start -c src\\Cli\\dab-config.json", "environmentVariables": { "DATABASE_TYPE": "mssql", "DATABASE_NAME": "<your DB name", "CONN_STRING": "<CONN_STRING>", "AUTH_METHOD": "Simulator", "PUB_ENT_SRC": "publishers" }, "httpPort": 5002 }, "validate": { "commandName": "Project", "commandLineArgs": "validate -c src\\Cli\\dab-config.json", "environmentVariables": { "DATABASE_TYPE": "mssql", "DATABASE_NAME": "<your DB name>", "CONN_STRING": "<CONN_STRING>", "AUTH_METHOD": "Simulator", "PUB_ENT_SRC": "publishers" }, "httpPort": 5002 } } } ``` and modify your dab-config.json to have the following contents (assumes that you've deployed the DAB test project's .sql script: ```json { "$schema": "https://github.com/Azure/data-api-builder/releases/download/v0.13.0-rc/dab.draft.schema.json", "data-source": { "database-type": "@env('DATABASE_TYPE')", "connection-string": "@env('CONN_STRING')" }, "runtime": { "rest": { "enabled": true, "path": "/api" }, "graphql": { "allow-introspection": true, "enabled": true, "path": "/graphql" }, "host": { "mode": "development", "cors": { "origins": [ "http://localhost:5000" ], "allow-credentials": false }, "authentication": { "provider": "@env('AUTH_METHOD')" } } }, "entities": { "Query": { "source": "books", "permissions": [ { "role": "anonymous", "actions": [ "read" ] } ], "graphql": { "type": { "singular": "ProductCatalogue", "plural": "ProductCatalogue" } } }, "Product": { "source": "@env('PUB_ENT_SRC')", "permissions": [ { "role": "authenticated", "actions": [ "read", "delete", "update" ] } ] } } } ```
/azp run |
seantleonard
approved these changes
May 14, 2024
Updated Support.md for GA
/azp run |
severussundar
approved these changes
May 14, 2024
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?
Ports bug-fixes to release/1.1:
1.) #2214
2.) #2215
3.) #2208
4.) #2216