'sam build' does not prompt when awaiting input for codeartifact login credentials
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 1.2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 52
Description
**Description:**
With **pip** configured to search **codeartifact**, running **sam build** on the simple **Hello World** application waits indefinitely without prompting the user to enter **codeartifact** credentials.
**Steps to reproduce the issue:**
1. Create a **codeartifact** domain and repository.
- Create domain
- Create repository and select **pypi** as an external resource
- Choose "View connection instruction", choose **pip**, copy the instructions to clipboard
2. On development system, before running copied command, modify the expiration to 15 minutes
- paste the copied command into a terminal window/shell
- add '--duration-seconds 900' to the pasted command
- run the command
3. Wait 15 minutes for credentials to expire.
4. sam init --name demo-hang --runtime python3.8 --dependency-manager pip --app-template hello-world
5. cd demo-hang
6. sam build
**Observed result:**
$sam build
Building function 'HelloWorldFunction'
Running PythonPipBuilder:ResolveDependencies
Build Failed
Error: PythonPipBuilder:ResolveDependencies - Could not satisfy the requirement: requests
$
1. Command waits for unidentified user input.
2. Press 'Enter' and the command completes with 'Build Failed', etc, with no indication of underlying codeartifact failure.
**Expected result:**
Expected either an error or a message as to what **sam build** is waiting for.
**Additional information:**
1. Running 'sam build --debug' reveals that the hang is waiting for credentials for codeartifact.
2. Work around is to login using "aws codeartifact login ..." and then run "sam build"
3. Work around requires knowing the codeartifact domain (most people will have only one domain)
4. The system being tested has both Python3.7 and 3.8 installed.
Contributor guide
Assessment
This issue has not been assessed yet.