only soft enforce requirements not in projects.txt
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
This commit is contained in:
parent
c4067a3cc0
commit
7af8a1b9b3
16
inc/python
16
inc/python
@ -216,18 +216,14 @@ function setup_package_with_req_sync {
|
|||||||
local update_requirements=$(cd $project_dir && git diff --exit-code >/dev/null || echo "changed")
|
local update_requirements=$(cd $project_dir && git diff --exit-code >/dev/null || echo "changed")
|
||||||
|
|
||||||
if [[ $update_requirements != "changed" ]]; then
|
if [[ $update_requirements != "changed" ]]; then
|
||||||
if [[ "$REQUIREMENTS_MODE" == "soft" ]]; then
|
if is_in_projects_txt $project_dir; then
|
||||||
if is_in_projects_txt $project_dir; then
|
|
||||||
(cd $REQUIREMENTS_DIR; \
|
|
||||||
./.venv/bin/python update.py $project_dir)
|
|
||||||
else
|
|
||||||
# soft update projects not found in requirements project.txt
|
|
||||||
(cd $REQUIREMENTS_DIR; \
|
|
||||||
./.venv/bin/python update.py -s $project_dir)
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
(cd $REQUIREMENTS_DIR; \
|
(cd $REQUIREMENTS_DIR; \
|
||||||
./.venv/bin/python update.py $project_dir)
|
./.venv/bin/python update.py $project_dir)
|
||||||
|
else
|
||||||
|
# soft update projects not found in requirements project.txt
|
||||||
|
echo "$project_dir not a constrained repository, soft enforcing requirements"
|
||||||
|
(cd $REQUIREMENTS_DIR; \
|
||||||
|
./.venv/bin/python update.py -s $project_dir)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
11
stackrc
11
stackrc
@ -149,17 +149,6 @@ DATABASE_QUERY_LOGGING=$(trueorfalse False DATABASE_QUERY_LOGGING)
|
|||||||
# Zero disables timeouts
|
# Zero disables timeouts
|
||||||
GIT_TIMEOUT=${GIT_TIMEOUT:-0}
|
GIT_TIMEOUT=${GIT_TIMEOUT:-0}
|
||||||
|
|
||||||
# Requirements enforcing mode
|
|
||||||
#
|
|
||||||
# - strict (default) : ensure all project requirements files match
|
|
||||||
# what's in global requirements.
|
|
||||||
#
|
|
||||||
# - soft : enforce requirements on everything in
|
|
||||||
# requirements/projects.txt, but do soft updates on all other
|
|
||||||
# repositories (i.e. sync versions for requirements that are in g-r,
|
|
||||||
# but pass through any extras)
|
|
||||||
REQUIREMENTS_MODE=${REQUIREMENTS_MODE:-strict}
|
|
||||||
|
|
||||||
|
|
||||||
# Repositories
|
# Repositories
|
||||||
# ------------
|
# ------------
|
||||||
|
Loading…
Reference in New Issue
Block a user