Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCS packages should be locked with their exact commit #2180

Closed
OrangeDog opened this issue May 11, 2018 · 4 comments
Closed

VCS packages should be locked with their exact commit #2180

OrangeDog opened this issue May 11, 2018 · 4 comments
Labels
Category: Dependency Resolution Issue relates to dependency resolution. Category: VCS Relates to version control system dependencies. Type: Bug 🐛 This issue is a bug.
Milestone

Comments

@OrangeDog
Copy link
Contributor

Not sure how hard this is, but it would fill a current hole in the locking mechanism.

All of these Pipfile entries are locked as-is:

package = {git = "ssh://git@bitbucket.org/user/repo.git"}
package = {ref="master", git = "ssh://git@bitbucket.org/user/repo.git"}
package = {ref="v1.0", git = "ssh://git@bitbucket.org/user/repo.git"}
package = {ref="dd9e921", git = "ssh://git@bitbucket.org/user/repo.git"}
"package": {
    "git": "ssh://git@bitbucket.org/user/repo.git",
    "ref": "master"
}

Instead, to ensure the target is actually fixed, the ref should be resolved to its current target when locking.

"package": {
    "git": "ssh://git@bitbucket.org/user/repo.git",
    "ref": "dd9e921f0fa31c50ffb7bff91c5c9c6d552f1b3a",
    "version": "==1.0.2"
}

The hashes can then also be included.

@techalchemy
Copy link
Member

Seems right to me. I was just working on this on my flight and basically just need to grab pips implementation for updating. This will relate to #1690 whenever I get it done.

@techalchemy techalchemy added this to the 11.11.0 milestone May 11, 2018
@OrangeDog
Copy link
Contributor Author

OrangeDog commented May 11, 2018

It also doesn't lock things installed via dependency_links (though they are deprecated, there is no alternative solution that I know of).

Edit
Actually, nothing listed in a VCS setup.py's install_requires is locked, even though it is installed.
@techalchemy shall I make a separate issue for that?

@techalchemy
Copy link
Member

@OrangeDog I was actually just looking at that, no need for a separate issue. I have like 80% of a solution. Locking the actual refs is working but you can see the WIP branch here: ea6f02d

@techalchemy techalchemy self-assigned this May 16, 2018
@techalchemy techalchemy added Type: Bug 🐛 This issue is a bug. Category: Dependency Resolution Issue relates to dependency resolution. Category: VCS Relates to version control system dependencies. labels May 16, 2018
techalchemy added a commit that referenced this issue May 16, 2018
 - Manually obtain and update VCS repository with exact commit
 - Always store exact commit in the lockfile
 - Fixes #2180, #1690, #1611, #2096

Signed-off-by: Dan Ryan <dan@danryan.co>
techalchemy added a commit that referenced this issue May 16, 2018
 - Manually obtain and update VCS repository with exact commit
 - Always store exact commit in the lockfile
 - Fixes #2180, #1690, #1611, #2096

Signed-off-by: Dan Ryan <dan@danryan.co>
techalchemy added a commit to techalchemy/pipenv that referenced this issue May 17, 2018
 - Manually obtain and update VCS repository with exact commit
 - Always store exact commit in the lockfile
 - Fixes pypa#2180, pypa#1690, pypa#1611, pypa#2096

Signed-off-by: Dan Ryan <dan@danryan.co>
@OrangeDog
Copy link
Contributor Author

@techalchemy I just tested 2018.6.25 and it still doesn't appear to lock the install_requires of VCS packages (though they are still installed). You want that separate issue now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Dependency Resolution Issue relates to dependency resolution. Category: VCS Relates to version control system dependencies. Type: Bug 🐛 This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants