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

Elasticache AutoMinorVersionUpgrade Bug #8636

Open
mattheidelbaugh opened this issue Feb 27, 2025 · 0 comments · May be fixed by #8641
Open

Elasticache AutoMinorVersionUpgrade Bug #8636

mattheidelbaugh opened this issue Feb 27, 2025 · 0 comments · May be fixed by #8641

Comments

@mattheidelbaugh
Copy link
Contributor

mattheidelbaugh commented Feb 27, 2025

I am trying to mock creation of an elasticache cluster with AutoMinorVersionUpgrade set to True using the following API call on Moto version 5.0.28.

response = self.client.create_cache_cluster(
            CacheClusterId=cache_id,
            Engine=engine,
            AutoMinorVersionUpgrade=True,
            EngineVersion="7.1",
            NumCacheNodes=1,
            CacheNodeType="cache.r7g.large",
        )

For some strange reason, this returns AutoMinorVersionUpgrade: False in the response. I've tried stepping through with a debugger, but I'm a bit stumped. As far as I can tell, Moto itself returns the value as true from create_cache_cluster in responses.py. The switch seems to occur in botocore.endpoint.py in _do_get_response(). The response_dict on line 288 contains <AutoMinorVersionUpgrade>True</AutoMinorVersionUpgrade> still, but on line 314 in the parsed_response that is in json format the value has switched to 'AutoMinorVersionUpgrade': False. I would try to contribute a fix for this myself, but I haven't worked with a model which returns a XML rather than JSON, and I really couldn't say why this switch suddenly happens. This bug is easily reproducible by editing the test_create_redis_cache_cluster unit test to pass AutoMinorVersionUpgrade=True into create_cache_cluster and asserting it is also True in the response.

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 a pull request may close this issue.

1 participant