-
Notifications
You must be signed in to change notification settings - Fork 21
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
Create flowkit_common
module for definitions shared across FlowKit components
#520
Comments
Other obvious thing that would go in this is the JWT generation. Actually after pondering that a bit more, the test token stuff has a dependency on flowmachine, because it uses the query schemas for producing all access tokens, which would introduce a somewhat hidden interdependence, which is exactly what we want to avoid here. |
What I can't quite see the best solution to here is building docker images with a common module tho - can't include stuff from a parallel directory using Basically four options:
|
Presumably we'd also need to publish the common module on pypi, because Flowmachine is. |
@greenape Do you feel this is still a valid issue, now that the token generation has been moved into its own module? The only other thing that is currently shared is the So I'd be happy to close this issue for now and re-open it if we find other pieces of code that should be shared between components. If in the future we do want a properly shared common module which needs to be included in the docker builds, I think I'd personally vote for your option 3 because it's kinda nice to have build scripts (or equivalent makefile targets) anyway. Partly because it makes it more obvious how to build docker image locally, and partly because it would probably allow us to simplify the CircleCI config, which currently contains a bunch of custom build instructions. |
Duped bits of code:
I'm inclined to think that this, in combination with #818 strongly suggests we need some build scripts, and justifies perhaps two common modules. Worth noting that there is a change coming to Docker that will allow per-Dockerfile .dockerignores, which would allow us to build everything from the top directory and allow us to include common modules. |
Closing this - |
There is a frequent exchange of messages in the communication between the flowmachine server, flowapi and flowclient. In order to make validation and testing easier and the communication more understandable (esp. during debugging) it is useful for these messages to have a well-defined structure. This message structure needs to be known by the two FlowKit components involved in the message exchange (e.g. flowapi and flowmachine for messages exchanged via zmq). If we want to avoid making one of the modules a dependency of the other it seems sensible to create a (small) module
flowkit_common
which contains such shared definitions.For example, the class
ZMQReply
currently defined inflowmachine/core/server/zmq_helpers.py
(as well as in flowapi and flowclient) could live there.The text was updated successfully, but these errors were encountered: