Skip to content

✨ feat(cli): add --skip-env-install flag for offline env reuse - #3792

Merged
gaborbernat merged 2 commits into
tox-dev:mainfrom
gaborbernat:feat/3310-skip-env-install
Feb 20, 2026
Merged

gaborbernat merged 2 commits into
tox-dev:mainfrom
gaborbernat:feat/3310-skip-env-install

Conversation

@gaborbernat

Copy link
Copy Markdown
Member

When working offline or in CI environments where dependencies are already installed, users had no way to skip the dependency installation step without also losing package installation control. The existing --skip-pkg-install flag only skips package installation but still attempts to install dependencies, which fails without network access. This addresses #3310.

The new --skip-env-install flag skips both dependency installation (deps, dependency groups) and package installation in a single opt-in flag. When set, _setup_env() returns early before calling _install_deps() and _install_dependency_groups(), and _setup_with_env() treats it as implying --skip-pkg-install to also skip package building. This makes it straightforward to reuse a previously populated environment without any network calls.

The flag is available on all run commands (run, run-parallel, legacy) alongside the existing --skip-pkg-install flag. Existing behavior is completely unchanged when the flag is not provided.

Fixes #3310

@gaborbernat gaborbernat added the feature:new something does not exist yet, but should label Feb 20, 2026
@gaborbernat
gaborbernat enabled auto-merge (squash) February 20, 2026 04:42
@gaborbernat
gaborbernat force-pushed the feat/3310-skip-env-install branch from c90b4cd to 9eacf68 Compare February 20, 2026 05:28
@gaborbernat
gaborbernat force-pushed the feat/3310-skip-env-install branch from 9eacf68 to 46d6e96 Compare February 20, 2026 05:41
@gaborbernat
gaborbernat merged commit 7ea5bc1 into tox-dev:main Feb 20, 2026
26 checks passed
@gaborbernat
gaborbernat deleted the feat/3310-skip-env-install branch February 20, 2026 07:38
eugengi added a commit to eugengi/DjangOps that referenced this pull request May 28, 2026
Run tox in offline mode to bypass:
- venv creation
- dep installation
- project installation

[Context]
The gate workflow (build) provides a prepared tox env. This env
is retrievable via a cache key. For (test) to run, build must complete,
and if build completes, then we know that a tox env has been provisioned

[Note]
- Tox already skipped venv creation and installation.
  This update now makes it explicit
- The above context makes running tox in offline mode safe.
  This needs to be monitored closely for the next few runs

[Docs]
See tox feature:
tox-dev/tox#3792

Signed-off-by: Eugene Mwangi <mwangi.em37@gmail.com>
eugengi added a commit to eugengi/DjangOps that referenced this pull request May 28, 2026
Run tox in offline mode to bypass:
- venv creation
- dep installation
- project installation

[Context]
The gate workflow (build) provides a prepared tox env. This env
is retrievable via a cache key. For (test) to run, build must complete,
and if build completes, then we know that a tox env has been provisioned

[Note]
- Tox already skipped venv creation and installation.
  This update now makes it explicit
- The above context makes running tox in offline mode safe.
  This needs to be monitored closely for the next few runs

[Docs]
See tox feature:
tox-dev/tox#3792

Signed-off-by: Eugene Mwangi <mwangi.em37@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided feature:new something does not exist yet, but should

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow tox to use existing environment if no network connectivity

1 participant