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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

cascading import/export/editor dangerous #2762

Open
markus2330 opened this issue Jun 9, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@markus2330
Copy link
Contributor

commented Jun 9, 2019

cascading import/export/editor are currently not implemented and should fail until we have implemented it. As solution write to import/export/editor all namespaces separately (even though then validation does not work 馃槩).

One recent problem: In #2760 the last import removed the spec key.

@kodebach

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2019

One recent problem: In #2760 the last import removed the spec key.

That is probably a merging problem. It seems kdb import treats the imported KeySet as a full replacement for the current part of the KDB rooted at the given key. This is not what I would expect from an import command. Instead I would expect that we just insert new keys, overwrite existing ones and leave all other as is.

In a more complicated example with a full LCDproc config, I actually got merging conflicts and import failed.

cascading import/export/editor are currently not implemented and should fail

The only way I see any of these working, is like this:

  • A cascading key is given
  • If -N is given set the parent key namespace to that
  • If we are root set the namespace to system
  • Else set the namespace to user
  • Proceed as if the resulting key was given by the user

That shouldn't be too hard to implement. It already works like this in kdb file.

Anything actually involving some sort of cascading lookup where different namespaces are mixed together would only cause problems. It would also be very intransparent.

@markus2330

This comment has been minimized.

Copy link
Contributor Author

commented Jun 9, 2019

That is probably a merging problem. [...] In a more complicated example with a full LCDproc config, I actually got merging conflicts and import failed.

Thank you for the input!

The only way I see any of these working, is like this:

Of course it would be better if it works. Otherwise @Piankero can also simply let it fail when cascading keys are given.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.