Skip to content

Commit

Permalink
Merge pull request #1281 from arenadata/adcm-2353-turn-off-check-read…
Browse files Browse the repository at this point in the history
…-only

ADCM-2353 Turn-off check read_only fields in object config
  • Loading branch information
acmnu authored Nov 19, 2021
2 parents 394e46e + 58be28f commit c35a883
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/cm/adcm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,9 @@ def check_read_only(obj, spec, conf, old_conf):
for s in spec:
if config_is_ro(obj, s, spec[s].limits) and s in flat_conf:

# this block is an attempt to fix sending read-only fields of list and map types
# Since this did not help, I had to completely turn off the validation
# of read-only fields
if spec[s].type == 'list':
if isinstance(flat_conf[s], list) and not flat_conf[s]:
continue
Expand Down Expand Up @@ -717,7 +720,8 @@ def sub_key_is_required(key):
check_sub(key)

if old_conf:
check_read_only(obj, flat_spec, conf, old_conf)
# TODO: it is necessary to investigate the problem
# check_read_only(obj, flat_spec, conf, old_conf)
restore_read_only(obj, spec, conf, old_conf)
process_file_type(group or obj, spec, conf)
process_password(spec, conf)
Expand Down
1 change: 1 addition & 0 deletions tests/functional/test_read_only_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def cluster_config(cluster):
return cluster.config()


@pytest.mark.xfail(reason="Disabled due to temporary fix in https://arenadata.atlassian.net/browse/ADCM-2353")
@pytest.mark.parametrize(
('key', 'input_value', 'expected', 'action', 'group', 'check_exception'),
TEST_DATA,
Expand Down

0 comments on commit c35a883

Please sign in to comment.