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

Implement [setup] configuration for backends #355

Merged
merged 23 commits into from
Aug 10, 2021
Merged

Conversation

Integralist
Copy link
Collaborator

@Integralist Integralist commented Jul 28, 2021

The implementation is based on the [setup] configuration defined in https://developer.fastly.com/reference/fastly-toml/

The PR also removes the existing backend related flags as they only worked for a single backend instance. They're replaced by prompting the user multiple times for backends (or using a user's own [setup] definition).

BREAKING CHANGE?: This PR deletes a set of backend flags, thus breaking existing user expectations, but as we are currently in the 0.x.x range of releases for the CLI I think we should be OK to merge and release these changes as a new 0.x.x release rather than a 1.0.0 because the general consensus around the 0.x.x line is that the public API should not be considered stable until 1.0.0.

Workflow scenarios

  • If [setup] defined with Array of backend tables:
    • Prompt user for input unless --accept-defaults is set.
  • Otherwise:
    • Prompt user repeatedly for backend info unless --accept-defaults is set (will create a single 'originless' backend).

@Integralist Integralist force-pushed the integralist/setup branch 4 times, most recently from 355c696 to 39f720e Compare July 30, 2021 14:10
@Integralist Integralist marked this pull request as ready for review July 30, 2021 15:23
@Integralist Integralist requested review from a team and triblondon and removed request for a team July 30, 2021 15:24
Copy link
Contributor

@triblondon triblondon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of discusison with @Integralist on DM:

  • Remove --backend* flags, because this mode of use is compatible with creating exactly one backend, and that doesn't really make sense anymore.
  • Add an --accept-defaults flag, which performs the deploy non-interactively. That means if the project doesn't have a [setup], the service is created with an 'originless' backend (😂). If the project does have [setup], we use it to create the backends specified, which provides a route for CI-based deploys with specific service config requriements.
  • If the project does not have [setup] and the --accept-defaults flag is not specified, prompt the user repeatedly for backend info until we receive an empty response.

Some additional thoughts:

  • Can we please make it clear what we are naming the backends when we create them, so that the user knows how to reference them in code? And ideally name them something that doesn't look like a hostname. If I specify 'example.com' as my backend host, how about backend_example_com as the name? If the backend name looks like a hostname, the user might well mistakenly think they can just change the value in code to target a different server.
  • Confirming also that backends should now be created with host_header property set automatically. Is that changing in this PR?
  • The PR description notes a blocking relationship between this PR and Provide [setup] configuration compute-starter-kit-rust-default#42. is that because the CLI will remove a [setup] section currently? If the existence of [setup] is inert until this PR ships, maybe these PRs don't need to block one another?

@Integralist Integralist added the enhancement New feature or request label Aug 6, 2021
@Integralist
Copy link
Collaborator Author

Manual testing notes

Below is the output from some manual testing I carried out for both scenarios where there was [setup] configuration was defined and also scenarios where there was no [setup] configuration defined. Lookout for any "questions" asked.

New [setup] Scenarios

Deploy with [setup] configured (configuration taken from this PR), and when prompted we press <ENTER> with no value so that the defaults are applied...

$ 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.

Origin server able to serve `/solutions/` path: [developer.fastly.com]
Backend port number: [443]
Origin server able to serve `/anything` path: [httpbin.org]
Backend port number: [443]
Domain: [preferably-capital-bedbug.edgecompute.app]

✓ Initializing...
✓ Creating service...
✓ Creating domain...
✓ Creating backend 'developer.fastly.com'...
✓ Creating backend 'httpbin.org'...
✓ Uploading package...
✓ Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/7eKJE5yI77nNFWmCIpftOL

View this service at:
        https://preferably-capital-bedbug.edgecompute.app


SUCCESS: Deployed package (service 7eKJE5yI77nNFWmCIpftOL, version 1)

The following scenario is the same as above, except we manually enter values for each prompt...

$ 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.

Origin server able to serve `/solutions/` path: [developer.fastly.com]  www.example.com
Backend port number: [443] 80
Origin server able to serve `/anything` path: [httpbin.org]  www.integralist.co.uk
Backend port number: [443] 443
Domain: [painfully-together-silkworm.edgecompute.app]

✓ Initializing...
✓ Creating service...
✓ Creating domain...
✓ Creating backend 'www.example.com'...
✓ Creating backend 'www.integralist.co.uk'...
✓ Uploading package...
✓ Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/2g2KfUzHWe4CB4mPbstZvy

View this service at:
        https://painfully-together-silkworm.edgecompute.app


