-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix missing background on upgrade #34461
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
Conversation
|
/backport to stable25 |
|
The migration looks right but doesn't seem to work, any ideas why @blizzz? |
b4c38a7 to
1954de0
Compare
|
Probably just my local instance not working but updated and ready for review |
PVince81
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 as discussed
|
@blizzz we need this for 25.0.0RC4 |
come-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would feel better if it checked theming/background is not set before overwriting it.
this is what we wanted to avoid as it would require iterating over all users and slow down the migration/update in normal cases the migration would not rerun |
|
and because of those duplicates as in #34461 (comment) we cannot simply run the update like in the first version of this PR: so the proposal was to delete the backgrounds that were set post RC, here by Bob, by deleting the matching "theming" keys. so that in the end only users (early adopters) will have to manually re-set the background |
|
updated the description and linked issue. |
|
@blizzz please check oc_preferences for my user on c.nc.com, my background is still black as I haven't re-selected one. |
|
I had selected on in rc2 which vanished in rc3 and was all black for me. Maybe pre-condition is coming from 24. |
|
I checked user "Alice" on my test system which would represent that test case and here the background is reset to default instead of black. Maybe c.nc.com is missing that cloudy default pic ? |
Nope. |
|
@blizzz or maybe one needs to upgrade through RC1, RC2, etc to reach that state. also would need to check in which key the path to the custom bkg image is set, maybe that one can be broken as well ? |
Maybe RC 1 then at most. I went now from 24.0.6 (dark mode, non-default stock background) via rc2 (became default background, changed to custom picked from files) and the to RC3. It stayed. So if there was something with rc (or the beta), it does not really matter now. Will close #34458 and do another check with this PR to confirm #34216 is fixed. |
|
Now I took 24.0.6, uploaded a file and set this as background. Then upgrade to RC3 + this patch. Now I have a black background, so, does not really work. Database entries were set correctly, but apparently this is not enough. |
|
Files need to be moved |
|
We can do this on demand in the BackgroundService and copy the file contents around. But then we have to carry the cargo a bit. Or we just have the fallback in the BackgroundService and add an expensive background or repair job, that would move them once in the maintenance times. Then the code can be removed for 26 (some case has to be given on chained upgrades to ensure those are run, but that's ops). |
|
maybe the BackgroundService could migrate it at login time ? |
|
adding the latest idea from internal discussion with @blizzz:
there's some local WIP work towards this idea that will be pushed later |
|
update: the fallback + background job for migration is only for the background file, not the config. |
- fallback to background image from old location - migrate background images to new location as insensitive job Signed-off-by: Arthur Schiwon <[email protected]>
|
I've redone this test:
in appdata:
Note: sadly I still need to shift+refresh to get the wallpapers to refresh, separate issue tldr; works as expected 👍 |
|
| $this->jobList = $jobList; | ||
| } | ||
|
|
||
| protected function run($argument): void { |
Check notice
Code scanning / Psalm
MissingParamType
| return 'Initialize migration of background images from dashboard to theming app'; | ||
| } | ||
|
|
||
| public function run(IOutput $output) { |
Check notice
Code scanning / Psalm
MissingReturnType
|
|
Fix
#34458#34216Background settings previously were set in the
oc_preferencestable with the appid"dashboard", after #33733 the settings were queried for with the appid"theming"This migration aims to fix the background loss on upgrade by updating the appid to
"theming"