Project

General

Profile

Bug #34323

The Setting defaults are never updated

Added by Ondřej Ezr 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Settings
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2042480

The BZ talks about how after changing the hostname settings still have the old values and are not updated.

Additional info:
The `foreman_server_url` expands to the old hostname.


Related issues

Related to Foreman - Refactor #34339: Sanitize fqdn in testsClosed

Associated revisions

Revision c6fc10ea (diff)
Added by Ondřej Ezr 4 months ago

Refs #34323 - sanitize setting fixtures

Setting fixtures should not be used to override defaults for tests unless meant for every test.
If we mean to override the setting value for all tests, we should override value and not the default.

Revision c693cd93 (diff)
Added by Ondřej Ezr 4 months ago

Fixes #34323 - use defaults from memory

This loads values from database only if the values are in the database.
If there is no value populated for the Setting, we want to read the default from memory.

Revision 28aa6fdb (diff)
Added by Ondřej Ezr 2 months ago

Refs #34323 - explicit value for Rails 6.1

In c693cd9 we have worked around an issue for distinguishing between value explicitly set by user and not set.
This workaround doesn't work properly in Rails 6.1 and we should improve it to work properly.

History

#1 Updated by The Foreman Bot 4 months ago

  • Assignee set to Ondřej Ezr
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/9062 added

#2 Updated by Ondřej Ezr 4 months ago

#3 Updated by The Foreman Bot 4 months ago

  • Fixed in Releases 3.2.0 added

#4 Updated by Ondřej Ezr 4 months ago

  • Status changed from Ready For Testing to Closed

#5 Updated by The Foreman Bot 3 months ago

  • Pull request https://github.com/theforeman/foreman/pull/9130 added

Also available in: Atom PDF