Skip to content

Commit

Permalink
Merge pull request #1284 from arenadata/develop
Browse files Browse the repository at this point in the history
Release 2021.11.19
  • Loading branch information
acmnu authored Nov 19, 2021
2 parents a1469a5 + c35a883 commit 596063a
Show file tree
Hide file tree
Showing 3 changed files with 8 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
2 changes: 2 additions & 0 deletions python/cm/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def check_adcm_config(conf_file):
except ruyaml.constructor.DuplicateKeyError as e:
msg = f'{e.context}\n{e.context_mark}\n{e.problem}\n{e.problem_mark}'
err('STACK_LOAD_ERROR', f'Duplicate Keys error: {msg}')
except ruyaml.composer.ComposerError as e:
err('STACK_LOAD_ERROR', f'YAML Composer error: {e}')
try:
cm.checker.check(data, rules)
return data
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 596063a

Please sign in to comment.