Fix cets_status improper missing/unknown tables #40
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.
This PR addresses MIM-2092.
systemInfo looks like that when testing in k8s with Helm:
Why? Because
maps:keys/1
returns sorted keys only in tests (because atoms used in modules are sorted at the compilation step, so it is hard to find this bug in the synthetic environment. Test would also "pass" if we just try to parsestatus_data.txt
and pass it intocets_status:format_data/1
, without first tweaking the atom table like incets_SUITE:test_data_for_duplicate_missing_table_in_status/1
function).Once you start registering atoms dynamically,
maps:keys/1
returns keys in the order atoms were registered in the atom table.This PR ensures that keys are sorted before we do following calculations (like determining which tables are missing).
This PR also splits
cets_status
intogather_data
andformat_data
, so we can more easily debug such issues.