Project

General

Profile

Actions

Bug #35894

closed

Foreman.settings.load_values is not able to pick settings which transitioned from a non-default to default value

Added by Adam Ruzicka over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Settings
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

When a setting is set back to its default value, the value persisted in DB is `nil` to denominate that the default value should be used. However, the setting registry only looks at settings with non-nil values so it never picks up the nondefault->default transition.

Steps to reproduce:
1) Run rails console
2) Pick a $setting without custom value
3) Read a value of $setting with Setting[$setting]
4) In another process, change the value of $setting to a non-default one
5) Reload the settings with Foreman.settings.load_values
6) Repeat 3, notice the value is what was set in 4
6) In another process, change the value of $setting to the default one
7) Repeat 5
8) Repeat 3

Actual results:
The value in 8 is the same as in 6

Expected results:
The value in 8 is the same as in 3

Actions #1

Updated by Adam Ruzicka over 1 year ago

  • Bugzilla link set to 2157869
Actions #2

Updated by The Foreman Bot over 1 year ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/9570 added
Actions #3

Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases 3.6.0 added
Actions #4

Updated by Adam Ruzicka over 1 year ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Maria Agaphontzev over 1 year ago

  • Target version set to 3.5.2
Actions #6

Updated by Ewoud Kohl van Wijngaarden over 1 year ago

  • Triaged changed from No to Yes
Actions #7

Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases 3.5.2 added
Actions

Also available in: Atom PDF