aws / aws/aws-lambda-dotnet

When a dotnet lambda zip package contains more than 1 .deps file, the error printed is misleading

Offen
#1,430 4 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug module/lambda-client-lib p2 queued
Vorherrschende Sprache
C#
Sterne
1.7k
Forks
503
Ø Merge
1 T. 18 Std.
Gemergte PRs (30 T.)
21

Beschreibung

Describe the bug

https://github.com/aws/aws-lambda-dotnet/blob/48ea41ecc61136390d62a26ca41d41fa3a4d9e66/Libraries/src/Amazon.Lambda.RuntimeSupport/bootstrap.sh#L73-L74

This bit of code looks for a <assemblyname>.deps file. If that file does not exist it looks for *.deps files.
If it finds more than 1 matching file, it fails with the error message:

The ${LAMBDA_TASK_ROOT} directory is missing the required .deps.json file.

which is slightly misleading.

Expected Behavior

A better error message that indicates that more *.deps files than expected were encoutered.

Current Behavior

A wrong error message that says there were no *.deps files

Reproduction Steps

Add an extra *.deps file to working lambda zip package and deploy it.

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

AWSSDK.Core 3.5.3.3

Targeted .NET Platform

.NET 6

Operating System and version

Amazon Lambda

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Read Libraries/src/Amazon.Lambda.RuntimeSupport/bootstrap.sh at lines 73-74, focusing on the fallback that searches for *.deps files. Reproduce the issue by adding an extra *.deps file to a working Lambda zip and deploying it. Done means the error distinguishes multiple matching files from a missing .deps.json file.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, csharp, shell
Bereich
backend, cloud
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.