compose icon indicating copy to clipboard operation
compose copied to clipboard

Serverless V4: No deployment.zip file found in the package path you provided.

Open waveFrontSet opened this issue 5 months ago • 1 comments

Are you certain it's a bug?

  • [X] Yes, it looks like a bug

Are you using the latest version?

  • [X] Yes, I'm using the latest version

Is there an existing issue for this?

  • [X] I have searched existing issues, it hasn't been reported yet

Issue description

With serverless 4.2.4, running serverless deploy --stage dev with a service containing a package artifact fails with No ... file found in the package path you provided.. Running the same command in the service folder successfully deploys.

Minimal example:

├── serverless-compose.yml
└── services
    └── a
        ├── deployment.zip
        └── serverless.yml

Here, I simply zipped up services/a/serverless.yml file into services/a/deployment.zip. serverless.yml looks as follows.

service: aa
package:
  artifact: deployment.zip

provider:
  name: aws
  versionFunctions: false
  deploymentMethod: direct
  runtime: python3.12
  region: eu-central-1
  stage: dev

functions:
  foo:
    handler: foo.bar

Running serverless deploy --stage dev in services/a deploys the function:

Deploying "aa" to stage "dev" (eu-central-1)

✔ Service deployed to stack aa-dev (23s)

functions:
  foo: aa-dev-foo (388 B)

Service configuration (serverless-compose.yml) content

services:
  a:
    path: services/a

Command name and used flags

serverless deploy --stage dev

Command output

Deploying "aa" to stage "dev" (eu-central-1)

✖ Stack aa-dev failed to deploy (0s)

✖ Serverless Compose failed to run "deploy" on "a"



Serverless Compose Run Report:

Command:

- deploy

Failed:

- a

✖ No deployment.zip file found in the package path you provided.

waveFrontSet avatar Sep 04 '24 13:09 waveFrontSet