Issue contents dynamically replaced with stale version if project path was changed back to the previous value
Summary
Issue contents dynamically replaced with a stale version if a project path was changed back to the previous value
Steps to reproduce
- Create an issue
- Change the path of the project of the issue
- Update the title/description of the issue
- Change the path of the project to the previous value
- Reload the page of the issue
What is the current bug behavior?
Title/description of the quickly changed to the previous values.
The issue can't be updated due to the following error:
Error updating issue. Someone edited this issue at the same time you did. Please refresh your browser and make sure your changes will not unintentionally remove theirs.
What is the expected correct behavior?
The issue is up-to-date
Relevant logs and/or screenshots
Possible fixes
A possible fix is to remove all the ETag keys prefixed by a project's path from Redis, but it's not a trivial solution for a bug, which in my opinion has low severity since:
- Project path must be updated and then changed back (which is uncommon)
- The actions must be performed during the expiration period (20 minutes), i.e even if the bug is reproduced, the duration of the bug is 20 minutes
- A user must have both versions of the cache locally, i.e clearing the cache fixes the behavior