-
Notifications
You must be signed in to change notification settings - Fork 289
Generating Default Config using CLI #930
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
Generating Default Config using CLI #930
Conversation
seantleonard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions/concerns
Aniruddh25
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a reason to generate the default config
…on' of https://github.com/Azure/data-api-builder into dev/shyamsundarj/do-not-copy-configs-docker-configuration
| ..\ConfigGenerators\configGenerator.ps1 = ..\ConfigGenerators\configGenerator.ps1 | ||
| ..\ConfigGenerators\configGenerator.sh = ..\ConfigGenerators\configGenerator.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Visual Studio smart enough to know which of these to run per platform? or do both attempt to run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, are these just file references for what is in the solution? I'm not recognizing why these lines are added to this file/what the significance is.
| // Test to verify the engine gets started using start command | ||
| // </summary> | ||
| /// <summary> | ||
| /// Test to verify the engine starts with the right log level using start command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// Test to verify the engine starts with the right log level using start command | |
| /// Test to verify the engine starts with the log level specified in the start command |
This is what is meant, yes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly! Will update
seantleonard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more questions
| [DataRow("--LogLevel CrItIcal", false, true, DisplayName = "Case sensitivity: LogLevel Critical from command line.")] | ||
| [DataRow("--LogLevel NONE", false, true, DisplayName = "Case sensitivity: LogLevel None from command line.")] | ||
| public void TestStartEngine(string logging, bool useDefaultConfig, bool expectSuccess) | ||
| public void TestStartEngine(string logging, bool useInvalidConfig, bool expectSuccess) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add parameter comments to the test summary?
- Define how
useInvalidConfigis relevant to testing the logging level detected during startup
| public static string _testRuntimeConfig = "dab-config-test.json"; | ||
|
|
||
| // Name of an invalid config file that can be used for tests. | ||
| public static string InvalidConfigFileName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Elaborate in comment what you are trying to achieve with an invalid config file name.
- Are you trying to get the engine to start without a config file and if so, could the same behavior be achieved by using option
--configwith no value?
| get | ||
| { | ||
| return "dab-config.invalid.json"; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason you chose property/getter vs. constant?
SO discussion ( just for consideration, I'm not suggesting one implementation vs. another)
| public const string CONFIG_WITH_SINGLE_ENTITY = @" | ||
| { | ||
| ""$schema"": ""dab.draft-01.schema.json"", | ||
| ""$schema"": ""dab.draft.schema.json"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use the const that you defined elsewhere in this PR: SCHEMA ?
| { | ||
| private static RestService _restService; | ||
| private static string _testCategory = "mssql"; | ||
| private static string _testCategory = "MsSql"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this variable necessary? could you use TestCategory.MSSQL instead of _testCategory ?
| ..\ConfigGenerators\configGenerator.ps1 = ..\ConfigGenerators\configGenerator.ps1 | ||
| ..\ConfigGenerators\configGenerator.sh = ..\ConfigGenerators\configGenerator.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, are these just file references for what is in the solution? I'm not recognizing why these lines are added to this file/what the significance is.
|
Closing this as PR 981 takes care of the changes present in this one |
What is this change?
dab-config.jsonis addedConfigGeneratorsare added to theslnfile. Now, the command files and scripts show up in Visual Studio. Earlier, they were not, and the commands/scripts had to be edited using another text editor/IDE.How was this tested?