We're adding the ability to have devstack plugins, which should be
much more free to require new things not in global requirements. Our
old thinking of locking down all the requirements doesn't really work
in a plugin model.
Instead, if the project is in projects.txt, continue with the old
behavior. If it is not, do a soft update (update all the requirements
we know about, leave the ones we don't). This was previously the SOFT
requirements update mode, but now it will just be the default.
Change-Id: Ic0c6e01a6d7613d712ac9e7e4a378cc3a8ce75e6
| ... | ... |
@@ -216,18 +216,14 @@ function setup_package_with_req_sync {
|
| 216 | 216 |
local update_requirements=$(cd $project_dir && git diff --exit-code >/dev/null || echo "changed") |
| 217 | 217 |
|
| 218 | 218 |
if [[ $update_requirements != "changed" ]]; then |
| 219 |
- if [[ "$REQUIREMENTS_MODE" == "soft" ]]; then |
|
| 220 |
- if is_in_projects_txt $project_dir; then |
|
| 221 |
- (cd $REQUIREMENTS_DIR; \ |
|
| 222 |
- ./.venv/bin/python update.py $project_dir) |
|
| 223 |
- else |
|
| 224 |
- # soft update projects not found in requirements project.txt |
|
| 225 |
- (cd $REQUIREMENTS_DIR; \ |
|
| 226 |
- ./.venv/bin/python update.py -s $project_dir) |
|
| 227 |
- fi |
|
| 228 |
- else |
|
| 219 |
+ if is_in_projects_txt $project_dir; then |
|
| 229 | 220 |
(cd $REQUIREMENTS_DIR; \ |
| 230 | 221 |
./.venv/bin/python update.py $project_dir) |
| 222 |
+ else |
|
| 223 |
+ # soft update projects not found in requirements project.txt |
|
| 224 |
+ echo "$project_dir not a constrained repository, soft enforcing requirements" |
|
| 225 |
+ (cd $REQUIREMENTS_DIR; \ |
|
| 226 |
+ ./.venv/bin/python update.py -s $project_dir) |
|
| 231 | 227 |
fi |
| 232 | 228 |
fi |
| 233 | 229 |
|
| ... | ... |
@@ -149,17 +149,6 @@ DATABASE_QUERY_LOGGING=$(trueorfalse False DATABASE_QUERY_LOGGING) |
| 149 | 149 |
# Zero disables timeouts |
| 150 | 150 |
GIT_TIMEOUT=${GIT_TIMEOUT:-0}
|
| 151 | 151 |
|
| 152 |
-# Requirements enforcing mode |
|
| 153 |
-# |
|
| 154 |
-# - strict (default) : ensure all project requirements files match |
|
| 155 |
-# what's in global requirements. |
|
| 156 |
-# |
|
| 157 |
-# - soft : enforce requirements on everything in |
|
| 158 |
-# requirements/projects.txt, but do soft updates on all other |
|
| 159 |
-# repositories (i.e. sync versions for requirements that are in g-r, |
|
| 160 |
-# but pass through any extras) |
|
| 161 |
-REQUIREMENTS_MODE=${REQUIREMENTS_MODE:-strict}
|
|
| 162 |
- |
|
| 163 | 152 |
|
| 164 | 153 |
# Repositories |
| 165 | 154 |
# ------------ |