Coder Social home page Coder Social logo

configstore's People

Contributors

motns avatar

Stargazers

 avatar  avatar

configstore's Issues

package test doesn't always report where error is found

When running configstore package test with a syntax error in the json the file or sub-environment containing the syntax error is not printed. Only the parent sub-env is printed
Sample output:

Comparing keys for "./config/env/top1/configstore.json" and "./config/env/top2/configstore.json"
Checking sub-environments for env: stag
Checking sub-environment: top1/env1
Checking sub-environment: top1/env2
Checking sub-environment: top1/env3
Checking sub-environment: top1/env4
invalid character ',' after object key

The last line would suggest that there is an error in the top1/env4 sub environment. However, the the error in this case actually in one of many sub environments within env4. eg. top1/env4/subenv6

Create commands for comparing and copying values over two environments

It would be great if there was a functionality that allows to copy values from one environment to another.

For example, we defined two environments prod and disaster_recovery. Both of them are encrypted using different KMS keys. We could have a command that takes values from prod and copies them over to disaster_recovery. Values in the latter one need to be decrypted and encrypted for the new environment.

What's more, it would be great if optionally:

  • some keys can be excluded from copying;
  • or the other way, keys to copied over can be defined;
  • additional keys can be added/overwritten;
  • certain keys can be converted from being encrypted to be decrypted (and the other way).

The functionality is very useful when one environment is "based" on another.

There is a Python script that does that called; it's called confy and can be found here. Though, I was wondering if we could implement that to Configstore.

configstore package create_env failure

The command configstore package create <env_name> requires option --master-key or --insecure, and fails with the following message if not found:

Creating environment: prod
you have to specify --master-key if --insecure is not set

Howerver running it again with the correct option also fails as the directory has already been created, but is empty:

Creating environment: prod
environment already exists: prod

Therefore the directory needs to be manually deleted from the tree before proceeding

Feature request: display envs/subenvs

It would be useful to be able to view a tree structure of the envs and sub envs within a given structure.
Although there is a tree command, this shows the keys & values. In a complex environment with multiple top level envrironments and various sub environments it would be good to see how these are laid out.
Currently the only workaround is running something like

find /path/to/config/env -type d

Error overriding secret values

As secret values can not be set in the override.json it seems possible to set secret values at the top level then overriding them with non-secret values seems possible (ie. the tool allows it). However when trying to access the subenvironment with get or process_templates gives the error:

trying to override key with secret value: key_name

The error would seem to be misleading as I am not overriding the key with a secret, but actually the opposite.

It would be useful to override secret to non-secret to allow creating a sub-environment without secrets, but similar in all other respects to the base env, without having to create a complete new environment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.