SUCCESS: Deployed package (service 2g2KfUzHWe4CB4mPbstZvy, version 1)

The following scenario is the same as above, except we also add the --verbose flag so we can see the port/name in the printed output (this means we can see the 'default' backend names provided by the [setup] configuration)...

$ fastly compute deploy --verbose
Fastly API token provided via FASTLY_API_TOKEN
Fastly API endpoint: https://api.fastly.com

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.

Origin server able to serve `/solutions/` path: [developer.fastly.com]  www.example.com
Backend port number: [443] 80
Origin server able to serve `/anything` path: [httpbin.org]  www.integralist.co.uk
Backend port number: [443] 443
Domain: [vertically-fitting-hen.edgecompute.app]

Creating service...
Creating domain...
Creating backend 'www.example.com' (port: 80, name: backend_name)...
Creating backend 'www.integralist.co.uk' (port: 443, name: other_backend_name)...
Setting service ID in manifest to "5RpBAXXZJnACmHPp40BzwY"...
Uploading package...
Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/5RpBAXXZJnACmHPp40BzwY

View this service at:
        https://vertically-fitting-hen.edgecompute.app


SUCCESS: Deployed package (service 5RpBAXXZJnACmHPp40BzwY, version 1)

The following scenario demonstrates the use of the --accept-defaults flag...

$ fastly compute deploy --accept-defaults --verbose
Fastly API token provided via FASTLY_API_TOKEN
Fastly API endpoint: https://api.fastly.com

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.

Domain: [clearly-harmless-shrew.edgecompute.app]

Creating service...
Creating domain...
Creating backend 'developer.fastly.com' (port: 443, name: backend_name)...
Creating backend 'httpbin.org' (port: 443, name: other_backend_name)...
Setting service ID in manifest to "2zaKPg17vxJvI4F6BmrhGr"...
Uploading package...
Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/2zaKPg17vxJvI4F6BmrhGr

View this service at:
        https://clearly-harmless-shrew.edgecompute.app


SUCCESS: Deployed package (service 2zaKPg17vxJvI4F6BmrhGr, version 1)

The following scenario uses a custom [setup] I created, where I omitted the 'prompt', 'port' and 'name' fields to demonstrate the default behaviour (such as the generation of the backend name based on the address given)...

$ fastly compute deploy --verbose
Fastly API token provided via FASTLY_API_TOKEN
Fastly API endpoint: https://api.fastly.com

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.

Origin server for 'developer_fastly_com': [developer.fastly.com]
Backend port number: [80]
Origin server for 'httpbin_org': [httpbin.org]
Backend port number: [80]
Domain: [randomly-eminent-bluejay.edgecompute.app]

Creating service...
Creating domain...
Creating backend 'developer.fastly.com' (port: 80, name: developer_fastly_com)...
Creating backend 'httpbin.org' (port: 80, name: httpbin_org)...
Setting service ID in manifest to "6IDx4lkSjyWZDb5GdEyBgp"...
Uploading package...
Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/6IDx4lkSjyWZDb5GdEyBgp

View this service at:
        https://randomly-eminent-bluejay.edgecompute.app


SUCCESS: Deployed package (service 6IDx4lkSjyWZDb5GdEyBgp, version 1)

The following scenario is the same as above, but I tweaked the custom [setup] configuration so that one of the required backends is an IP address and not a hostname (so notice the backend name auto-generated from the IP)...

$ fastly compute deploy --verbose
Fastly API token provided via FASTLY_API_TOKEN
Fastly API endpoint: https://api.fastly.com

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.

Origin server for 'developer_fastly_com': [developer.fastly.com]
Backend port number: [80]
Origin server for '192_168_0_1': [192.168.0.1]
Backend port number: [80]
Domain: [mildly-crack-lark.edgecompute.app]

Creating service...
Creating domain...
Creating backend 'developer.fastly.com' (port: 80, name: developer_fastly_com)...
Creating backend '192.168.0.1' (port: 80, name: 192_168_0_1)...
Setting service ID in manifest to "0ylAmv1uXnYV3SE79ksuiS"...
Uploading package...
Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/0ylAmv1uXnYV3SE79ksuiS

View this service at:
        https://mildly-crack-lark.edgecompute.app


SUCCESS: Deployed package (service 0ylAmv1uXnYV3SE79ksuiS, version 1)

No [setup] Scenarios

Deploy with no [setup] configured, and when prompted we press <ENTER> (defaults to originless) meaning we don’t continue to prompt the user more than once...

$ 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.

