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

adding '/' to consul kv del path to avoid greedy pattern matching and… #182

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

moczkows
Copy link

… remove desired key/subtree

Issue - having files:

  • test.yaml
  • test_dev.yaml

After both are added and populated to consul, when I modify test.yaml only then test.yaml is updated in consul, but test_dev.yaml is removed at the same time.

I think it is related to not having '/' at del path. See: https://www.consul.io/docs/commands/kv/delete.html ("Trailing slashes are important" section)

Local modification fixed problem, but I am not aware of other consequences - would be happy to hear. Also there is second dev reference at the top of file I am not sure I should also modify.

@moczkows moczkows changed the title adding '/' to consul kv del path to avoid gready pattern matching and… adding '/' to consul kv del path to avoid greedy pattern matching and… Aug 16, 2018
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 94.192% when pulling 51d4f61 on moczkows:master into 2b239b6 on breser:master.

@moczkows
Copy link
Author

commits have wrong user - sorry ryanbreen!
I committed from machine when tests were setup and I setup git repo same as travis build was doing (with your user info)

@moczkows
Copy link
Author

Appending "/" to path before delete is now executed only when "expand" mode is used, so we know we are handling consul folders. It fixed failing tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants