-
Notifications
You must be signed in to change notification settings - Fork 95
Nightly Tests: compare2algod in addition to the regular tests #839
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
Conversation
break out once you found a missing field
Co-authored-by: Jack <87339414+algojack@users.noreply.github.com>
winder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you move the parity directory into misc? Other than, and removing future, I'm ready to approve.
👍 In case I ever need some AST parsing thing like this, I've consecrated it all in this gist |
…misc/parity` now works. But have I broken all the other python tests?
winder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Nightly Tests
A test that asserts that relevant new functionality in the unlimited assets feature branch of
go-algorandhas not been merged. This assertion is important to let us know that certain functionalities, need to be refactored as soon as possible.algodv.indexerSwaggerIntroduce a nightly job that:
0. Gets triggered at 3:37 am UTC
1. Runs all the usual Circle tests against the
developbranch2. Loads algod's swagger from the latest
masterbranch commit, and indexer's swagger from the latestdevelopcommit into Python dict's3. Computes the following
json_diff's between the models in those swaggers:4. Compares these diffs against expected diffs (i.e. computes 2 diffs of diffs)
5. Fails if either of the diff of diffs is non-empty
Additional Changes
TealValueandglobal-state-schemato align with algodFAQ
Q: What does this job not do?
It doesn't connect to Slack or anywhere else outside of circle. I don't have the perms to configure that.
Q: How can I see if the test passed or failed?
Look for the circleci_build_and_test_nightly workflows running in Indexer's Circle Pipeline
Q: What does it mean that the nightly test failed because of
algod v. indexer swagger?It means that either some change in
indexer/develop::HEADor some change in thego-algorand/master::HEADcaused an unexpected diff between the swaggers. Typical reasons are:algod's APIindexer's APIparity/reportsor change to swagger locations or formatQ: The nightly test failed because of
algod v. indexer swagger. How can I fix that test?In the most likely case that a new feature was added to algod:
indexer. If so? Create a ticket.parity/reports/*.ymlby their newer versionsparity/reports/*_OUT.ymlIn the second most likely case that the feature was added to indexer and it's not a bug, just follow steps 2 and 3 above.
Summary of changes
Circle
.circleci/config.yml- add Circle workflow circleci_build_and_test_nightly against thedeveloperbranch (currently on this branch to prove its working, but will re-point todeveloperupon final approval)Makefile- new commands for Circlemisc/requirements.txt- pytest, pyaml and gitpythonSwagger Comparison Python Test under
misc/parity/misc/__init__.pyremoved imports... TBD if this worksmisc/parity/.gitignoremisc/parity/__init__.pymisc/parity/json_diff.py- main logicmisc/parity/test_json_diff.py- unit tests forjson_diff.pymisc/parity/reports/algod2indexer_dropped.yml- report of all UNEXPECTED algod features which were dropped by indexermisc/parity/reports/algod2indexer_full.yml- report of all UNEXPECTED indexer vs. algod discrepanciesmisc/parity/test_indexer_v_algod.py- test that compares indexer vs. algod swagger, outputs a report, and compares that report with pre-computed reports. Fails when there are changes between new report and previous.Secondary changes
.gitignore- ignore a common mac fileapi/indexer.oas2.json- small fixes that were suggested by the comparison testcmd/block-generator/docker/docker-compose.yml- change external docker postgres port to avoid conflict with other local sandboxesdocker-compose.yml- change external docker postgres port to avoid conflict with other local sandboxesmisc/docker-compose.yml- change external docker postgres port to avoid conflict with other local sandboxesAutogenerated
Anything under
api/generatedas well asapi/indexer.oas3.ymlcan be ignoredExample Circle Nightly Runs
Passing
NIGHTLY test
Notice above that it ran against the at the time latest go-algorand commit
Failing
NIGHTLY test
Test Plan
Almost everything is just a test, so verify on Circle that the tests are running correctly. Since the only changes in the auto-generated files were triggered by description changes, there should be no functional changes.