From 8c9521d806167da7d90ccdb2c8709fe08c7e35e5 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 12 Mar 2020 13:47:29 -0700 Subject: [PATCH 01/20] Create failcase for deploying the same code twice --- CHANGELOG.md | 2 ++ test/run-deps | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7617a30..7df032f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ # Master +- Add failcase for cache busting + - Correct ftp to https in vendored file - Warn for Django 1.11 approaching EOL, provide link to roadmap diff --git a/test/run-deps b/test/run-deps index 29d7f8f..9992497 100755 --- a/test/run-deps +++ b/test/run-deps @@ -65,6 +65,16 @@ testPylibmc() { assertCapturedSuccess } +testDeployingTwiceUsesTheCache() { + compile "pythonDefault" + assertNotCaptured "Installing collected packages:" + assertCapturedSuccess + compile "pythonDefault" + assertCaptured "Requirement already satisfied:" + assertNotCaptured "Installing collected packages:" + assertCapturedSuccess +} + pushd $(dirname 0) >/dev/null popd >/dev/null From a98a87e1bced933965cf3fe77b8ce014b9f2a92c Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 12 Mar 2020 14:20:49 -0700 Subject: [PATCH 02/20] Remove the lines that bust the cache when we detect that sqlite has changed --- bin/steps/python | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bin/steps/python b/bin/steps/python index c06db37..8d906ff 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -86,14 +86,6 @@ if [[ "$STACK" != "$CACHED_PYTHON_STACK" ]]; then rm -fr .heroku/python-stack .heroku/python-version .heroku/python .heroku/vendor .heroku/python .heroku/python-sqlite3-version fi -# need to clear the cache for first time installing SQLite3, -# since the version is changing and could lead to runtime errors -# with compiled extensions. -if [ -d .heroku/python ] && [ ! -f .heroku/python-sqlite3-version ] && python_sqlite3_check "$PYTHON_VERSION"; then - puts-step "Need to update SQLite3, clearing cache" - rm -fr .heroku/python-stack .heroku/python-version .heroku/python .heroku/vendor -fi - if [ -f .heroku/python-version ]; then if [ ! "$(cat .heroku/python-version)" = "$PYTHON_VERSION" ]; then puts-step "Found $(cat .heroku/python-version), removing" From 56ecd1aef77281b17a6fa5b203db0ca4aa9d3a66 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Wed, 18 Mar 2020 10:18:23 -0400 Subject: [PATCH 03/20] add quick test case --- test/run-focus | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 test/run-focus diff --git a/test/run-focus b/test/run-focus new file mode 100755 index 0000000..cc82c0a --- /dev/null +++ b/test/run-focus @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# Default Python Versions +# shellcheck source=bin/default_pythons +source "bin/default_pythons" + +testDeployingTwiceUsesTheCache() { + compile "pythonDefault" + assertNotCaptured "Installing collected packages:" + assertCapturedSuccess + compile "pythonDefault" + assertCaptured "Requirement already satisfied:" + assertNotCaptured "Installing collected packages:" + assertCapturedSuccess +} + +pushd $(dirname 0) >/dev/null +popd >/dev/null + +source $(pwd)/test/utils +source $(pwd)/test/shunit2 From cc6a03aa541be21edea9ab70bc55a1c4a32bd3d4 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Wed, 18 Mar 2020 14:31:13 -0400 Subject: [PATCH 04/20] Test result of using pip cache on Heroku --- bin/steps/pip-install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/steps/pip-install b/bin/steps/pip-install index 403c3e7..e47c670 100755 --- a/bin/steps/pip-install +++ b/bin/steps/pip-install @@ -47,7 +47,7 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then if [ ! -f "$BUILD_DIR/.heroku/python/bin/pip" ]; then exit 1 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 | tee "$WARNINGS_LOG" | cleanup | indent PIP_STATUS="${PIPESTATUS[0]}" set -e @@ -58,7 +58,8 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then exit 1 fi - # Smart Requirements handling + # Cache pip packages ourselves + ## TODO: Update to cache pip's built-in cache cp requirements.txt .heroku/python/requirements-declared.txt /app/.heroku/python/bin/pip freeze --disable-pip-version-check > .heroku/python/requirements-installed.txt From f7c422e07d7351a3cc16110668406e53ae4ccf8f Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 19 Mar 2020 16:20:30 -0400 Subject: [PATCH 05/20] test clear cache and cache requirements.txt --- bin/steps/pip-install | 6 ++++++ bin/steps/python | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/bin/steps/pip-install b/bin/steps/pip-install index e47c670..6159a07 100755 --- a/bin/steps/pip-install +++ b/bin/steps/pip-install @@ -47,6 +47,8 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then if [ ! -f "$BUILD_DIR/.heroku/python/bin/pip" ]; then exit 1 fi + + /app/.heroku/python/bin/pip install -r "$BUILD_DIR/requirements.txt" --exists-action=w --src=/app/.heroku/src --disable-pip-version-check | tee "$WARNINGS_LOG" | cleanup | indent PIP_STATUS="${PIPESTATUS[0]}" set -e @@ -60,6 +62,10 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then # Cache pip packages ourselves ## TODO: Update to cache pip's built-in cache + + # Update cached version of requirements.txt + cp -R $BUILD_DIR/requirements.txt "$CACHE_DIR/.heroku/requirements.txt" + cp requirements.txt .heroku/python/requirements-declared.txt /app/.heroku/python/bin/pip freeze --disable-pip-version-check > .heroku/python/requirements-installed.txt diff --git a/bin/steps/python b/bin/steps/python index 8d906ff..5d2d0f3 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -96,6 +96,15 @@ if [ -f .heroku/python-version ]; then fi + +echo "$(diff "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt")" + +# Remove python dependencies +if [[ ! -f "$CACHE_DIR/.heroku/requirements.txt" ]] || [[ diff "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt" ]]; then + puts-step "Clearing cached dependencies" + rm -rf .heroku/python +fi + if [ ! "$SKIP_INSTALL" ]; then puts-step "Installing $PYTHON_VERSION" @@ -129,7 +138,7 @@ if ! curl -s "${GETPIP_URL}" -o "$GETPIP_PY" &> /dev/null; then exit 1 fi -# If Pip isn't up to date: +# If a new Python has been installed or Pip isn't up to date: if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then puts-step "Installing pip" From b8fd617d9ca435eb75e17611d19a44b4f53dd698 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 19 Mar 2020 16:26:56 -0400 Subject: [PATCH 06/20] Bash conditional operaters needed for brackets Removing brackets also works Wrong diff check - inverted Remove uninstall step Whitespace is hard --- bin/compile | 10 ++++++---- bin/steps/python | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/compile b/bin/compile index 4a214c2..4df9330 100755 --- a/bin/compile +++ b/bin/compile @@ -262,14 +262,14 @@ source "$BIN_DIR/steps/pipenv" # Uninstall removed dependencies with Pip. # The buildpack will automatically remove any declared dependencies (in requirements.txt) # that were explicitly removed. This machinery is a bit complex, but it is not complicated. -(( start=$(nowms) )) +# (( start=$(nowms) )) # shellcheck source=bin/steps/pip-uninstall -source "$BIN_DIR/steps/pip-uninstall" -mtime "pip.uninstall.time" "${start}" +# source "$BIN_DIR/steps/pip-uninstall" +# mtime "pip.uninstall.time" "${start}" # If no requirements.txt file given, assume `setup.py develop` is intended. # This allows for people to ship a setup.py application to Heroku -# (which is rare, but I vouch that it should work!) +# TODO: hatchet test to confirm if [ ! -f requirements.txt ] && [ ! -f Pipfile ]; then echo "-e ." > requirements.txt @@ -321,6 +321,8 @@ mtime "sqlite3.install.time" "${start}" source "$BIN_DIR/steps/pip-install" mtime "pip.install.time" "${start}" + + # Support for NLTK corpora. # Note: this may only work on Python 2.7. I don't think many customers use this functionality, # and it should probably be undocumented. diff --git a/bin/steps/python b/bin/steps/python index 5d2d0f3..eef658f 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -100,7 +100,7 @@ fi echo "$(diff "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt")" # Remove python dependencies -if [[ ! -f "$CACHE_DIR/.heroku/requirements.txt" ]] || [[ diff "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt" ]]; then +if [[ ! -f "$CACHE_DIR/.heroku/requirements.txt" ]] || ! diff "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt" ; then puts-step "Clearing cached dependencies" rm -rf .heroku/python fi From 6a02499140c45e939f183dad83a2ee8a784eadba Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 19 Mar 2020 17:01:39 -0400 Subject: [PATCH 07/20] Update caching logic so new apps don't get logs actually add changes Missing fi --- bin/steps/pip-install | 4 ++-- bin/steps/python | 24 ++++++++++++++++++------ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/bin/steps/pip-install b/bin/steps/pip-install index 6159a07..643344d 100755 --- a/bin/steps/pip-install +++ b/bin/steps/pip-install @@ -63,8 +63,8 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then # Cache pip packages ourselves ## TODO: Update to cache pip's built-in cache - # Update cached version of requirements.txt - cp -R $BUILD_DIR/requirements.txt "$CACHE_DIR/.heroku/requirements.txt" + # # Update cached version of requirements.txt + # cp -R $BUILD_DIR/requirements.txt "$CACHE_DIR/.heroku/requirements.txt" cp requirements.txt .heroku/python/requirements-declared.txt /app/.heroku/python/bin/pip freeze --disable-pip-version-check > .heroku/python/requirements-installed.txt diff --git a/bin/steps/python b/bin/steps/python index eef658f..92cf400 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -95,14 +95,26 @@ if [ -f .heroku/python-version ]; then fi fi - - -echo "$(diff "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt")" - -# Remove python dependencies -if [[ ! -f "$CACHE_DIR/.heroku/requirements.txt" ]] || ! diff "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt" ; then +# Check if we should reinstall python dependencies +if [[ ! -f "$CACHE_DIR/.heroku/requirements.txt" ]]; then + # IF there's no cached dependencies, update cached version of requirements.txt + # This should only run for new apps and first deploys after this update + cp -R $BUILD_DIR/requirements.txt "$CACHE_DIR/.heroku/requirements.txt" + # If we don't already have a python version, this is a new app + if [ -f .heroku/python-version ]; then puts-step "Clearing cached dependencies" + # if there are any differences, clear the Python cache + # Installing Python over again does not take noticably more time rm -rf .heroku/python + fi +else + # IF there IS a cached directory, check for differences with the new one + if ! diff "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt"; then + puts-step "Clearing cached dependencies" + # if there are any differences, clear the Python cache + # Installing Python over again does not take noticably more time + rm -rf .heroku/python + fi fi if [ ! "$SKIP_INSTALL" ]; then From dee86babe1f3015673bd4666781a87863eaa8110 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 19 Mar 2020 17:20:58 -0400 Subject: [PATCH 08/20] Don't skip install if clearing cache --- bin/steps/python | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/steps/python b/bin/steps/python index 92cf400..1c09807 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -106,6 +106,7 @@ if [[ ! -f "$CACHE_DIR/.heroku/requirements.txt" ]]; then # if there are any differences, clear the Python cache # Installing Python over again does not take noticably more time rm -rf .heroku/python + unset SKIP_INSTALL fi else # IF there IS a cached directory, check for differences with the new one @@ -114,6 +115,7 @@ else # if there are any differences, clear the Python cache # Installing Python over again does not take noticably more time rm -rf .heroku/python + unset SKIP_INSTALL fi fi From a1ef075b534ec360557f6687d6cebe35664d1e10 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 24 Mar 2020 13:15:42 -0400 Subject: [PATCH 09/20] Add Hatchet test --- spec/hatchet/python_spec.rb | 20 +++++++++++++++++++- spec/spec_helper.rb | 8 +++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/spec/hatchet/python_spec.rb b/spec/hatchet/python_spec.rb index 98f0018..ac6c3e1 100644 --- a/spec/hatchet/python_spec.rb +++ b/spec/hatchet/python_spec.rb @@ -1,10 +1,28 @@ require_relative '../spec_helper' -describe "Python!!!!!!!!!!!" do +describe "Default Python Deploy" do it "🐍" do Hatchet::Runner.new('python-getting-started', stack: DEFAULT_STACK).deploy do |app| expect(app.output).to match(/Installing pip/) expect(app.run('python -V')).to match(/3.6.10/) + + + expect(app.output).to_not match("Clearing cached dependencies") + + # Redeploy + run!(%Q{echo "flask" >> requirements.txt}) + run!(%Q{git add . ; git commit --allow-empty -m next}) + app.push! + + # Check for the cache tohave cleared + expect(app.output).to match("Clearing cached dependencies") + + run!(%Q{git commit --allow-empty -m next}) + app.push! + + # The cache should not clear with no changes + expect(app.output).to_not match("Clearing cached dependencies") + end end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 12a11b8..dc7acd1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -20,4 +20,10 @@ if ENV['TRAVIS'] exit 0 if ENV['TRAVIS_PULL_REQUEST'] != 'false' && ENV['TRAVIS_BRANCH'] == 'master' end -DEFAULT_STACK = 'heroku-16' +DEFAULT_STACK = 'heroku-18' + +def run!(cmd) + out = `#{cmd}` + raise "Error running command #{cmd} with output: #{out}" unless $?.success? + return out +end From b65f0cfce36cb1b77c81b3e5b8cd833c28f67a52 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 24 Mar 2020 13:16:22 -0400 Subject: [PATCH 10/20] Add Readme to document install steps --- bin/steps/README.MD | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 bin/steps/README.MD diff --git a/bin/steps/README.MD b/bin/steps/README.MD new file mode 100644 index 0000000..3c23cf7 --- /dev/null +++ b/bin/steps/README.MD @@ -0,0 +1,28 @@ +# Python Buildpack Install Steps + +TODO: Add context on Python install steps, such as why symlinking vs copying + +## Installing the Pip tool + +The Python Buildpack uses a tool called `get-pip` to install the pip tool. This +is done in the `python` script. + +This is in part because Python historically did not come with pip by default. + +## Installing Python packages using Pip + +### Convention: Use `python` process to invoke Pip + +We don't use this convention (yet) but this is an upcoming change being considered. + +This is a bigger concern on Windows than it is in Linux environments, but an +emerging convention in the Python community is to invoke pip using: + +``` +python3 -m pip [options] +``` + +Invoking pip this way ensures correct location - python knows where these +packages are stored because it put them there (defaults to Python's pathing info). + +All normal command line options are available using this method. From 0c2b954a6db3ed0cfe65bdbd94d3c2f471e6b80c Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 24 Mar 2020 13:36:13 -0400 Subject: [PATCH 11/20] Update Changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7df032f..5f44631 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ # Master - Add failcase for cache busting - +- Bugfix: Clearing pip dependencies - Correct ftp to https in vendored file - Warn for Django 1.11 approaching EOL, provide link to roadmap From 3d31167511ad2bde0c32d1ab1b0fe8438c85a58d Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Tue, 24 Mar 2020 13:40:12 -0400 Subject: [PATCH 12/20] Clear test out of helper test stub --- test/run-focus | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/run-focus b/test/run-focus index cc82c0a..65e7d57 100755 --- a/test/run-focus +++ b/test/run-focus @@ -4,14 +4,9 @@ # shellcheck source=bin/default_pythons source "bin/default_pythons" -testDeployingTwiceUsesTheCache() { +# Start with this to quickly run just one local test +testNewTestCase() { compile "pythonDefault" - assertNotCaptured "Installing collected packages:" - assertCapturedSuccess - compile "pythonDefault" - assertCaptured "Requirement already satisfied:" - assertNotCaptured "Installing collected packages:" - assertCapturedSuccess } pushd $(dirname 0) >/dev/null From ab79d077dabc4049c2a18199d6bd69180292f19e Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 26 Mar 2020 11:24:42 -0400 Subject: [PATCH 13/20] gitignore the scratch shunit test --- .gitignore | 2 ++ test/run-focus | 16 ---------------- 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100755 test/run-focus diff --git a/.gitignore b/.gitignore index 1ffa3cb..b1e1f23 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ buildpack/* builds/dockerenv.staging* builds/dockerenv.production + +test/scratch diff --git a/test/run-focus b/test/run-focus deleted file mode 100755 index 65e7d57..0000000 --- a/test/run-focus +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -# Default Python Versions -# shellcheck source=bin/default_pythons -source "bin/default_pythons" - -# Start with this to quickly run just one local test -testNewTestCase() { - compile "pythonDefault" -} - -pushd $(dirname 0) >/dev/null -popd >/dev/null - -source $(pwd)/test/utils -source $(pwd)/test/shunit2 From dcb04b96c35d337f59da71e9e0f05432b5063278 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 26 Mar 2020 11:26:03 -0400 Subject: [PATCH 14/20] clean up todos and commented code --- bin/steps/pip-install | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bin/steps/pip-install b/bin/steps/pip-install index 643344d..560ba3c 100755 --- a/bin/steps/pip-install +++ b/bin/steps/pip-install @@ -60,17 +60,9 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then exit 1 fi - # Cache pip packages ourselves - ## TODO: Update to cache pip's built-in cache - - # # Update cached version of requirements.txt - # cp -R $BUILD_DIR/requirements.txt "$CACHE_DIR/.heroku/requirements.txt" - cp requirements.txt .heroku/python/requirements-declared.txt /app/.heroku/python/bin/pip freeze --disable-pip-version-check > .heroku/python/requirements-installed.txt - echo - # Install test dependencies, for CI. if [ "$INSTALL_TEST" ]; then if [[ -f "$1/requirements-test.txt" ]]; then From bf1563eaa04f5e53e0e26e1a59e3e32191c6fc68 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 26 Mar 2020 11:32:18 -0400 Subject: [PATCH 15/20] clean up commented code --- bin/compile | 9 --------- 1 file changed, 9 deletions(-) diff --git a/bin/compile b/bin/compile index 4df9330..f1a3151 100755 --- a/bin/compile +++ b/bin/compile @@ -259,17 +259,8 @@ mtime "python.install.time" "${start}" # shellcheck source=bin/steps/pipenv source "$BIN_DIR/steps/pipenv" -# Uninstall removed dependencies with Pip. -# The buildpack will automatically remove any declared dependencies (in requirements.txt) -# that were explicitly removed. This machinery is a bit complex, but it is not complicated. -# (( start=$(nowms) )) -# shellcheck source=bin/steps/pip-uninstall -# source "$BIN_DIR/steps/pip-uninstall" -# mtime "pip.uninstall.time" "${start}" - # If no requirements.txt file given, assume `setup.py develop` is intended. # This allows for people to ship a setup.py application to Heroku -# TODO: hatchet test to confirm if [ ! -f requirements.txt ] && [ ! -f Pipfile ]; then echo "-e ." > requirements.txt From 6b9ffb92d951ad5fd7ff4ef69c9907a4e6912245 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 26 Mar 2020 11:34:32 -0400 Subject: [PATCH 16/20] Don't update to use pip cache, yet Also fix whitespace --- bin/steps/pip-install | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/steps/pip-install b/bin/steps/pip-install index 560ba3c..9d49892 100755 --- a/bin/steps/pip-install +++ b/bin/steps/pip-install @@ -48,8 +48,7 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then exit 1 fi - - /app/.heroku/python/bin/pip install -r "$BUILD_DIR/requirements.txt" --exists-action=w --src=/app/.heroku/src --disable-pip-version-check | 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]}" set -e From 2e5fe9f286ab31d1eb61dcaca659d53d1e8bb345 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 26 Mar 2020 11:35:26 -0400 Subject: [PATCH 17/20] Clean up white space --- bin/compile | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/compile b/bin/compile index f1a3151..170026c 100755 --- a/bin/compile +++ b/bin/compile @@ -312,8 +312,6 @@ mtime "sqlite3.install.time" "${start}" source "$BIN_DIR/steps/pip-install" mtime "pip.install.time" "${start}" - - # Support for NLTK corpora. # Note: this may only work on Python 2.7. I don't think many customers use this functionality, # and it should probably be undocumented. From 01b0c1b0db810feda26f79ebf2540c34a971f2cc Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 26 Mar 2020 12:40:53 -0400 Subject: [PATCH 18/20] no longer reference unused build var on travis --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 102e16e..d5449a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,11 +10,11 @@ before_script: script: - docker build --pull --tag travis-build-cedar-14 --file $(pwd)/builds/cedar-14.Dockerfile . - - docker run --rm -e "STACK=cedar-14" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-cedar-14 bash $TESTFOLDER + - docker run --rm -e "STACK=cedar-14" travis-build-cedar-14 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-16 --file $(pwd)/builds/heroku-16.Dockerfile . - - docker run --rm -e "STACK=heroku-16" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-heroku-16 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-16" travis-build-heroku-16 bash $TESTFOLDER - docker build --pull --tag travis-build-heroku-18 --file $(pwd)/builds/heroku-18.Dockerfile . - - docker run --rm -e "STACK=heroku-18" -e "USE_STAGING_BINARIES=$USE_STAGING_BINARIES" travis-build-heroku-18 bash $TESTFOLDER + - docker run --rm -e "STACK=heroku-18" travis-build-heroku-18 bash $TESTFOLDER jobs: include: From 408a081a085da4d95e04f229d3d9656a4f49a6c2 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 26 Mar 2020 16:48:37 -0400 Subject: [PATCH 19/20] Remove faulty test, use Hatchet instead --- test/run-deps | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/test/run-deps b/test/run-deps index 9992497..29d7f8f 100755 --- a/test/run-deps +++ b/test/run-deps @@ -65,16 +65,6 @@ testPylibmc() { assertCapturedSuccess } -testDeployingTwiceUsesTheCache() { - compile "pythonDefault" - assertNotCaptured "Installing collected packages:" - assertCapturedSuccess - compile "pythonDefault" - assertCaptured "Requirement already satisfied:" - assertNotCaptured "Installing collected packages:" - assertCapturedSuccess -} - pushd $(dirname 0) >/dev/null popd >/dev/null From abd9ffdbffab045532cb0e6a48f7a537a3cbc67c Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 26 Mar 2020 17:46:54 -0400 Subject: [PATCH 20/20] Missed bash linting check --- bin/steps/python | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/steps/python b/bin/steps/python index 1c09807..a5c1e12 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -99,7 +99,7 @@ fi if [[ ! -f "$CACHE_DIR/.heroku/requirements.txt" ]]; then # IF there's no cached dependencies, update cached version of requirements.txt # This should only run for new apps and first deploys after this update - cp -R $BUILD_DIR/requirements.txt "$CACHE_DIR/.heroku/requirements.txt" + cp -R "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt" # If we don't already have a python version, this is a new app if [ -f .heroku/python-version ]; then puts-step "Clearing cached dependencies"