-
Notifications
You must be signed in to change notification settings - Fork 106
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
ListConfig.__setitem__(slice, ...)
does not roll-back cfg state upon mutation failure
#950
Labels
bug
Something isn't working
Comments
Jasha10
changed the title
Inconsistent
May 26, 2022
ListConfig.__setitem__
behavior on failureListConfig.__setitem__(slice, ...)
does not roll-back cfg state upon mutation failure
pixelb
added a commit
to pixelb/omegaconf
that referenced
this issue
Jul 14, 2022
* omegaconf/listconfig.py (__setitem__): Operate on a copy so any changes due to validation errors etc. are discarded. Fixes issue omry#950
pixelb
added a commit
to pixelb/omegaconf
that referenced
this issue
Jul 14, 2022
* omegaconf/listconfig.py (__setitem__): Operate on a copy so any changes due to validation errors etc. are discarded. Fixes issue omry#950
pixelb
added a commit
to pixelb/omegaconf
that referenced
this issue
Jul 28, 2022
* omegaconf/listconfig.py (__setitem__): Operate on a copy so any changes due to validation errors etc. are discarded. * tests/test_basic_ops_list.py: Veryify list unchanged upon exception, and specifically upon failure to insert. Fixes issue omry#950
pixelb
added a commit
to pixelb/omegaconf
that referenced
this issue
Aug 2, 2022
* omegaconf/listconfig.py (__setitem__): Operate on a copy so any changes due to validation errors etc. are discarded. * tests/test_basic_ops_list.py: Veryify list unchanged upon exception, and specifically upon failure to insert. Fixes issue omry#950
pixelb
added a commit
to pixelb/omegaconf
that referenced
this issue
Aug 3, 2022
* omegaconf/listconfig.py (__setitem__): Operate on a copy so any changes due to validation errors etc. are discarded. * tests/test_basic_ops_list.py: Veryify list unchanged upon exception, and specifically upon failure to insert. Fixes issue omry#950
pixelb
added a commit
that referenced
this issue
Aug 3, 2022
* omegaconf/listconfig.py (__setitem__): Operate on a copy so any changes due to validation errors etc. are discarded. * tests/test_basic_ops_list.py: Veryify list unchanged upon exception, and specifically upon failure to insert. Fixes issue #950
Jasha10
pushed a commit
to Jasha10/omegaconf
that referenced
this issue
Aug 10, 2022
* omegaconf/listconfig.py (__setitem__): Operate on a copy so any changes due to validation errors etc. are discarded. * tests/test_basic_ops_list.py: Veryify list unchanged upon exception, and specifically upon failure to insert. Fixes issue omry#950
Jasha10
pushed a commit
that referenced
this issue
Aug 10, 2022
* omegaconf/listconfig.py (__setitem__): Operate on a copy so any changes due to validation errors etc. are discarded. * tests/test_basic_ops_list.py: Veryify list unchanged upon exception, and specifically upon failure to insert. Fixes issue #950
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Most mutations to OmegaConf containers are atomic in the sense that a failed mutation will result in an unmodified object. This is not the case, however, when
ListConfig.__setitem__
is called on a slice.To Reproduce
The last line of the script below demonstrates inconsistency (failure to roll-back
ListConfig
state on failed mutation).Expected behavior
The last line above should be
assert cfg == [1, 2, 3]
The text was updated successfully, but these errors were encountered: