Update pipelines to support -rc for dab versions#1558
Merged
abhishekkumams merged 61 commits intomainfrom Jul 4, 2023
Merged
Conversation
## Why make this change? The original config system has a lot of areas where it doesn't provide concrete types for what we need, due to the flexible nature of the JSON file, and instead forces the code to check at runtime (is the property a bool or an object?) and then have branching logic based on that. This results in duplication of code, as well as hidden assumptions for what the "expanded" version of shorthand properties (by shorthand properties I mean properties like `"rest": false` on the `runtime`). With this change we reduce the config C# type system to only handle the fully expanded objects, resulting in a clearer structure for what the types are between JSON and C#, reduce the amount of type casting that needs to be done when checking the config, and unblocking at ability to tackle more complex config features, such as #722. ## What is this change? - Full rewrite of the config type system and "loader" process - This includes a set of custom `JsonConverter` classes for parts of the config serializer/deserializer, so that we can expand the config and apply the defaults as expected. The result of this is that if you deserialize then serialize the resulting config can look different as we _always_ serialize to the expanded version - Leveraging a file system abstraction for easier testing - Unit tests can generate a mock `RuntimeConfig` and write it to a mock file system, meaning they are a lot more isolated from each other - Integration tests can load the "base" `RuntimeConfig` for the DB and then write out a config (with test-specific features) to the mock file system, which is then given to the test runner to use, rather than writing to disk (although some tests will still write to disk) - Refactored engine to use the new types - Introduced [Snapshot Testing](https://jestjs.io/docs/en/snapshot-testing/) via [Snapshooter](https://github.com/SwissLife-OSS/snapshooter) to make it easier to see the broad impact of refactors to underlying object structures - Refactored the CLI to be a bit more compartmentalised in the code, relying less on callbacks, making for easier testing of specific commands ## How was this tested? - [x] Integration Tests - [x] Unit Tests
…ps://github.com/Azure/data-api-builder into dev/abhishekkuma/update_pipelines_to_support_rc
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?
-rc#1545-rcsuffix for release candidates.What is this change?
dabVersionto add-rcsuffix in case it's not a stable release, to identify as a release candidate.How was this tested?