-
Notifications
You must be signed in to change notification settings - Fork 248
Overhaul of config system #1402
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
Merged
Changes from 209 commits
Commits
Show all changes
220 commits
Select commit
Hold shift + click to select a range
d12ad88
Removing the old config files and cleaning the project out
aaronpowell def1dcf
initial import of the new config types
aaronpowell 3e7ccab
accidentally deleted that type
aaronpowell 589ebcd
Some refactors in preperation of working on the tests
aaronpowell 48c8ead
Started a new test class for the parsing of the config file
aaronpowell 5b0c22e
Porting the service startup to new config structure
aaronpowell a7baa6a
Adding readable static for default REST path prefix
aaronpowell a54c0c1
Implementing the config validator
aaronpowell db9be8d
Uplifing the AuthorizationResolver
aaronpowell b69a4c6
Fixing converter after making field non-null
aaronpowell da686f5
Making exclude fields for an action default to empty hashset
aaronpowell f1e423a
Working through compiler errors
aaronpowell 8be02cb
last of the compile errors in the core service
aaronpowell 816a1a9
Fixing loading the config based on the ASPNETCORE_ENVIRONMENT
aaronpowell 86d5e46
Getting CLI project to compile
aaronpowell 6f25196
Created cli launch profile for init mssql config
aaronpowell e5e42f6
Fixed problem in how entities were serialized
aaronpowell a6ca6fd
Entities is an object not an array
aaronpowell a35fcc9
Testing if we can add entities with a new launch command
aaronpowell 3317e5a
Refactoring the init tests, introducing snapshot testing
aaronpowell 20d391c
Adding tests for AddEntity on the CLI
aaronpowell 4dfe671
Update entity tests refactored
aaronpowell 7e4b6bb
Implementing e2e tests for the CLI
aaronpowell 6f132a9
Implementing the utils tests with some refactors of the test to make …
aaronpowell fb6ca7a
Refactoring Service.Tests to compile with new config
aaronpowell df3303d
Fixing tests for GraphQL Mutation builder
aaronpowell da34a2a
Fixing GraphQL Builder query tests
aaronpowell 71ba1e4
Fixing SQL schema converter tests
aaronpowell 9f23567
Initialising a config for db exception parser tests
aaronpowell 279396c
Proper serialization of the JSON config
aaronpowell 7cbe6f9
SQL Query executor tests updated
aaronpowell 86cd881
This test should read the config from disk since it connects to the DB
aaronpowell 325389b
Refactoring the connection string parsing tests
aaronpowell a2dd947
Improving the Entity REST option deserialization
aaronpowell aefb744
More decoupling of tests from static/shared state
aaronpowell bd410ad
Fixing an expectation on how the config was loaded
aaronpowell aa58d83
Changing how the JSON deserialization is handled
aaronpowell a291a31
Fixing the ConfigValidator tests
aaronpowell 9c9e0cb
Fixing how to make a mock RuntimeConfigProvider
aaronpowell 804b909
Making the runtime smarter about what file to load
aaronpowell 15e30bb
Found problem in serialization of EntityGraphQLOptions
aaronpowell 9488bf0
Refactoring the Cosmos tests
aaronpowell a188248
Fixing mapping for singular GraphQL names
aaronpowell 18544d2
Fixing some spelling mistakes
aaronpowell 39bd25e
Reverting the automatic singularization of GraphQL entities as that w…
aaronpowell c145799
Fixing some problems in the CLI tests.
aaronpowell a5796fe
Update snapshots to reflect the recent refactoring
aaronpowell 01b9ea1
ensuring snapshots folder is included
aaronpowell 5fb1977
Formatting code to meet standards
aaronpowell 6c0ec55
Merge branch 'main' into aaronpowell/new-config-engine
aaronpowell 9ad3420
TEMPORARY COMMIT
aaronpowell 1aa102e
Reverting temporary commit
aaronpowell 00321aa
Fixing compile errors from the merge
aaronpowell a23eff3
Result of a bad merge - didn't provide dbObjects
aaronpowell 7bc18ad
null handling permissions and setting sproc params
aaronpowell 9d0a91e
WIP
aaronpowell 5ea4f8c
Merge branch 'tmp' into aaronpowell/new-config-engine
aaronpowell 5efe7ac
Fixing compiler error and namespacing
aaronpowell 20d922c
Code formatting
aaronpowell 90e52e2
Merge branch 'main' into aaronpowell/new-config-engine
aaronpowell 7a62f05
Fixing some compiler errors from merge
aaronpowell 0b0b222
Fixing CORS test and making it a snapshot test
aaronpowell f3fe6e9
Flipping the tests so when REST or GraphQL CLI options are
aaronpowell 9f54391
Updating snapshots to reflect new defaults in REST/GraphQL
aaronpowell dcf5b23
Renaming the converter factory
aaronpowell aa8a002
Improving how env var replacement happens on deserialization
aaronpowell 35a42d2
Fixing some locations where we shouldn't be deserializing with env re…
aaronpowell bbf1130
adding some useful messages to Assert.IsTrue failures
aaronpowell 1c8585d
Enabling strict mode for snapshooter to avoid generating snapshots on…
aaronpowell 46d00ca
Default EntityActionFields should be null as they aren't required
aaronpowell 82e3560
Merge branch 'main' into aaronpowell/new-config-engine
aaronpowell 409c267
Reintroducing the regressed functionality around events on config loa…
aaronpowell b7bf774
Adding missing snapshots and fixing env loading
aaronpowell 3715cdc
Removing old cold and unsetting fake connection string from env vars
aaronpowell 5fb961e
Ensuring DAB env vars are properly cleaned up after test runs
aaronpowell ed4d382
Merge branch 'main' into aaronpowell/new-config-engine
aaronpowell a2b2b9e
Fixing bad merge
aaronpowell 5bd313b
Fixing snapshot test
aaronpowell 8f64458
Improving how we ignore connection strings in snapshots
aaronpowell 4da577e
really basic diff displayer to help debugging
aaronpowell 6c353c0
snapshots should be in build output maybe
aaronpowell 06ea3f3
file name doesn't include path
aaronpowell 6bc70c1
more work on the simple diff engine
aaronpowell 4007897
really verbose error message
aaronpowell cff3dfd
fixing snapshots to match how config is formatted when tests run
aaronpowell ab6c9e9
cleaning up usings
aaronpowell 594fcf3
regenerating the cosmos config using the cli
aaronpowell 3638234
More improvements to the default CosmosDB_NoSQL config
aaronpowell a0ff6ae
Disabling REST at an entity for CosmosDB
aaronpowell 9a82332
Fixing cosmosdb deserialization snapshot
aaronpowell 9c563fc
Fixing formatting
aaronpowell bdda7ea
Maybe making the diff display a bit better
aaronpowell 541c68b
Updated snapshots
aaronpowell 08fbf38
Fixing Config Merge test
aaronpowell ea9ca6e
improving the test assert flow
aaronpowell b927fba
Removing Snapshooter from CLI tests
aaronpowell c0bb22d
Removed snapshooter from Service.Tests for VerifyTest
aaronpowell 69eb552
Remove package version for Snapshooter
aaronpowell 38530a0
Updating build pipeline to publish verify test output on failure
aaronpowell 2df5524
Merge branch 'main' into aaronpowell/new-config-engine
aaronpowell c6a3401
Merge branch 'main' into aaronpowell/new-config-engine
aaronpowell 0352c74
Bad merge on the cosmos config
aaronpowell bc49a91
Wasn't properly cloning existing permissions on update
aaronpowell 79cb250
Fixing env var testing by creating a new mock application host
aaronpowell ba288c9
Fixing broken config for cosmos and some auth pipeline
aaronpowell da3a0e5
Handing that the model directive might not match entity in config
aaronpowell 2b7df8d
Fixing verification test
aaronpowell 81569c0
Using a params has for verify names
aaronpowell 1a02421
Need to mock a method call
aaronpowell ecc96ce
Adding diffplex for better test debugging
aaronpowell 095b7db
snapshot updated
aaronpowell 9b118d6
Fixing test
aaronpowell 27de7a9
Removing mstest from core service
aaronpowell 857a378
Expanding the Create DB policy test coverage
aaronpowell b3dd45c
Serialization of json schema property was wrong
aaronpowell 04da726
Improving the dynamic config loading via endpoint
aaronpowell 9294aa2
Need a new line in the command script for config generation
aaronpowell 14158c4
Config file regenerated
aaronpowell 10bdaa8
Updated verified runtime config
aaronpowell b7ea176
Bad merge dropped DateTimeOffset support
aaronpowell 286f4d5
Don't need to unpack sproc props from JSON anymore
aaronpowell 522fc92
Ensuring right config is loaded and serialized properly
aaronpowell 6d9f9d6
Fixing generated config
aaronpowell 7e7a058
Better handling of lazy loading config files
aaronpowell bd9205b
Upsert not Update...
aaronpowell 520c63a
Reverting change on how config file name is set
aaronpowell 5de42bb
Fixing the DataRow attribute usage
aaronpowell 7a429c0
Updating PostgreSQL and MySQL configs + snapshots
aaronpowell a480127
new hashing algo to meet SDL
aaronpowell a987ece
Merge branch 'main' into aaronpowell/new-config-engine
aaronpowell 32cdec4
Removing the runtime env setting
aaronpowell e42c700
Moving snapshots into their own folder for easier PR reviews
aaronpowell 7e96d51
Undoing launch file changes
aaronpowell 75c0c03
Flag around UseHttpsRedirection
aaronpowell 5ac9304
Apply suggestions from code review
aaronpowell d855aed
Update src/Service.GraphQLBuilder/GraphQLStoredProcedureBuilder.cs
aaronpowell 9c0e207
Fixing a bad merge from code review and making Entities a ReadOnlyDic…
aaronpowell 7988bad
Moving file up per review
aaronpowell 8aa1f4b
Describing the logger
aaronpowell f3996f5
Adding doc comments for the RuntimeConfigLoader and Provider
aaronpowell f36a660
EntityType -> EntitySourceType for more obvious naming
aaronpowell cbea153
More doc comments describing types
aaronpowell 22237bf
Removing the use of magic strings for data source options
aaronpowell 8e48c71
Reverting a change where I dropped an enum and used a string
aaronpowell 56f241f
Expanding the check to cover whitespace as well.
aaronpowell 08293d6
Adding <inheritdoc /> for converter types
aaronpowell 0173cbb
Fixing based on PR review feedback
aaronpowell 7f0a6d7
More clarity on what files are being added
aaronpowell e3c1390
Merge branch 'aaronpowell/new-config-engine' of https://github.com/Az…
aaronpowell bba1ace
Fixing whitespace
aaronpowell 964b6d8
Merge branch 'main' into aaronpowell/new-config-engine
aaronpowell 556a381
Little tweak of if test
aaronpowell a4bb129
Updating Verify.MSTest to 20.1.0
aaronpowell 34f4acf
Cleaned up verify test output
aaronpowell 2e3c864
Fixing usage of default params
aaronpowell 36c9b57
Moving the new types for the config to their own folder/namespace
aaronpowell 055545e
formatting fix
aaronpowell ca7ce2b
Forgot to add this snapshot
aaronpowell 6411614
More missing snapshots
aaronpowell 19b4bb5
Update src/Config/DatabasePrimitives/DatabaseObject.cs
aaronpowell 33cda15
Addressing the potentially incorrect naming of a param
aaronpowell fe8c79c
Moving away from Enum.Parse as it's not the most optimal in our codebase
aaronpowell e429969
adding a comment to explain why we reparse the dictionary
aaronpowell 2a77d1e
Cleanup from code review
aaronpowell b7639d9
Merge branch 'main' into aaronpowell/new-config-engine
aaronpowell dd20173
Updating System.IO.Abstractions
aaronpowell cc6f202
Clearing up the message
aaronpowell 89b69ce
Updated the method docs
aaronpowell 56875c8
Incorporating review feedback
aaronpowell 304a3b5
Incorporating review feedback
aaronpowell 9dca707
Using null when it was expected
aaronpowell f306f3a
Fixing verify tests
aaronpowell 8600e69
linting
aaronpowell 2f66399
Fixing verify tests
aaronpowell 85d4a85
Apply suggestions from code review
aaronpowell 3e065b9
Removing the methods if REST is disabled for an entity
aaronpowell 25407f6
Little clean up on these two converters
aaronpowell 736af07
Fixing comment
aaronpowell 4acb6cc
Bringing back comment explaining why Exlude isn't nullable
aaronpowell be78085
naming nullable fields
aaronpowell 66b1526
Code optimisation
aaronpowell 4b7d684
Pluralisation should only happen when creating the RuntimeEntities type
aaronpowell 86fd0f8
Correct implementation of the JSON schema for REST path values
aaronpowell 09df26f
Expanding doc comments
aaronpowell 42df27f
Null handling
aaronpowell afeb272
Using string.Empty properly
aaronpowell 7330fe5
Expanding abbreviation
aaronpowell da68eee
Changed from code review
aaronpowell 5b9813f
Addressing feedback from PR review
aaronpowell e27eba9
Addressing feedback from PR review
aaronpowell 59eca73
Removing unused enum member and code cleanup from review
aaronpowell d68af6d
Adding better logic to determine the right number value to use
aaronpowell e857f3e
Missed setting late config for new initialization endpoint
aaronpowell f63c50c
Removing unused doccomment
aaronpowell 38afc1f
Adding a comment to explain why singular/plural might end up empty st…
aaronpowell fe51c01
Using the local variable
aaronpowell 07ed782
Code review update
aaronpowell 11c5a81
Code review update
aaronpowell 78b76bc
Turns out that I should read the docs properly, step goes AFTER tests…
aaronpowell 24f6e49
Error handling for when there's no database that can be determined fo…
aaronpowell b8fc53e
Merge branch 'main' into aaronpowell/new-config-engine
aaronpowell 0419531
Checked for wrong auth type
aaronpowell 2cbd53c
Addressing latest PR feedback
aaronpowell 59456c5
Making the EntitySource.Type nullable (#1530)
aaronpowell e78ad79
Better usage of Verify and ensuring test cleanup
aaronpowell f44565d
Splitting the tests from data drive to separate tests
aaronpowell c333318
Avoiding reading to the end in case the process hadn't finished. Only…
aaronpowell 11eb639
Removing cli config name precedence setting
aaronpowell a7ae343
Disabling a test temporarily, see comment on test for insights
aaronpowell d6b6dd4
Merge branch 'main' into aaronpowell/new-config-engine
aaronpowell f128532
code review update
aaronpowell 3824eff
Merge branch 'aaronpowell/new-config-engine' of https://github.com/Az…
aaronpowell 66358e5
Handling non-model GraphQL types in Cosmos
aaronpowell c41a9f3
Fixing formatting
aaronpowell efc433a
We shouldn't allow
aaronpowell 0ede5d0
Ensuring the REST and GraphQL paths have '/' prefix
aaronpowell f328e47
Revert "We shouldn't allow"
seantleonard d4fffc7
Adds back test which was ignored and fixed other similar test failure…
seantleonard bd569a4
Update Verified file to reflect prefix forward slash for the rest pat…
seantleonard dbb3e88
Reignore test as the deadlock is linux related and tracked via #1543.…
seantleonard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,6 @@ dab-config*.json | |
|
||
# Local-Only files | ||
.env | ||
|
||
# Verify test files | ||
*.received.* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ variables: | |
patch: $[counter(format('{0}_{1}', variables['build.reason'], variables['minor']), 0)] | ||
isReleaseBuild: $(isNugetRelease) | ||
additionalProperties.version: 'https://github.com/Azure/data-api-builder/releases/download/v$(major).$(minor).$(patch)/dab.draft.schema.json' | ||
SNAPSHOOTER_STRICT_MODE: true | ||
|
||
steps: | ||
- task: NuGetAuthenticate@1 | ||
|
@@ -90,6 +91,30 @@ steps: | |
projects: '**/*Tests*.csproj' | ||
arguments: '--filter "TestCategory!=CosmosDb_NoSql&TestCategory!=MsSql&TestCategory!=PostgreSql&TestCategory!=MySql" --configuration $(buildConfiguration) --collect "XPlat Code coverage"' | ||
|
||
- task: CmdLine@2 | ||
displayName: 'Set flag to publish Verify *.received files when tests fail' | ||
condition: failed() | ||
inputs: | ||
script: 'echo ##vso[task.setvariable variable=publishverify]Yes' | ||
|
||
- task: CopyFiles@2 | ||
condition: eq(variables['publishverify'], 'Yes') | ||
displayName: 'Copy received files to Artifact Staging' | ||
inputs: | ||
contents: '**\*.received.*' | ||
targetFolder: '$(Build.ArtifactStagingDirectory)\Verify' | ||
cleanTargetFolder: true | ||
overWrite: true | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: 'Publish received files as Artifacts' | ||
name: 'verifypublish' | ||
condition: eq(variables['publishverify'], 'Yes') | ||
inputs: | ||
PathtoPublish: '$(Build.ArtifactStagingDirectory)\Verify' | ||
ArtifactName: 'Verify' | ||
publishLocation: 'Container' | ||
|
||
- task: [email protected] | ||
displayName: 'Version stamp dab.draft.schema.json' | ||
inputs: | ||
|
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.