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

Suggested domain from CLI already used by another customer #803

Closed
JakeChampion opened this issue Feb 8, 2023 · 3 comments · Fixed by #811
Closed

Suggested domain from CLI already used by another customer #803

JakeChampion opened this issue Feb 8, 2023 · 3 comments · Fixed by #811
Labels
bug Something isn't working

Comments

@JakeChampion
Copy link
Contributor

Version

❯ fastly version
Fastly CLI version v6.0.1 (3c31d59)
Built with go version go1.19.5 linux/amd64
Viceroy version: viceroy 0.3.5

What happened

I deployed a new project to c-at-e using fastly compute publish -i and the suggested domain for the project was already taken by another customer, which meant the command failed with the below message:

ERROR: the Fastly API returned 400 Bad Request: Bad request (Domain 'likely-giving-calf.edgecompute.app' is already taken by another customer).

Would it be possible to have the CLI only suggest domains which are not registered with another Fastly Service/Customer?

@JakeChampion JakeChampion added the bug Something isn't working label Feb 8, 2023
@Integralist
Copy link
Collaborator

Unfortunately, there is no API endpoint for validating if a domain is already taken. The CLI would have to try and parse the error message for "is already taken" and then propose a new domain and prompt user to approve it (or have it auto-select it using either --auto-yes or --non-interactive flags)

@mattcone
Copy link
Member

mattcone commented Feb 9, 2023

I just got the same error with the same domain (!)...

mcone@lobo compute-test-feb % fastly compute deploy

There is no Fastly service associated with this package. To connect to an existing service
add the Service ID to the fastly.toml file, otherwise follow the prompts to create a
service now.

Press ^C at any time to quit.

Create new service: [y/N] y

Service name: [compute-test-feb]
✓ Initializing...
✓ Creating service...

Domain: [likely-giving-calf.edgecompute.app]

Backend (hostname or IP address, or leave blank to stop adding backends):


INFO: Processing of the fastly.toml [setup] configuration happens only when there
is no existing service. Once a service is created, any further changes to the service or
its resources must be made manually.

✗ Creating domain 'likely-giving-calf.edgecompute.app'...
✗ Creating domain 'likely-giving-calf.edgecompute.app'...

INFO: Cleaning up service

INFO: Removing Service ID from fastly.toml
Cleanup complete

ERROR: the Fastly API returned 400 Bad Request: Bad request (Domain 'likely-giving-calf.edgecompute.app' is already taken by another customer).

If you believe this error is the result of a bug, please file an issue: https://github.com/fastly/cli/issues/new?labels=bug&template=bug_report.md

@Integralist
Copy link
Collaborator

👋🏻 @mattcone

So the bug you're referring to has been fixed by #808

The issue Jake is referring to has been fixed by #811

Both are now released as part of https://github.com/fastly/cli/releases/tag/v6.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants