FLUID-3820: Move hardcoded database name out of ant build and php scripts

Metadata

Source
FLUID-3820
Type
Task
Priority
Critical
Status
Closed
Resolution
Fixed
Assignee
Cindy Li
Reporter
Cindy Li
Created
2010-10-29T13:35:19.393-0400
Updated
2010-11-08T13:18:23.845-0500
Versions
  1. 1.2.1
Fixed Versions
  1. 1.3
Component
  1. Infusion Builder

Description

The name of infusion builder mysql database is hardcoded as "build_cache" in, (1) sql scripts used by ant build, (2) php scripts. This produces issue when multiple instances of infusion builder need to be deployed on the same server.

The suggested improvement is,
1. pass the db name as a parameter into ant build file, if not passed-in, use default value "build_cache"
2. define the db name as a constant in php config file

Environments

Unix/Windows servers where fluid builder is deployed.

Comments

  • Justin Obara commented 2010-10-29T14:20:17.834-0400

    "Bug Parade Infusion 1.3"

  • Cindy Li commented 2010-11-03T09:47:35.836-0400

    "FLUID-3820-1.patch.txt" does:

    1. Ant build script accepts mysql database name as a parameter named as "mysql_db_name". The new parameter is optional with the default value "build_cache", the db name infusion builder previously uses.

    2. Pointed .externals to infusion library 1.2.1, instead of 1.1.2, for the infusion builds.

    3. The structure and scripts of test suite (JqUnit) in infusion library 1.2.1 is different from that in 1.1.2. Adjusted infusion builder unit tests to cater for the new JqUnit

  • Jamon Jamon commented 2010-11-03T16:10:26.728-0400

    Including an external (non version controlled) infusion-builder.properties file in ${home}/infusion-builder.properties allows storing database credentials semi-securely while also using them in an ant build.xml file per the following patch:

    Index: build.xml
    ===================================================================
    — build.xml (revision 10175)
    +++ build.xml (working copy)
    @@ -4,6 +4,7 @@

    <property environment="env" />
    <property file="build.properties" />
    + <property file="${home}/infusion-builder.properties" />

    <target name="setup_server_props" description="Loads server properties">
    <property file="server_build.properties" />

  • Cindy Li commented 2010-11-05T12:20:29.055-0400

    "FLUID-3820-2.patch.txt" improves at:

    1. Applied Jamon's suggestion to have an external non-svn ant property file for database credentials;
    2. Corrected test suite title from "inline editor" to "infusion builder";
    3. Removed 'new' when calling a creator function in the test javascript file.

  • Michelle D'Souza commented 2010-11-08T13:16:38.981-0500

    I've reviewed committed your second patch Cindy - please close the JIRA if you are happy with what was committed.

  • Cindy Li commented 2010-11-08T13:18:23.843-0500

    Issue closed.