Skip to content
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

Ensure contracts backward compatibility against published release. #194

Open
pgev opened this issue Apr 11, 2019 · 1 comment
Open

Ensure contracts backward compatibility against published release. #194

pgev opened this issue Apr 11, 2019 · 1 comment

Comments

@pgev
Copy link
Collaborator

pgev commented Apr 11, 2019

As a release manager I want release's acceptance tests to fail in case of breaking changes in contracts' interfaces so that I can block the release.

@pgev pgev added Epic and removed Epic labels Apr 11, 2019
@pgev
Copy link
Collaborator Author

pgev commented Apr 11, 2019

A proposed solution:

The external facing contracts are the ones that we include in npm package. This list is defined in ./npm_package/contract_names.json file.

  • Write a shell (or node) script to generate ABIs of the contracts listed in ./npm_package/contract_names.json file:
./tools/generate_external_contract_abis.sh --output-dir <output-dir-path>
  • Run:
./tools/generate_external_contract_abis.sh --output-dir ./test/data/external_contract_abis

for the latest published release and commit the generated ABIs into develop.

  • Write a node script ./tools/ensure_backward_compatibility.js that generates ABIs of external contracts, and compares against committed ones (./test/data/external_contract_abis). It's allowed to extend committed external contracts' interfaces (addition), however, deletion and modification should fail the script.

  • Enhance npm_package/test/run_npm_package_test.sh and ./npm_package/make_package.js scripts to run ./tools/ensure_backward_compatibility.js and fail accordingly.

@pgev pgev self-assigned this May 31, 2019
@deepesh-kn deepesh-kn added this to the sprint 2 milestone Jun 10, 2019
@pgev pgev removed their assignment Jun 21, 2019
@deepesh-kn deepesh-kn removed this from the sprint 2 milestone Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants