dell / dell/omnia

use enabled:true/false in config, do not comment out

Open
#4,993 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
8
Forks
172
Avg merge
14h 51m
Merged PRs (30d)
180

Description

We have dictionaries of stuff that describe things that need to be present. For example:

https://github.com/dell/omnia/blob/issue-4849-omnia-modernization/src/repo_manager/input/repo_manager_config.yml#L175

If we want to omit something from that dictionary there are at least two options:

1. comment it out.
2. add a `enabled: true|false` attribute.
3. both.

I am in favor of 2. Having an `enabled: true|false`:
+ it has a consistent user experience.
+ some markup does not have a native 'comment' character (json).
+ we can write tests that ignore the `enabled` attribute to improve test coverage.
+ we can write tools that manipulate the `enabled` attribute.
+ commenting out is also an option for most cases, so if we do 2. we also get 1. and 3. in most cases.

There is an issue however: we need additional business logic to test the presence of this flag. We may wish to add a default value for when `enabled` is absent?

Contributor guide

Open the contributing guide

Research direction

Start with the referenced src/repo_manager/input/repo_manager_config.yml entry and trace how configuration dictionaries are loaded and checked. Determine the intended default when enabled is absent, then identify the affected validation and coverage tests; done means enabled entries and omitted entries have documented, tested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, yaml
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.