Skip to content
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

Fix config #701

Merged
merged 3 commits into from
Sep 25, 2024
Merged

Fix config #701

merged 3 commits into from
Sep 25, 2024

Conversation

birunts
Copy link
Collaborator

@birunts birunts commented Sep 25, 2024

Change fixes config inconsistency. It might happen as public set_config of config_system module is allowed to set configs who are not user-settable.

This is BREAKING CHANGE as API of set_config changes to accept str type only for value argument.

While applying blueprint patches function needs
an argument of Bob's directory but not Bob's relative
path from 'build' direcotry.

Signed-off-by: Sebastian Birunt <[email protected]>
Change-Id: I5dabce0071e2de2c96e74a74ab8f244f78fab9e4
If we are setting the value via a plugin,
then the config must have a prompt:

```
config OPTION_X
   bool "feature option x"
   ...
```

Prevent setting non user-settable options. Those will only
get a value from evaluating the 'default' settings on the option.

BREAKING CHANGE: public `set_config()` function from
`config_system` module accepts only `str` type for `value` argument:

```
def set_config(
    key: str, value: str, is_user_set: bool = True, source: str = "cmd_line"
) -> None:
```

Change-Id: I44050d65f6f944d9138b40590f4edfb9b3d53c01
Signed-off-by: Sebastian Birunt <[email protected]>
Bump `rules_python` version.

With previous (0.18.1) version `bazel coverage` fails
intermittently with `No source for code:`.

Signed-off-by: Sebastian Birunt <[email protected]>
Change-Id: If182e1011188eeeea039bf86eb6874c856301f39
Copy link

LCOV of commit 83edfd0 during CI #581

Summary coverage rate:
  lines......: 34.7% (4582 of 13205 lines)
  functions..: no data found
  branches...: 59.8% (518 of 866 branches)

Files changed coverage rate:
                                                 |Lines       |Functions  |Branches    
  Filename                                       |Rate     Num|Rate    Num|Rate     Num
  =====================================================================================
  config_system/config_system/general.py         |56.1%    683|    -     0|54.0%    417
  config_system/tests/run_tests.py               |54.1%     98|    -     0|35.4%     48
  config_system/tests/test_update_config.py      |97.3%     73|    -     0|90.9%     33
  config_system/update_config.py                 |76.9%    134|    -     0|71.2%     52

@birunts birunts enabled auto-merge (rebase) September 25, 2024 13:14
@birunts birunts disabled auto-merge September 25, 2024 13:15
@birunts birunts merged commit 5ba16f7 into master Sep 25, 2024
20 checks passed
@birunts birunts deleted the fix_config branch September 25, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants