posit-dev / publisher

MIT License
3 stars 0 forks source link

Deploying with a credential for another server changes deployment `server-url` #1263

Closed dotNomad closed 5 months ago

dotNomad commented 5 months ago

When deploying with a credential for a server that isn't the same as the deployment the server-url in the deployment record changes unexpectedly.

To reproduce you can create a localhost:3939 credential and have one for dogfood.

I used HTTPie to recreate this with just the API. Here I'm using a localhost credential on a deployment record already for a deployment on Dogfood.


❮ http POST :9001/api/deployments/untitled-1 account=localhost
HTTP/1.1 202 Accepted
Content-Length: 31
Content-Type: application/json
Date: Mon, 01 Apr 2024 23:52:28 GMT
Vary: Origin

{
    "localId": "_nRYOn5g-JfkhePC"
}
dotNomad commented 5 months ago

I would expect the invalid credential to be caught on preflight, and not attempt to deploy at all. In my case I'm showing a connectionFailed error since my yeti isn't up.