-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ensure hash consistency between lockfile and venv (#207)
This change fixes an issue observable in this test run in which riot generated a requirements lockfile for a Venv instance other than the one it was running tests for. This behavior was happening due to riot logic that skipped Venv instances with pkgs == None while preparing the environment, but not while running tests. Thus the fix is to stop riot from ignoring pkgs-less Venvs in all cases. Note these two lines of output from the example test run: ``` Compiling requirements file .riot/requirements/118238b.in RIOT_VENV_HASH=32bd6c2 ``` This illustrates the mismatch. RIOT_VENV_HASH is the hash of the environment in which the command will be run, and for which the lockfile should be generated. The prepare() function had been ignoring that environment and instead preparing an environment for one of its ancestors.
- Loading branch information
1 parent
5a7e061
commit fe9c1c1
Showing
3 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
fixes: | ||
- | | ||
Fixes an issue in which riot generated a requirements lockfile for a Venv instance other than the one it was running tests for. | ||
This behavior was happening due to logic that skipped Venv instances with pkgs == None while preparing the environment, | ||
but not while running tests. The fix is to stop riot from ignoring pkgs-less Venvs in all cases. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters