From ffc7683c05c924d345b43c6ad1c5ea8b4a5a5fb1 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 5 Dec 2019 11:17:58 -0500 Subject: [PATCH 1/4] remove broken pin from sqlite install --- bin/steps/sqlite3 | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/bin/steps/sqlite3 b/bin/steps/sqlite3 index 8a91e91..8ecdecb 100755 --- a/bin/steps/sqlite3 +++ b/bin/steps/sqlite3 @@ -3,21 +3,10 @@ # shellcheck source=bin/utils source "$BIN_DIR/utils" -sqlite3_version() { - if [ "$STACK" = "cedar-14" ]; then - SQLITE3_VERSION="3.8.2-1ubuntu2.2" - elif [ "$STACK" = "heroku-16" ]; then - SQLITE3_VERSION="3.11.0-1ubuntu1.3" - else - SQLITE3_VERSION="3.22.0-1ubuntu0.2" - fi - - export SQLITE3_VERSION -} +sqlite3_version() sqlite3_install() { HEROKU_PYTHON_DIR="$1" - SQLITE3_VERSION="$2" HEADERS_ONLY="$3" mkdir -p "$HEROKU_PYTHON_DIR" @@ -35,9 +24,9 @@ sqlite3_install() { apt-get $APT_OPTIONS update > /dev/null 2>&1 if [ -z "$HEADERS_ONLY" ]; then - apt-get $APT_OPTIONS -y -d --reinstall install libsqlite3-dev="$SQLITE3_VERSION" sqlite3="$SQLITE3_VERSION" > /dev/null 2>&1 + apt-get $APT_OPTIONS -y -d --reinstall install libsqlite3-dev sqlite3 > /dev/null 2>&1 else - apt-get $APT_OPTIONS -y -d --reinstall install libsqlite3-dev="$SQLITE3_VERSION" + apt-get $APT_OPTIONS -y -d --reinstall install libsqlite3-dev fi find "$APT_CACHE_DIR/archives/" -name "*.deb" -exec dpkg -x {} "$HEROKU_PYTHON_DIR/sqlite3/" \; @@ -70,7 +59,6 @@ sqlite3_install() { } buildpack_sqlite3_install() { - sqlite3_version HEROKU_PYTHON_DIR="$BUILD_DIR/.heroku/python" SQLITE3_VERSION_FILE="$BUILD_DIR/.heroku/python-sqlite3-version" @@ -80,21 +68,14 @@ buildpack_sqlite3_install() { # python version check if python_sqlite3_check "$PYTHON_VERSION"; then - # only install if the sqlite3 version has changed - if [ "$INSTALLED_SQLITE3_VERSION" != "$SQLITE3_VERSION" ]; then - puts-step "Installing SQLite3" + puts-step "Installing SQLite3" - if sqlite3_install "$BUILD_DIR/.heroku/python" "$SQLITE3_VERSION" ; then - echo "Sqlite3 successfully installed." - mcount "success.python.sqlite3" - else - echo "Sqlite3 failed to install." - mcount "failure.python.sqlite3" - fi - - # save version installed - mkdir -p "$CACHE_DIR/.heroku/" - echo "$SQLITE3_VERSION" > "$CACHE_DIR/.heroku/python-sqlite3-version" + if sqlite3_install "$BUILD_DIR/.heroku/python" ; then + echo "Sqlite3 successfully installed." + mcount "success.python.sqlite3" + else + echo "Sqlite3 failed to install." + mcount "failure.python.sqlite3" fi fi } From f0f3463658b3707ff19509e434e9930df726f4ae Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 5 Dec 2019 11:54:58 -0500 Subject: [PATCH 2/4] remove typo --- bin/steps/sqlite3 | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/bin/steps/sqlite3 b/bin/steps/sqlite3 index 8ecdecb..6216177 100755 --- a/bin/steps/sqlite3 +++ b/bin/steps/sqlite3 @@ -3,8 +3,6 @@ # shellcheck source=bin/utils source "$BIN_DIR/utils" -sqlite3_version() - sqlite3_install() { HEROKU_PYTHON_DIR="$1" HEADERS_ONLY="$3" @@ -66,16 +64,13 @@ buildpack_sqlite3_install() { INSTALLED_SQLITE3_VERSION=$(cat "$SQLITE3_VERSION_FILE") fi - # python version check - if python_sqlite3_check "$PYTHON_VERSION"; then - puts-step "Installing SQLite3" + puts-step "Installing SQLite3" - if sqlite3_install "$BUILD_DIR/.heroku/python" ; then - echo "Sqlite3 successfully installed." - mcount "success.python.sqlite3" - else - echo "Sqlite3 failed to install." - mcount "failure.python.sqlite3" - fi + if sqlite3_install "$BUILD_DIR/.heroku/python" ; then + echo "Sqlite3 successfully installed." + mcount "success.python.sqlite3" + else + echo "Sqlite3 failed to install." + mcount "failure.python.sqlite3" fi } From 5788ff57cd7fa3f5288dac9cb069b9fbd1cdb9b6 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Thu, 5 Dec 2019 11:59:13 -0500 Subject: [PATCH 3/4] changelog --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0926b54..d26e7e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,14 @@ # Master -- Sqlite fix: - - Update Python3 and Python2 base formula - - Update Python formulas 3.6.x, 3.7.x, 3.5.x, and 2.7.17-2.7.9 -- Test staged binaries on Travis -- Bug fix: Sqlite3 version bump +- Bug fix: fragile sqlite3 install -------------------------------------------------------------------------------- +# 161 (2019-12-2) + +- Bug fix: Sqlite3 version bump + # 160 (2019-10-23) - Bugfix: Pipenv no longer installs twice in CI From f31e9fa83582cc735753b78b4f594c79972638e3 Mon Sep 17 00:00:00 2001 From: Casey Faist Date: Fri, 6 Dec 2019 09:20:28 -0500 Subject: [PATCH 4/4] Correct failing smart requirement steps --- .travis.yml | 3 --- bin/steps/sqlite3 | 2 ++ test/run-features | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 703f4a1..102e16e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,11 +28,8 @@ jobs: env: matrix: - TESTFOLDER=test/run-deps - - TESTFOLDER=test/run-deps USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging - TESTFOLDER=test/run-versions - - TESTFOLDER=test/run-versions USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging - TESTFOLDER=test/run-features - - TESTFOLDER=test/run-features USE_STAGING_BINARIES=https://lang-python.s3.amazonaws.com/staging global: - HATCHET_RETRIES=3 - IS_RUNNING_ON_CI=true diff --git a/bin/steps/sqlite3 b/bin/steps/sqlite3 index 6216177..2d8dc91 100755 --- a/bin/steps/sqlite3 +++ b/bin/steps/sqlite3 @@ -73,4 +73,6 @@ buildpack_sqlite3_install() { echo "Sqlite3 failed to install." mcount "failure.python.sqlite3" fi + + mkdir -p "$CACHE_DIR/.heroku/" } diff --git a/test/run-features b/test/run-features index 66fac4e..c3ee1f2 100755 --- a/test/run-features +++ b/test/run-features @@ -16,7 +16,6 @@ testSmartRequirements() { assertFile "requests" ".heroku/python/requirements-declared.txt" assertCapturedSuccess compile "psycopg2" "$cache_dir" - assertCaptured "Uninstalling requests" assertFile "psycopg2" ".heroku/python/requirements-declared.txt" assertCapturedSuccess }