Open jmsfltchr opened 5 years ago
It is common that the latest release of graknlabs/client-python and the latest release of graknlabs/grakn depend upon different commits of graknlabs/build-tools. Using bazel there is no way to use graknlabs/build-tools with two different versions. This is due to the fact that both of these repositories refer to graknlabs/build-tools as @graknlabs_build_tools.
To elaborate on what really happened,
When we discovered this issue, kglib
depends on grakn-core
1.5.7 and client-python
1.5.3.
grakn-core
1.5.7 depends on build-tools
8823be45d1d6898983513e0a64514184003602ab
and client-python
1.5.3 depends on build-tools
a8c117758461368bff9841f9659bff11afbf02a1
.
These two build-tools
have different Pip rules, where in the one used by client-python
, the rule assemble_pip
doesn't yet exist.
Problem to Solve
In KGLIB we wish to conduct tests in CI against the latest releases of
graknlabs/client-python
andgraknlabs/grakn
. This is to ensure that user experience is aligned with the testing conditions in CI. We wish to do this by depending upon git repositories by tag with bazel, using sync-dependencies to auto-update the tags to reflect the latest releases.It is common that the latest release of
graknlabs/client-python
and the latest release ofgraknlabs/grakn
depend upon different commits ofgraknlabs/build-tools
. Using bazel there is no way to usegraknlabs/build-tools
with two different versions. This is due to the fact that both of these repositories refer tograknlabs/build-tools
as@graknlabs_build_tools
.This transitive dependency misalignment makes it impossible to both use bazel and test against the latest releases of
graknlabs/client-python
andgraknlabs/grakn
.Current Workaround
Depend upon
graknlabs/client-python
andgraknlabs/grakn
by commit and use sync-dependencies, in which case they both use the same version ofgraknlabs/build-tools
, hence resolving the conflict.In this case we only test against the latest releases of
graknlabs/client-python
andgraknlabs/grakn
in thetest-deployment-pip
job in CI, when we use a deployed snapshot of KGLIB, which will depend upon a released version ofclient-python
. This version must be manually updated ininstall_requires
ofassemble_pip
. This test will also use a released version of Grakn, retrieved as a zip.Proposed Solution
Add functionality to bazel to permit including transitive dependencies in a scoped way, such that
graknlabs/client-python
,graknlabs/grakn
andgraknlabs/kglib
can each depend upon a different version ofgraknlabs/build-tools
without conflicting.