*: Use relative Jsonnet imports internally#238
*: Use relative Jsonnet imports internally#238maxbrunet wants to merge 1 commit intothanos-io:mainfrom
Conversation
| @@ -1,5 +1,5 @@ | |||
| local receiveConfigDefaults = import 'kube-thanos/kube-thanos-receive-default-params.libsonnet'; | |||
| local receive = import 'kube-thanos/kube-thanos-receive.libsonnet'; | |||
| local receiveConfigDefaults = import './kube-thanos-receive-default-params.libsonnet'; | |||
There was a problem hiding this comment.
Or you can use full import path of github.com/thanos-io/kube-thanos/jsonnet/kube-thanos/kube-thanos-receive-default-params.libsonnet which is guaranteed to be correct and allows to ditch legacy imports in jsonnet-bundler.
There was a problem hiding this comment.
That is how I use the library, but why would you do that in the library?
And it is still not guaranteed to work, for example here how it is installed in the repo itself:
Lines 4 to 11 in e1a6859
It create
vendor/kube-thanos. It it not guarantee either that the user will use jb, especially that this library does not have any dependency. Another problematic case is if the user wants to use a fork, they need to rename those imports before being able to use it.
...and disable jb's legacy imports Signed-off-by: Maxime Brunet <maxime.brunet@paytm.com>
2e6d0fc to
9d344ab
Compare
|
@kakkoyun @metalmatze any concerns about merging this one if I rebase? |
|
I have concern about this patch, since with relative imports would be much more hard to patch file at source without cloning the whole repository. |
Changes
jb's legacy imports (not used, but making sure they are not accidentally used in the future)Reasons:
kube-thanos/is a valid import path for the end-userjb's legacy imports which are deprecatedVerification
CI passes.