OctoPrint/OctoPrint

[1.10.0rc3] Issue switching to other release channels on plugins

Closed this issue · 1 comments

Problem

As described in OctoPrint/OctoPrint-FileCheck#13, the recent prerelease availability of the FileCheck plugin revealed an issue in some instances running 1.10.0rc* where it was impossible to switch the plugin to the prerelease channel.

The selected channel would just revert instantly.

Upon further analysis, this issue is caused by a data mismatch within the settings chainmap, caused in turn by the caching layer getting out of sync and returning outdated data without the switched release channel.

Solution

After being able to create a failing unit test it turned out this was caused by saving settings with a custom additional default layer to the chainmap, which caused a shallow copy of the chainmap to be created that lacked the prefix cache, meaning that couldn't be properly invalidated by the set value. Retrieving the value again then fetched from the original chainmap with the outdated prefix cache, leading to the returnal of outdated data.

The solution is to ensure that the shallow copy includes the reference to the prefix cache. Once done, the unit test passes.

Fixed in 1.10.0rc4.