diff --git a/.dockerignore b/.dockerignore index 43aeac7f6f4..bfe41dc2537 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,21 @@ -/.bundle +/.core-bash_history +/.env +/.envrc /.git -/tmp/ -/helpers -/spec -gitignored -/bundler/helpers/helpers/ -/python/helpers/helpers/ +/.vscode-server-insiders/ +/.vscode-server/ +/.vscode/ +/dependabot-*.gem +/dry-run +/pkg +/vendor +/tmp +**/.bundle +**/coverage +**/Gemfile.lock +**/node_modules +!**/spec/fixtures/* +git.store +.byebug_history +.DS_Store +*.pyc diff --git a/Dockerfile.ci b/Dockerfile.ci index 5d8ef5b177e..92a3f2a4625 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -1,14 +1,27 @@ FROM dependabot/dependabot-core -# We pre-install these versions of python as they're known to be used in the -# test suite. These used to be installed in-line, and pre-installing them helps -# with the performance of the python test suite. -RUN pyenv install -s 3.6.13 \ - && pyenv install -s 3.7.1 \ - && pyenv install -s 3.7.10 \ - && git config --global user.name dependabot-ci \ +RUN git config --global user.name dependabot-ci \ && git config --global user.email no-reply@github.com ARG CODE_DIR=/home/dependabot/dependabot-core WORKDIR ${CODE_DIR} -COPY --chown=dependabot:dependabot . ${CODE_DIR} + +COPY --chown=dependabot:dependabot .rubocop.yml ${CODE_DIR}/.rubocop.yml +COPY --chown=dependabot:dependabot omnibus ${CODE_DIR}/omnibus +COPY --chown=dependabot:dependabot dep ${CODE_DIR}/dep +COPY --chown=dependabot:dependabot git_submodules ${CODE_DIR}/git_submodules +COPY --chown=dependabot:dependabot terraform ${CODE_DIR}/terraform +COPY --chown=dependabot:dependabot github_actions ${CODE_DIR}/github_actions +COPY --chown=dependabot:dependabot hex ${CODE_DIR}/hex +COPY --chown=dependabot:dependabot elm ${CODE_DIR}/elm +COPY --chown=dependabot:dependabot docker ${CODE_DIR}/docker +COPY --chown=dependabot:dependabot nuget ${CODE_DIR}/nuget +COPY --chown=dependabot:dependabot maven ${CODE_DIR}/maven +COPY --chown=dependabot:dependabot gradle ${CODE_DIR}/gradle +COPY --chown=dependabot:dependabot cargo ${CODE_DIR}/cargo +COPY --chown=dependabot:dependabot composer ${CODE_DIR}/composer +COPY --chown=dependabot:dependabot go_modules ${CODE_DIR}/go_modules +COPY --chown=dependabot:dependabot python ${CODE_DIR}/python +COPY --chown=dependabot:dependabot npm_and_yarn ${CODE_DIR}/npm_and_yarn +COPY --chown=dependabot:dependabot bundler ${CODE_DIR}/bundler +COPY --chown=dependabot:dependabot common ${CODE_DIR}/common diff --git a/bundler/helpers/v1/.bundle/config b/bundler/helpers/v1/.bundle/config deleted file mode 100644 index 04f57bd2ed9..00000000000 --- a/bundler/helpers/v1/.bundle/config +++ /dev/null @@ -1,2 +0,0 @@ ---- -BUNDLE_PATH: ".bundle" diff --git a/bundler/helpers/v1/.gitignore b/bundler/helpers/v1/.gitignore index 9e978b139fa..c88c5c24353 100644 --- a/bundler/helpers/v1/.gitignore +++ b/bundler/helpers/v1/.gitignore @@ -1,5 +1,4 @@ -/.bundle/* -!/.bundle/config +/.bundle /.env /tmp /dependabot-*.gem diff --git a/bundler/helpers/v1/build b/bundler/helpers/v1/build index 3e31705c677..cbe7d6eaa5a 100755 --- a/bundler/helpers/v1/build +++ b/bundler/helpers/v1/build @@ -10,7 +10,6 @@ fi helpers_dir="$(dirname "${BASH_SOURCE[0]}")" cp -r \ - "$helpers_dir/.bundle" \ "$helpers_dir/lib" \ "$helpers_dir/monkey_patches" \ "$helpers_dir/run.rb" \ @@ -21,5 +20,6 @@ cd "$install_dir" # NOTE: Sets `BUNDLED WITH` to match the installed v1 version in Gemfile.lock # forcing native helpers to run with the same version +BUNDLER_VERSION=2 bundle config set --local path ".bundle" BUNDLER_VERSION=1 bundle config set --local without "test" BUNDLER_VERSION=1 bundle install diff --git a/python/spec/dependabot/python/file_updater/pipfile_file_updater_spec.rb b/python/spec/dependabot/python/file_updater/pipfile_file_updater_spec.rb index 2bbd1999f03..f0d2aa2ca9f 100644 --- a/python/spec/dependabot/python/file_updater/pipfile_file_updater_spec.rb +++ b/python/spec/dependabot/python/file_updater/pipfile_file_updater_spec.rb @@ -513,7 +513,10 @@ let(:requirements_file) do Dependabot::DependencyFile.new( name: "runtime.txt", - content: "python-3.7.1" + content: fixture( + "requirements", + "version_not_specified_runtime.txt" + ) ) end diff --git a/python/spec/dependabot/python/update_checker/pipenv_version_resolver_spec.rb b/python/spec/dependabot/python/update_checker/pipenv_version_resolver_spec.rb index 9662d8ed306..d093b86a424 100644 --- a/python/spec/dependabot/python/update_checker/pipenv_version_resolver_spec.rb +++ b/python/spec/dependabot/python/update_checker/pipenv_version_resolver_spec.rb @@ -5,8 +5,7 @@ require "dependabot/dependency_file" require "dependabot/python/update_checker/pipenv_version_resolver" -namespace = Dependabot::Python::UpdateChecker -RSpec.describe namespace::PipenvVersionResolver do +RSpec.describe Dependabot::Python::UpdateChecker::PipenvVersionResolver do let(:resolver) do described_class.new( dependency: dependency, diff --git a/python/spec/fixtures/pip_compile_files/met_marker.in b/python/spec/fixtures/pip_compile_files/met_marker.in index 9757b7ecf4e..30ef8567544 100644 --- a/python/spec/fixtures/pip_compile_files/met_marker.in +++ b/python/spec/fixtures/pip_compile_files/met_marker.in @@ -1,4 +1,4 @@ -flaky; python_version < '3.7' +flaky; python_version < '2.8' pytest pytest-xdist mock diff --git a/python/spec/fixtures/pyproject_files/exact_version.toml b/python/spec/fixtures/pyproject_files/exact_version.toml index 2b6222cca04..3c47d0bd068 100644 --- a/python/spec/fixtures/pyproject_files/exact_version.toml +++ b/python/spec/fixtures/pyproject_files/exact_version.toml @@ -8,5 +8,5 @@ authors = ["Dependabot "] description = "Various small python projects." [tool.poetry.dependencies] -python = "^3.7" +python = "*" requests = "2.18.0" diff --git a/python/spec/fixtures/pyproject_locks/exact_version.lock b/python/spec/fixtures/pyproject_locks/exact_version.lock index 3c47fbeb584..563bb5509a3 100644 --- a/python/spec/fixtures/pyproject_locks/exact_version.lock +++ b/python/spec/fixtures/pyproject_locks/exact_version.lock @@ -52,7 +52,7 @@ version = "1.21.1" [metadata] content-hash = "a8d5762e953227a34625a209e9cc67a1c6fb2d7a971845829cf2f9cf61a5bd7c" platform = "*" -python-versions = "^3.7" +python-versions = "*" [metadata.hashes] certifi = ["13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7", "9fa520c1bacfb634fa7af20a76bcbd3d5fb390481724c597da32c719a7dca4b0"] diff --git a/python/spec/fixtures/requirements/pip_compile_met_marker.txt b/python/spec/fixtures/requirements/pip_compile_met_marker.txt index 971444dc29e..3203b4acbf4 100644 --- a/python/spec/fixtures/requirements/pip_compile_met_marker.txt +++ b/python/spec/fixtures/requirements/pip_compile_met_marker.txt @@ -8,7 +8,7 @@ apipkg==1.5 # via execnet atomicwrites==1.3.0 # via pytest attrs==17.3.0 execnet==1.6.0 # via pytest-xdist -flaky==3.5.0 ; python_version < "3.7" +flaky==3.5.0 ; python_version < "2.8" mock==3.0.3 more-itertools==7.0.0 # via pytest pluggy==0.9.0 # via pytest