Home My Page Projects FusionForge
Summary Activity Forums Tracker Lists News SCM Files Mediawiki Hudson/Jenkins

[#644] forge_get_config doesn't need to connect to the database

Date:
2014-03-17 09:59
Priority:
3
State:
Closed
Submitted by:
Sylvain Beucler (beuc-inria)
Assigned to:
Sylvain Beucler (beuc-inria)
Target Release:
5.3
Found in Version:
none
Severity:
none
Resolution:
Fixed
Summary:
forge_get_config doesn't need to connect to the database

Detailed description
# forge_get_config config_path
FusionForge Could Not Connect to Database:

This may cause issues when e.g. the database is not running or not installed yet (packaging bootstrap).
This also makes multiple calls to forge_get_config (in scripts) quite slow because they initiate a DB connection everytime.

There's a workaround with:
# FUSIONFORGE_NO_PLUGINS=true forge_get_config config_path
/etc/gforge
# FUSIONFORGE_NO_PLUGINS=true forge_get_config plugin_status hudson
valid

but as you can see this doesn't make sense (the plugins are not disabled, and we don't want to disable the plugins, just not load the DB unless necessary).

How do you think we should initiate database-free forge_get_config ?
Message  ↓
Date: 2014-03-18 21:17
Sender: Beuc ^^

Introducing FUSIONFORGE_NO_DB with the currently same effect.

Date: 2014-03-17 13:26
Sender: Sylvain Beucler

Another situation where we want access to the config without the DB is when running non-privileged scripts (hooks, scripts run by www-data...).

Field Old Value Date By
Target ReleaseNone2014-05-12 16:55nerville
assigned_tonone2014-03-20 10:25nerville
status_idOpen2014-03-19 12:28beuc-inria
close_dateNone2014-03-19 12:28beuc-inria
ResolutionNone2014-03-19 12:28beuc-inria