Backend (hostname or IP address, or leave blank to stop adding backends): [originless]
Domain: [remarkably-promoted-sawfly.edgecompute.app]

✓ Initializing...
✓ Creating service...
✓ Creating domain...
✓ Creating backend '127.0.0.1'...
✓ Uploading package...
✓ Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/5tdkuwWbwBXPsHilhkAYkj

View this service at:
        https://remarkably-promoted-sawfly.edgecompute.app


SUCCESS: Deployed package (service 5tdkuwWbwBXPsHilhkAYkj, version 1)

Question: Should we hide the backend creation process (see below, as it could be confusing to see that backend creation step) for "originless" scenarios, and if so what do we report if an error should occur creating the originless backend?

✓ Creating backend '127.0.0.1'...

Deploy with no [setup] configured, and when prompted we provide multiple backends, before pressing <ENTER> (with no value provided) to cause the prompts to stop being displayed and to move onto the 'domain' prompt...

$ 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.

Backend (hostname or IP address, or leave blank to stop adding backends): [originless] developer.fastly.com
Backend port number: [80] 443
Backend name: fastly
Backend (hostname or IP address, or leave blank to stop adding backends): [originless] www.google.com
Backend port number: [80] 443
Backend name: google
Backend (hostname or IP address, or leave blank to stop adding backends): [originless]
Domain: [supposedly-modest-shark.edgecompute.app]

✓ Initializing...
✓ Creating service...
✓ Creating domain...
✓ Creating backend 'developer.fastly.com'...
✓ Creating backend 'www.google.com'...
✓ Uploading package...
✓ Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/66q3NFMQlpwPZ3mIH7UqJd

View this service at:
        https://supposedly-modest-shark.edgecompute.app


SUCCESS: Deployed package (service 66q3NFMQlpwPZ3mIH7UqJd, version 1)

Same as above but adding --verbose so we can see the port/name of the backend in the output...

$ fastly compute deploy --verbose
Fastly API token provided via FASTLY_API_TOKEN
Fastly API endpoint: https://api.fastly.com

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.

Backend (hostname or IP address, or leave blank to stop adding backends): [originless] developer.fastly.com
Backend port number: [80] 443
Backend name: fastly
Backend (hostname or IP address, or leave blank to stop adding backends): [originless] www.google.com
Backend port number: [80] 443
Backend name: google
Backend (hostname or IP address, or leave blank to stop adding backends): [originless]
Domain: [simply-funny-lion.edgecompute.app]

Creating service...
Creating domain...
Creating backend 'developer.fastly.com' (port: 443, name: fastly)...
Creating backend 'www.google.com' (port: 443, name: google)...
Setting service ID in manifest to "4mhj0UD5GlRhZGgq0d4Pn2"...
Uploading package...
Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/4mhj0UD5GlRhZGgq0d4Pn2

View this service at:
        https://simply-funny-lion.edgecompute.app


SUCCESS: Deployed package (service 4mhj0UD5GlRhZGgq0d4Pn2, version 1)

The following scenario demonstrates the use of the --accept-defaults flag (notice the output that shows a backend being created)...

$ fastly compute deploy --accept-defaults --verbose
Fastly API token provided via FASTLY_API_TOKEN
Fastly API endpoint: https://api.fastly.com

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.

Domain: [uniformly-peaceful-pheasant.edgecompute.app]

Creating service...
Creating domain...
Creating backend '127.0.0.1' (port: 80, name: originless)...
Setting service ID in manifest to "7EiBnnjIOM94E9sgUBFXsG"...
Uploading package...
Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/7EiBnnjIOM94E9sgUBFXsG

View this service at:
        https://uniformly-peaceful-pheasant.edgecompute.app


SUCCESS: Deployed package (service 7EiBnnjIOM94E9sgUBFXsG, version 1)

Question: Same as asked earlier, should we hide the backend creation process as it could be confusing to see the backend creation step for "originless" scenarios...

Creating backend '127.0.0.1' (port: 80, name: originless)...

...and if we do hide it what do we report if an error should occur creating the originless backend?

Copy link
Contributor

