Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"serverless deploy --noDeploy" fails with "Unable to setup base domain mappings for ..." #410

Closed
jweyrich opened this issue Jan 11, 2021 · 3 comments
Labels

Comments

@jweyrich
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Bug Report

Error Description
Executing serverless deploy --noDeploy causes an error "Unable to setup base domain mappings for domain" for a new deploy.

From the documentation:

--noDeploy or -n Skips the deployment steps and leaves artifacts in the .serverless directory.

Command Run

serverless deploy --noDeploy

Console Output

> serverless deploy --noDeploy
Serverless: DOTENV: Loading environment variables from .env.prd:
Serverless: 	 - ENV
Serverless: [serverless-jetpack] Packaging 1 functions, 0 services, and 0 layers with concurrency 1
Serverless: [serverless-jetpack] Packaged function (dependency mode): .serverless/v1-buscar-exemplo.zip (4.37s)
Serverless: Packaging service...
Serverless: STAGING VARS: Loading variables.
Serverless: 	STAGE
Serverless: Merged stage variables into ApiGateway Deployment
 
  Error --------------------------------------------------
 
  Error: Error: Unable to setup base domain mappings for <my-domain-here>
      at ServerlessCustomDomain.<anonymous> (/opt/atlassian/pipelines/agent/build/node_modules/serverless-domain-manager/dist/index.js:164:27)
      at Generator.throw (<anonymous>)
      at rejected (/opt/atlassian/pipelines/agent/build/node_modules/serverless-domain-manager/dist/index.js:6:65)
      at process._tickCallback (internal/process/next_tick.js:68:7)
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

Domain Manager Configuration
Replace this with your own serverless.yml file (anonymized, of course) to help us better resolve your issue.

custom:
  customDomain:
    basePath: "bpm-adesao"
    domainName: my-domain-here
    stage: "${self:custom.stage}"
    createRoute53Record: true

Versions

  • Domain Manager version(s): ^4.1.1
  • Node/npm version: 10.22.1
  • Serverless Version: ^1.83.2
  • Lambda Code [e.g. Javascript, Python, Java]

Possible Solution

Do not validate the existence of the domain mapping as it could be the 1st deploy. Or at least let us decide if we want to ignore/skip the error without making the process exit with a non-zero exit code.

Additional context/Screenshots
We deleted the CloudFormation stack from our AWS account to re-deploy the project. It was needed because we had removed the split-stack plugin that was causing other errors and we no longer needed it since AWS bumped the limit for the number of resources in a template from 200 to 500.
After that, it was like deploying the project for the 1st time in the AWS account. There was no API mapping in the API gateway. This made the validation (with --noDeploy flag) ran by our pipeline to fail. After we removed this step, the deploy worked flawlessly.
Here's a screenshot showing the problem:
screenshot

@jweyrich jweyrich added the bug label Jan 11, 2021
@jweyrich
Copy link
Author

Commenting here just to link to the a similar issue under different circumstances: #333

@jweyrich
Copy link
Author

jweyrich commented Sep 13, 2022

I believe this issue became irrelevant in Serverless >= 2.36 since they removed support for --noDeploy.
The serverless package command does pretty much the same without calling any API from AWS. It generates a local package to be deployed by serverless deploy. The package contains all generated zips and the CloudFormation template.

Haven't tested the plugin along with serverless package though.

Related:

@rddimon
Copy link
Collaborator

rddimon commented Feb 6, 2023

Hi @jweyrich

Hope you have solved this issue.

We are not supporting 4.x anymore please try our latest version 6.x and let us know in case of any issues

@rddimon rddimon closed this as completed Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants