Thanks to visit codestin.com
Credit goes to github.com

Skip to content

service get: from other env will overwrite the domains in service.json #25

@alexkli

Description

@alexkli

Problem

Running edgly service get with -e <non-prod> pointing to any non production environment will overwrite the (production) domains in the service.json.

However, the production domains are currently expected to be in the stored service.json, they are not in the edgly.yaml. If they get removed, they are lost and updating the production service would change its domain names now. And furthermore the mapping to other domains for other environments (defined in edgly.yaml) won't work anymore either since it's based on replacing by the production hostnames.

Solution

Options:

  1. Detect this and avoid the overwrite when doing edgly service get -e <non-prod>
  2. Change the configuration in edgly.yaml to include the list of production domains there as well
    • and on service update always replace the domain list in service.json with the one from edgly.yaml for the selected environment
    • basically ignore what's persisted in service.json > domains
    • possible format
      env:
        production:
          id: 12345
          domains:
            - "api.example.com"
            - name: "www.example.com"
              comment: "example website"
        stage:
          id: 67890
          domains:
            - "api-stage.example.com"
            - "www-stage.example.com"
      

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions