aws / aws/chalice

chalice package doesn't handle git repos referenced in requirements.txt properly

Open
#1,516 5 comments 7 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
11.1k
Forks
1k
Avg merge
1d 22h
Merged PRs (30d)
2

Description

### Description
When using `chalice package` to package my app I expect it to respect the git repos referenced in the `requirements.txt` file. Instead it uses the version of the installed package to fetch a wheel. This makes it impossible to reference commits in unreleased versions or forks of published python packages.

### Steps To Reproduce
1. Create a `requirements.txt` file that includes a reference to a git repo (see end of this bug report for an example)
1. Run `chalice package`
1. Extract the zip file
1. Check the contents of `github3/repos/commit.py`
1. Notice that the `associated_pull_requests` method isn't there
1. Swear

This was tested with Chalice 1.18.1 on Python 3.7 with the build running on CodeBuild

### Expected Result
Instead of pulling the wheel, chalice will pull the code from the git repo as instructed by the `requirements.txt` file. This would also result in the `associated_pull_requests` method being present in `github3/repos/commit.py`

### requirements.txt
```txt
-e git+ssh://git@github.com/sigmavirus24/github3.py@197173b5669b189f94c433261497cb652f1db1a9#egg=github3
semantic-version==2.8.5
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the provided requirements.txt and chalice package on the stated Python 3.7 setup. Inspect the generated zip and compare github3/repos/commit.py with the referenced git commit. Done means packaging uses the git repository revision, including associated_pull_requests, rather than a wheel from the installed package.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.