Commit 0206ae4
fix(memory): handle SELF_MANAGED override type in _wrap_configuration (aws#290)
Bug #1 from issue aws#212: The _wrap_configuration method was crashing with
ValueError when trying to modify CUSTOM strategies with SELF_MANAGED
configuration type.
Root cause: The code attempted to convert override_type string to
OverrideType enum without handling the case where override_type is not
a valid enum value (e.g., 'SELF_MANAGED' which is a valid configuration
type but not in the OverrideType enum).
Fix: Add _try_get_override_type() helper method that safely converts
override_type to OverrideType enum, returning None for invalid values.
Update _wrap_configuration to use this helper and fall through to
pass-through behavior when override_enum is None or not in the
wrapper key dictionaries.
This allows CUSTOM strategies with SELF_MANAGED configuration to be
modified without crashing, with their configuration passed through
as-is (no special wrapping).
Fixes aws#212 (Bug #1)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent eab90e9 commit 0206ae4
2 files changed
Lines changed: 94 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1929 | 1929 | | |
1930 | 1930 | | |
1931 | 1931 | | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
1932 | 1946 | | |
1933 | 1947 | | |
1934 | 1948 | | |
| |||
1941 | 1955 | | |
1942 | 1956 | | |
1943 | 1957 | | |
1944 | | - | |
1945 | | - | |
| 1958 | + | |
| 1959 | + | |
1946 | 1960 | | |
1947 | 1961 | | |
1948 | 1962 | | |
| |||
1970 | 1984 | | |
1971 | 1985 | | |
1972 | 1986 | | |
1973 | | - | |
1974 | | - | |
| 1987 | + | |
| 1988 | + | |
1975 | 1989 | | |
1976 | 1990 | | |
1977 | 1991 | | |
1978 | 1992 | | |
1979 | 1993 | | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
1980 | 1997 | | |
1981 | 1998 | | |
1982 | 1999 | | |
1983 | 2000 | | |
1984 | 2001 | | |
1985 | 2002 | | |
1986 | 2003 | | |
1987 | | - | |
1988 | | - | |
| 2004 | + | |
| 2005 | + | |
1989 | 2006 | | |
1990 | 2007 | | |
1991 | 2008 | | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
1992 | 2012 | | |
1993 | 2013 | | |
1994 | 2014 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3283 | 3283 | | |
3284 | 3284 | | |
3285 | 3285 | | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + | |
| 3294 | + | |
| 3295 | + | |
| 3296 | + | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
| 3318 | + | |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
3286 | 3354 | | |
3287 | 3355 | | |
3288 | 3356 | | |
| |||
0 commit comments