aws / aws/aws-lambda-builders

Bug: Using AWS::Serverless::LayerVersion with BuildMethod: makefile and python runtime fails to build

Aperta
#566 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area/build blocked/more-info-needed
Lingua principale
Python
Stelle
380
Fork
161
Merge medio
1g 1h
PR unite (30g)
2

Descrizione

### Description:
Using a template with AWS::Serverless::LayerVersion and BuildMethod: makefile fails building because tha makefile passed to make command seems wrong. The code aws_lambda_builders/workflows/custom_make/actions.py", line 99 is using variable manifest_path which is a dependency manifest not the makefile

### Steps to reproduce:

template.yaml

AWSTemplateFormatVersion : '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: A sample SAM template for deploying Lambda functions.

Resources:

LibsLayer:
Type: AWS::Serverless::LayerVersion
Properties:
ContentUri: ../../layerlibs/
CompatibleRuntimes:
- python3.11
Metadata:
BuildMethod: makefile

/usr/local/bin/sam build --build-dir /tmp/aws-toolkit-vscode/vsctkChoBiG/output --template /home/user/github/LambdAtom/atom_vmaas/.vscode/template.yml --manifest /tmp/aws-toolkit-vscode/vsctkChoBiG/debug-requirements.txt --debug

### Observed result:

2023-11-04 12:53:36,389 | CustomMakeBuilder:CopySource succeeded
2023-11-04 12:53:36,390 | LibsLayer: Running CustomMakeBuilder:MakeBuild
2023-11-04 12:53:36,391 | LibsLayer: Current Artifacts Directory : /tmp/aws-toolkit-vscode/vsctkChoBiG/output/LibsLayer
2023-11-04 12:53:36,392 | executing Make: ['make', '--makefile', '/tmp/aws-toolkit-vscode/vsctkChoBiG/debug-requirements.txt', 'build-LibsLayer']
2023-11-04 12:53:36,402 | CustomMakeBuilder:MakeBuild failed
Traceback (most recent call last):
File "aws_lambda_builders/workflows/custom_make/actions.py", line 99, in execute
File "aws_lambda_builders/workflows/custom_make/make.py", line 115, in run
aws_lambda_builders.workflows.custom_make.make.MakeExecutionError: Make Failed: make: *** No rule to make target 'build-LibsLayer'. Stop.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "aws_lambda_builders/workflow.py", line 371, in run
File "aws_lambda_builders/workflows/custom_make/actions.py", line 109, in execute
aws_lambda_builders.actions.ActionFailedError: Make Failed: make: *** No rule to make target 'build-LibsLayer'. Stop.

Build Failed

### Expected result:

['make', '--makefile', '/home/user/github/LambdAtom/layerlibs/Makefile', 'build-LibsLayer']

### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

1. OS: WSL2 Debian
3. If using SAM CLI, `sam --version`: SAM CLI, version 1.100.0
4. AWS region: Local environment and eu-west-3

`Add --debug flag to any SAM CLI commands you are running`

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia da aws_lambda_builders/workflows/custom_make/actions.py, intorno alla riga 99, e segui l’invocazione di make fino a aws_lambda_builders/workflows/custom_make/make.py. Riproduci l’esempio di LayerVersion con BuildMethod: makefile e ispeziona il comando di debug. È completato quando la build utilizza layerlibs/Makefile e raggiunge correttamente il target build-LibsLayer.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
build-system
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.