localstack / localstack/serverless-localstack

Protocol now required when using `custom.localstack.host`

Aperta
#257 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

improve-error-messages status: backlog
Lingua principale
JavaScript
Stelle
542
Fork
92
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Description

Since serverless-loaclstack v1.2.1 it appears that the protocol needs to be included in the custom.localstack.host property.
In older versions it appears this was not required.

Configuration

In our serverless configuration we had something similar to:

custom:
  localstack:
    host: ${env:SOME_VAR, '127.0.0.1'}

i.e. without the protocol (http://).

serverless-localstack v1.2.0:

Using this with:

  • serverless: v3.36.0 (using an older version to be able test with older plugin versions)
  • serverless-localstack: v1.2.0

The debug output shows:

Reconfiguring service acm to use http://127.0.0.1:4566
Reconfiguring service amplify to use http://127.0.0.1:4566
Reconfiguring service apigateway to use http://127.0.0.1:4566

serverless-localstack v1.2.1:

Using this with:

  • serverless: v3.36.0 (using an older version to be able test with older plugin versions)
  • serverless-localstack: v1.2.1

The debug output shows:

Reconfiguring service acm to use 127.0.0.1://127.0.0.1:4566
Reconfiguring service amplify to use 127.0.0.1://127.0.0.1:4566
Reconfiguring service apigateway to use 127.0.0.1://127.0.0.1:4566

which then results in errors such as:

aws: [1] { UnknownEndpoint: Inaccessible host: `127.0.0.1' at port `443'. This service may not be available .....

Additional information

In the documentation the example does include the protocol when setting the custom.localstack.host so I suppose it can also be seen as a configuration error on our end.. but in that case a clearer error message might be useful.

I'm also guessing the change in behavior is caused by #243

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci la configurazione segnalata con serverless-localstack v1.2.0 e v1.2.1, quindi esamina la modifica a cui si fa riferimento in #243 e il codice che costruisce l'endpoint di LocalStack. Il lavoro sarà considerato completato quando un host senza protocollo continuerà a funzionare come prima oppure produrrà un errore di configurazione chiaro, con una copertura di regressione per questo comportamento.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.