Skip to content

Redis app resource (implementation alternative)#2124

Open
fflorent wants to merge 7 commits intoYunoHost:devfrom
fflorent:redis-app-resource-alt
Open

Redis app resource (implementation alternative)#2124
fflorent wants to merge 7 commits intoYunoHost:devfrom
fflorent:redis-app-resource-alt

Conversation

@fflorent
Copy link
Contributor

@fflorent fflorent commented Jun 15, 2025

The problem

See #2122

This PR introduces an alternate implementation (see the latest commit).

Solution

The idea is to let the AppResource store the properties of the previous manifest (the self.old property). Therefore they could handle the difference, in our case by deprovisionning the redis databases that are removed in the new version.

You can check the difference with #2122 here:
fflorent/yunohost@redis-app-resource...fflorent:yunohost:redis-app-resource-alt

PR Status

Need help on these questions

How to test

./ynh-dev test yunohost:app_resources:resource_redis

@fflorent fflorent force-pushed the redis-app-resource-alt branch from 6c0873e to 52b6a43 Compare June 15, 2025 18:17
@fflorent fflorent changed the title Redis app resource (alternate implementation) Redis app resource (implementation alternative) Jun 21, 2025
f'Uhoh, you seem to have reached the maximum of Redis databases allowed. You may increase the value of "database" in {redis_conf_path} to increase it.',
raw_msg=True
)
return list(free_dbs)[:count]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 this pull request may close these issues.

2 participants