DSC meta settings file override
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 523
- Forks
- 75
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 24
Description
Summary of the new feature / enhancement
As a resource author, I want to quickly and conveniently switch between the settings DSC uses to make testing and development easier without having to update and redefine my settings repeatedly.
Related to and dependent on #282.
Proposed technical implementation details (optional)
DSC commands could support an optional --settings-file flag that uses an alternate meta configuration for that execution. The command(s) for defining the meta configuration could support an optional --path flag that creates/updates the settings data in an alternate location, using the default if not specified.
DSC could also respect the DSC_SETTINGS_FILE environment variable in addition to the command flag:
- If neither the environment variable nor flag are specified for a command, use the default settings file path.
- If the environment variable is defined and the flag isn't specified, use the settings file defined by the environment variable.
- If the command flag is specified, use the settings file it specifies.
- If the specified settings file from env or flag isn't found, error and abort with a specified exit code.
- If the specified settings file isn't valid, error and abort with a specified exit code.
For example:
# Show settings in default file
dsc settings get
# Show settings in dev file
dsc settings get --path ~/dev.dsc.settings.yaml
# Use default settings file
$myConfig | dsc config set
# Use settings in dev file by flag
$myConfig | dsc config set --settings-file ~/dev.dsc.settings.yaml
# Use settings in dev file by env var, then override with ops file:
DSC_SETTINGS_FILE="~/dev.dsc.settings.yaml"
$myConfig | dsc config set
$myConfig | dsc config set --settings-file ~/ops.dsc.settings.yaml
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by reviewing dependent issue #282 and tracing the DSC settings and config commands; map the default path, --path, --settings-file, and DSC_SETTINGS_FILE precedence, then verify missing or invalid files produce the specified errors and exit codes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100