roadmap
roadmap copied to clipboard
Pact Example Repos
A placeholder for discussions around pact & pactflow example repos
For discussion: How to structure examples in as few repos as possible
Random points:
- to get language parity, if you can make a small change to an example and replicate it across languages in one PR, much lower barrier to happening than many repos (recently looking at message, finding some snags with python which would be great to demonstrate how to work round, but then that requires a different expected pact etc so then need to update everywhere)
- nice to get some parity over basic steps to build, run etc - easier to have common Makefiles (or whatever else!) to have same templates
- Spec versions are confusing :(
Two suggestions: pactflow/examples <- repo
- v1
- consumer <- subdir per "feature"
- example-consumer-python <- each language implementation of the same "feature"
- example-consumer-js
- consumer-sns
- example-consumer-python-sns
- example-consumer-js-sns vs pactflow/examples <- repo
- consumer <- subdir per "feature"
- consumer <- subdir per "feature"
- v1
- example-consumer-python <- each language implementation of the same "feature"
- example-consumer-js
- v1
- consumer-sns
- v1
- example-consumer-python-sns
- example-consumer-js-sns
- v1
Preference for the first one
Also talked about e.g. run via Docker
I would have one test command, and set it up so the commands are diff if docker, or local MODE=docker make test MODE=local make test
-> include a Docker example of how to setup e.g. your python env with venv, to then either run locally or have "proven" install steps
pactflow/examples <- repo
- v1
- docker
- python
- Dockerfile
- js
- Dockerfile
- python
- docker
Then need to have somewhere to store the expected pacts: pactflow/examples <- repo
- v1
- consumer <- subdir per "feature"
- pacts
- <some template? or example for first one there?>
- example-consumer-python <- each language implementation of the same "feature"
- example-consumer-js
- pacts
- consumer <- subdir per "feature"
For the example, the criteria of success would be for each language implementation they should produce the same Pactfile
-> Overall heading for some big matrix to be able to then have a way to run feature tests across all languages and get a matrix of what does exist, what doesn't -> Low barrier to entry to add in a new feature, or add a test for a feature in a language where there's a gap