ansible-collections / ansible-collections/google.cloud
Can't set or change `redis_configs` on a running instance unless another change is made
- Dominant language
- Python
- Stars
- 105
- Forks
- 144
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 4
Description
##### SUMMARY
For the `gcp_redis_instance` module, when attempting to set or change `redis_configs` for an instance, no changes are made to the instance, unless a different configuration option is being changed too.
For example, if you are attempting to modify one of the labels, or the description, then the `redis_configs` change will be applied, but attempting to modify only `redis_configs` will not do anything.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
`gcp_redis_instance`
##### ANSIBLE VERSION
```paste below
sible --version
ansible [core 2.11.1]
config file = /Users/ryan/de-ansible/ansible.cfg
configured module search path = ['/Users/ryan/de-ansible/library', '/Users/ryan/de-ansible/roles/*/library', '/Users/ryan/de-ansible/roles-vendored/*/library']
ansible python module location = /Users/ryan/.pyenv/versions/3.9.1/envs/venv-de-ansible/lib/python3.9/site-packages/ansible
ansible collection location = /Users/ryan/de-ansible/collections
executable location = /Users/ryan/.pyenv/versions/venv-de-ansible/bin/ansible
python version = 3.9.1 (default, May 15 2021, 14:00:14) [Clang 12.0.5 (clang-1205.0.22.9)]
jinja version = 3.0.1
libyaml = False
```
##### COLLECTION VERSION
```paste below
google.cloud 1.0.1
```
Note that I also tested this with the latest version of `gcp_redis_instance` from master at commit https://github.com/ansible-collections/google.cloud/commit/71a05be3af6497e6a26554b18d66c2495b7f462b
##### CONFIGURATION
```paste below
$ ansible-config dump --only-changed
ANY_ERRORS_FATAL(/Users/ryan/de-ansible/ansible.cfg) = True
COLLECTIONS_ON_ANSIBLE_VERSION_MISMATCH(/Users/ryan/de-ansible/ansible.cfg) = error
COLLECTIONS_PATHS(/Users/ryan/de-ansible/ansible.cfg) = ['/Users/ryan/de-ansible/collections']
DEFAULT_CALLBACK_PLUGIN_PATH(/Users/ryan/de-ansible/ansible.cfg) = ['/Users/ryan/de-ansible/callback_plugins']
DEFAULT_FILTER_PLUGIN_PATH(/Users/ryan/de-ansible/ansible.cfg) = ['/Users/ryan/de-ansible/filter_plugins']
DEFAULT_FORCE_HANDLERS(/Users/ryan/de-ansible/ansible.cfg) = True
DEFAULT_INVENTORY_PLUGIN_PATH(/Users/ryan/de-ansible/ansible.cfg) = ['/Users/ryan/de-ansible/inventory_plugins']
DEFAULT_JINJA2_NATIVE(/Users/ryan/de-ansible/ansible.cfg) = True
DEFAULT_LOOKUP_PLUGIN_PATH(/Users/ryan/de-ansible/ansible.cfg) = ['/Users/ryan/de-ansible/lookup_plugins']
DEFAULT_MODULE_PATH(/Users/ryan/de-ansible/ansible.cfg) = ['/Users/ryan/de-ansible/library', '/Users/ryan/de-ansible/roles/*/library', '/Users/ryan/de-ansible/roles-vendored/*/library']
DEFAULT_PRIVATE_ROLE_VARS(/Users/ryan/de-ansible/ansible.cfg) = True
DEFAULT_ROLES_PATH(/Users/ryan/de-ansible/ansible.cfg) = ['/Users/ryan/de-ansible/roles-vendored', '/Users/ryan/de-ansible/roles']
DEFAULT_TIMEOUT(/Users/ryan/de-ansible/ansible.cfg) = 10
DEPRECATION_WARNINGS(/Users/ryan/de-ansible/ansible.cfg) = True
DIFF_ALWAYS(/Users/ryan/de-ansible/ansible.cfg) = True
INTERPRETER_PYTHON(/Users/ryan/de-ansible/ansible.cfg) = auto_legacy_silent
RETRY_FILES_ENABLED(/Users/ryan/de-ansible/ansible.cfg) = False
TRANSFORM_INVALID_GROUP_CHARS(/Users/ryan/de-ansible/ansible.cfg) = never
```
##### OS / ENVIRONMENT
macOS 11.4
##### STEPS TO REPRODUCE
```yaml
Create any Memorystore instance then attempt to modify only the `redis_flags` parameter.
In a second test change the labels as well as `redis_flags` and note that they will both be updated now.
```
##### EXPECTED RESULTS
I would expect the new flags to be applied, and any flags not specified to be removed.
##### ACTUAL RESULTS
```paste below
No change in flags.
```
Contributor guide
Research direction
Start at the gcp_redis_instance module entry point and reproduce the difference between changing only the Redis configuration and changing it alongside labels. Resolve the issue's redis_configs versus redis_flags naming discrepancy, then verify that configuration-only changes apply and unspecified flags are removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- google-cloud, python, redis
- Domain
- cloud, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100