@triblondon triblondon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • "Origin" => "Backend" to be consistent
  • accept-defaults should also accept the default for the domain
  • Remove 'originless' from the default value for non-setup backend address
  • Backend provisioning output verbose by default and make it `Creating backend {name} (host: {host}, port: {port})
  • Suppress output for creation of originless backend
  • Where a backend doesn't have a name defined, generate backend_{idx} instead of something based on the hostname or IP (except for the 'originless' special case)

pkg/commands/compute/deploy.go Outdated Show resolved Hide resolved
@Integralist
Copy link
Collaborator Author

Integralist commented Aug 10, 2021

Manual testing notes (part 2)

Below is the output from some manual testing I carried out for both scenarios where there was [setup] configuration defined and also scenarios where there was no [setup] configuration defined.

New [setup] Scenarios

Deploy with [setup] configured (configuration taken from this PR), and when prompted we press <ENTER> with no value so that the defaults are applied...

$ 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.

Backend able to serve `/solutions/` path: [developer.fastly.com]
Backend port number: [443]
Backend able to serve `/anything` path: [httpbin.org]
Backend port number: [443]
Domain: [actually-arriving-dinosaur.edgecompute.app]

✓ Initializing...
✓ Creating service...
✓ Creating domain...
✓ Creating backend 'backend_name' (host: developer.fastly.com, port: 443)...
✓ Creating backend 'other_backend_name' (host: httpbin.org, port: 443)...
✓ Uploading package...
✓ Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/0RVaujG3KVMyX6b3rB5IHv

View this service at:
        https://actually-arriving-dinosaur.edgecompute.app


SUCCESS: Deployed package (service 0RVaujG3KVMyX6b3rB5IHv, version 1)

The following scenario is the same as above, except we manually enter values for each prompt...

$ 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.

Backend able to serve `/solutions/` path: [developer.fastly.com]  www.example.com
Backend port number: [443] 80
Backend able to serve `/anything` path: [httpbin.org]  www.integralist.co.uk
Backend port number: [443] 123
Domain: [partly-driven-perch.edgecompute.app]

✓ Initializing...
✓ Creating service...
✓ Creating domain...
✓ Creating backend 'backend_name' (host: www.example.com, port: 80)...
✓ Creating backend 'other_backend_name' (host: www.integralist.co.uk, port: 123)...
✓ Uploading package...
✓ Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/3ZR6MaQUFukJbNKd55uAYw

View this service at:
        https://partly-driven-perch.edgecompute.app


SUCCESS: Deployed package (service 3ZR6MaQUFukJbNKd55uAYw, version 1)

The following scenario demonstrates the use of the --accept-defaults flag (notice no message about there being no service associated with the package, or any kind of prompt -- everything is automated)...

$ fastly compute deploy --accept-defaults

✓ Initializing...
✓ Creating service...
✓ Creating domain...
✓ Creating backend 'backend_name' (host: developer.fastly.com, port: 443)...
✓ Creating backend 'other_backend_name' (host: httpbin.org, port: 443)...
✓ Uploading package...
✓ Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/4v3UGgVu5CsV0lIMNUPoHC

View this service at:
        https://certainly-adapting-grizzly.edgecompute.app


SUCCESS: Deployed package (service 4v3UGgVu5CsV0lIMNUPoHC, version 1)

The following scenario uses a custom [setup] I created, where I omitted the 'prompt', 'port' and 'name' fields to demonstrate the default values when they aren't configured in the fastly.toml (pay attention to the generated backend names)...

$ 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.

Backend for 'backend_1': [developer.fastly.com]
Backend port number: [80]
Backend for 'backend_2': [httpbin.org]
Backend port number: [80]
Domain: [steadily-rare-tarpon.edgecompute.app]

✓ Initializing...
✓ Creating service...
✓ Creating domain...
✓ Creating backend 'backend_1' (host: developer.fastly.com, port: 80)...
✓ Creating backend 'backend_2' (host: httpbin.org, port: 80)...
✓ Uploading package...
✓ Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/6IuY1xED036CMdujK2gjCc

View this service at:
        https://steadily-rare-tarpon.edgecompute.app


SUCCESS: Deployed package (service 6IuY1xED036CMdujK2gjCc, version 1)

The following scenario is the same as above, but I tweaked the custom [setup] configuration so that one of the required backends is an IP address and not a hostname (so notice the backend name that is auto-generated still has the same formula/pattern as before, i.e. index based)...

$ 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.

Backend for 'backend_1': [developer.fastly.com]
Backend port number: [80]
Backend for 'backend_2': [127.0.0.1]
Backend port number: [80]
Domain: [poorly-nearby-boa.edgecompute.app]

✓ Initializing...
✓ Creating service...
✓ Creating domain...
✓ Creating backend 'backend_1' (host: developer.fastly.com, port: 80)...
✓ Creating backend 'backend_2' (host: 127.0.0.1, port: 80)...
✓ Uploading package...
✓ Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/3PDD30oLx304eXousHlaEB

View this service at:
        https://poorly-nearby-boa.edgecompute.app


SUCCESS: Deployed package (service 3PDD30oLx304eXousHlaEB, version 1)

No [setup] Scenarios

Deploy with no [setup] configured, and when prompted we press <ENTER> (internally it defaults to 'originless') meaning we don’t continue to prompt the user more than once (notice we don't show a message about creating a backend)...

$ 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.

Backend (hostname or IP address, or leave blank to stop adding backends):
Domain: [correctly-brief-sunfish.edgecompute.app]

✓ Initializing...
✓ Creating service...
✓ Creating domain...
✓ Uploading package...
✓ Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/660sXHvZWmiSvoI69JKrTJ

View this service at:
        https://correctly-brief-sunfish.edgecompute.app


SUCCESS: Deployed package (service 660sXHvZWmiSvoI69JKrTJ, version 1)

Deploy with no [setup] configured, and when prompted we provide multiple backends, before pressing <ENTER> (with no value provided) to cause the prompts to stop being displayed and to move onto the 'domain' prompt...

$ 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.

Backend (hostname or IP address, or leave blank to stop adding backends): developer.fastly.com
Backend port number: [80] 443
Backend name: fastly
Backend (hostname or IP address, or leave blank to stop adding backends): www.google.com
Backend port number: [80] 443
Backend name: google
Backend (hostname or IP address, or leave blank to stop adding backends):
Domain: [radically-pleasing-pika.edgecompute.app]

✓ Initializing...
✓ Creating service...
✓ Creating domain...
✓ Creating backend 'fastly' (host: developer.fastly.com, port: 443)...
✓ Creating backend 'google' (host: www.google.com, port: 443)...
✓ Uploading package...
✓ Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/1d4pNorVwFLdG6dIejLEEp

View this service at:
        https://radically-pleasing-pika.edgecompute.app


SUCCESS: Deployed package (service 1d4pNorVwFLdG6dIejLEEp, version 1)

The following scenario demonstrates the use of the --accept-defaults flag (notice no message about there being no service associated with the package, or any kind of prompt, which means we default to 'originless' so no output about backend creation -- everything is automated)...

$ fastly compute deploy --accept-defaults

✓ Initializing...
✓ Creating service...
✓ Creating domain...
✓ Uploading package...
✓ Activating version...

Manage this service at:
        https://manage.fastly.com/configure/services/2dJrmmdGNqskig2AT0Zyfz

View this service at:
        https://lately-trusting-gopher.edgecompute.app


SUCCESS: Deployed package (service 2dJrmmdGNqskig2AT0Zyfz, version 1)

@Integralist Integralist merged commit 7eb8f1d into main Aug 10, 2021
@Integralist Integralist deleted the integralist/setup branch August 10, 2021 10:14
Integralist added a commit that referenced this pull request Aug 10, 2021
* add new setup field

* refactor deploy logic to handle backends via [setup] configuration

* implement test for new backends setup config

* fix old backend error test to display address

* Some fixes to the logic found during manual testing

* add error scenarios to tests

* fix issue with publish flags not aligning with deploy

* fix deploy tests after rebase

* add more [setup] test scenarios

* Fix tests to accept multiple mocked prompts

* fix logic that validates an existing service

* delete any unused mock apis + fix last test to validate another scenario

* add new test to validate use of --accept-defaults for existing service

* add spacing for messaging

* move variable nearer to its use

* reduce duplication of originless creation

* default to originless creation

* add test to validate only some backends are prompted if missing in [setup] scenario

* ensure backend name is displayed

* Update accept-defaults description and ensure domain isn't prompted

* remove references to originless, and use consistent language for backends

* ensure originless output is hidden

* use index for generating backend names
Integralist added a commit that referenced this pull request Aug 10, 2021
* add new setup field

* refactor deploy logic to handle backends via [setup] configuration

* implement test for new backends setup config

* fix old backend error test to display address

* Some fixes to the logic found during manual testing

* add error scenarios to tests

* fix issue with publish flags not aligning with deploy

* fix deploy tests after rebase

* add more [setup] test scenarios

* Fix tests to accept multiple mocked prompts

* fix logic that validates an existing service

* delete any unused mock apis + fix last test to validate another scenario

* add new test to validate use of --accept-defaults for existing service

* add spacing for messaging

* move variable nearer to its use

* reduce duplication of originless creation

* default to originless creation

* add test to validate only some backends are prompted if missing in [setup] scenario

* ensure backend name is displayed

* Update accept-defaults description and ensure domain isn't prompted

* remove references to originless, and use consistent language for backends

* ensure originless output is hidden

* use index for generating backend names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants