Closed abhishekkumams closed 2 weeks ago
I think dab runtime
is sufficient, update-runtime
is wordy for no reason.
This needs to include caching
and also telemetry
even though telemetry is elsewhere in the CLI, we can remove that from Docs and let this be the primary point for runtime
in the CLI.
Related #2251
Background
Currently, the properties in the runtime section of the config file are only setup once, and the values are specified with the
dab init
command.Problem
As we add new properties in the runtime section, the
init
command is growing fast and becoming more complex. Furthermore, the CLI currently does not support updating these properties post-initialization. This means that if a user wants to change a property in the runtime section after running the init command, they have to manually edit the config file. This process is not only inconvenient but also prone to errors, especially for users who are not familiar with the JSON syntax or the structure of the config file.Moreover, re-initializing the config just to update a single property is not a practical solution. It's a time-consuming process that requires the user to re-enter all the configuration details, even if they only want to change one property. This can be particularly frustrating for users who have a complex configuration setup.
This lack of support for updating the runtime properties post-initialization is a significant limitation of the current CLI. It makes the process of managing and updating the configuration more difficult and less flexible than it needs to be. This can be a barrier to efficient usage and can negatively impact the user experience.
Proposal
There are 3 major parts of our config file in high-level :
data-source
,runtime
,entity
.data-source
doesn't require change often and is usually an initialization section. Forentities
, we already haveadd
andupdate
command. So, I propose to add a new CLI command for updating just the runtime section of the config. This is how our runtime section of the config file looks like:Now, during initialization our runtime section will be setup with the user provided value or default values. But later using the below command they can be updated.
dab update-runtime [options]
Available options
production
""
StaticWebApps
/api
false
true
true
/graphql
false
true
false
dab-config.json