Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
So, first off, here's the entire output of the
pipconflictchecker
command:Before reading on, can you tell me what the exact problem is? No StackStorm components rely directly on either
futurist
oropenstacksdk
, so where are those dependencies coming from and why are they conflicting?I couldn't figure it out from this output. I'll circle back around to this point in a bit.
This PR fixes the build failures caused by some transitive dependencies dropping support for Python 3.
In this case:
python-mistralclient
depended onosc-lib >= 1.8.0
(resolved to2.0.0
) which depended onopenstacksdk >= 0.15.0
(resolved to0.44.0
) which depended onfuturist >= 2.1.0
which does not support for Python 2The latest version of
futurist
that supports Python 2 is version1.10.0
.So, to fix the transitive dependency, I explicitly specify a direct dependency of
opensacksdk < 0.44.0
for st2actions and st2api. This installs:python-mistralclient
osc-lib
version2.0.0
openstacksdk
version 0.43.0futurist
version1.10.0
So that we don't break Python 2 support.
Please note that I am not a fan of this solution, it is simply the best of a few bad options. We cannot track and pin every transitive dependency like this - that's time consuming and unsustainable. This is a temporary solution and once we ship ST2 v3.2 and drop Python 2.7 support we won't need to track transitive dependencies like this as they remove support for Python 2.7.
Okay. Let's talk about the output of
pipconflictchecker
. It's pretty much useless unless you already know exactly what you're looking at, which I do not. Neitherfuturist
noropenstacksdk
appear in any of ourrequirements.txt
files - they're both transitive dependencies - so it's exceedingly difficult to figure out what direct requirement/s need to be fixed, andpip-conflict-checker
does absolutely nothing to give you any hints.Instead of using pip-conflict-checker, I just used
pip-compile
from the pip-tools package. The output of that is illuminating. Here is the complete output ofpip-compile
when our dependencies have conflicts:(The
2.1.0
release offuturist
is not shown because that version indicates non-support for Python 2, and this is installing in a Python 2 environment, so pip doesn't even consider installing it.)From that output, I can tell exactly what packages depend on
futurist
, and I can tell exactly what file and what line I need to modify.I updated the
Makefile
andtest-requirements.txt
to usepip-compile
instead ofpip-conflict-checker
since the output is so much more helpful.Once I fix the dependency conflicts, the output of
pip-compile
is much better (this is only the relevant snippets of the full output):Now, this is a little weird, because
openstacksdk
version0.43.0
only depends on thefutures
package, not thefuturist
package. But whatever, this fixes the build. And version0.44.0
ofopenstacksdk
only depends on thefuturist
package.Lastly, I add a
.git
to thepython-mistralclient
dependency inst2actions/in-requirements.txt
to ensure that the dependency only shows up once when combined, sorted, and uniquified with the otherrequirements.txt
files in theMakefile
.