Browse code

add big warning for extras.d usage

This adds a warning for extras.d usage. This will give us something to
keep an eye on in logstash to build up the list of projects that will
break at Mitaka-1.

This also makes the deprecated handling done through a function, which
will hopefully make it more consistent in the future.

Change-Id: Icd393bc3e7095fe58be0fd13ef74fece3aa5c5f1

Sean Dague authored on 2015/10/07 21:46:13
Showing 1 changed files
... ...
@@ -179,6 +179,12 @@ function die_if_not_set {
179 179
     $xtrace
180 180
 }
181 181
 
182
+function deprecated {
183
+    local text=$1
184
+    DEPRECATED_TEXT+="\n$text"
185
+    echo "WARNING: $text"
186
+}
187
+
182 188
 # Prints line number and "message" in error format
183 189
 # err $LINENO "message"
184 190
 function err {
... ...
@@ -1728,6 +1734,16 @@ function run_phase {
1728 1728
     if [[ -d $TOP_DIR/extras.d ]]; then
1729 1729
         for i in $TOP_DIR/extras.d/*.sh; do
1730 1730
             [[ -r $i ]] && source $i $mode $phase
1731
+            # NOTE(sdague): generate a big warning about using
1732
+            # extras.d in an unsupported way which will let us track
1733
+            # unsupported usage in the gate.
1734
+            local exceptions="50-ironic.sh 60-ceph.sh 80-tempest.sh"
1735
+            local extra=$(basename $i)
1736
+            if [[ ! ( $exceptions =~ "$extra" ) ]]; then
1737
+                deprecated "extras.d support is being removed in Mitaka-1"
1738
+                deprecated "jobs for project $extra will break after that point"
1739
+                deprecated "please move project to a supported devstack plugin model"
1740
+            fi
1731 1741
         done
1732 1742
     fi
1733 1743
     # the source phase corresponds to settings loading in plugins