Unverified Commit 5f8360cb authored by Kenneth Reitz's avatar Kenneth Reitz Committed by GitHub

Metrics (#657)

* metrics
Signed-off-by: 's avatarKenneth Reitz <me@kennethreitz.org>

* using pipenv anyway
Signed-off-by: 's avatarKenneth Reitz <me@kennethreitz.org>

* instrument bad failures
Signed-off-by: 's avatarKenneth Reitz <me@kennethreitz.org>

* if not
Signed-off-by: 's avatarKenneth Reitz <me@kennethreitz.org>
parent 09165608
...@@ -39,6 +39,8 @@ if [ ! "$DISABLE_COLLECTSTATIC" ] && [ -f "$MANAGE_FILE" ] && [ "$DJANGO_INSTALL ...@@ -39,6 +39,8 @@ if [ ! "$DISABLE_COLLECTSTATIC" ] && [ -f "$MANAGE_FILE" ] && [ "$DJANGO_INSTALL
# Display a warning if collectstatic failed. # Display a warning if collectstatic failed.
[ "$COLLECTSTATIC_STATUS" -ne 0 ] && { [ "$COLLECTSTATIC_STATUS" -ne 0 ] && {
mcount "failure.collectstatic"
echo echo
echo " ! Error while running '$ python $MANAGE_FILE collectstatic --noinput'." echo " ! Error while running '$ python $MANAGE_FILE collectstatic --noinput'."
echo " See traceback above for details." echo " See traceback above for details."
......
...@@ -19,6 +19,15 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then ...@@ -19,6 +19,15 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
# Measure that we're using pip. # Measure that we're using pip.
mcount "tool.pip" mcount "tool.pip"
# Count expected build failures.
if grep -q 'wsgiref' requirements.txt; then
mcount "failure.wsgiref"
fi
if grep -q '==0.0.0' requirements.txt; then
mcount "failure.none-version"
fi
/app/.heroku/python/bin/pip install -r "$BUILD_DIR/requirements.txt" --exists-action=w --src=/app/.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee "$WARNINGS_LOG" | cleanup | indent /app/.heroku/python/bin/pip install -r "$BUILD_DIR/requirements.txt" --exists-action=w --src=/app/.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee "$WARNINGS_LOG" | cleanup | indent
PIP_STATUS="${PIPESTATUS[0]}" PIP_STATUS="${PIPESTATUS[0]}"
set -e set -e
......
...@@ -11,7 +11,10 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then ...@@ -11,7 +11,10 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
cp .heroku/python/requirements-declared.txt requirements-declared.txt cp .heroku/python/requirements-declared.txt requirements-declared.txt
pip-diff --stale requirements-declared.txt requirements.txt --exclude setuptools pip wheel > .heroku/python/requirements-stale.txt
if ! pip-diff --stale requirements-declared.txt requirements.txt --exclude setuptools pip wheel > .heroku/python/requirements-stale.txt; then
mount "failure.bad-requirements"
fi
rm -fr requirements-declared.txt rm -fr requirements-declared.txt
......
...@@ -14,6 +14,7 @@ if [[ -f Pipfile.lock ]]; then ...@@ -14,6 +14,7 @@ if [[ -f Pipfile.lock ]]; then
# echo "To disable this functionality, run the following command:" # echo "To disable this functionality, run the following command:"
# echo "" # echo ""
# echo " $ heroku config:set PIPENV_ALWAYS_INSTALL=1" | indent # echo " $ heroku config:set PIPENV_ALWAYS_INSTALL=1" | indent
mcount "tool.pipenv"
export SKIP_PIPENV_INSTALL=1 export SKIP_PIPENV_INSTALL=1
export SKIP_PIP_INSTALL=1 export SKIP_PIP_INSTALL=1
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment