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

Enforce fixture events order #3132

Closed
wants to merge 3 commits into from
Closed

Enforce fixture events order #3132

wants to merge 3 commits into from

Conversation

balanza
Copy link
Member

@balanza balanza commented Nov 7, 2024

Description

Change the dump_scenario utility so that the insertion order of the discovery events is preserved in the exported fixture data.

Furthermore, the scenario healthy-27-node-SAP-cluster has been re-generated so that its events are ordered.

How has data been re-generated?
# start a fresh instance of the database 
docker-compose down -v postgres  && docker-compose up -d postgres
# replay fixture events events 
photofinish run healthy-27-node-SAP-cluster
# dump stored and discarded events
rm test/fixtures/scenarios/healthy-27-node-SAP-cluster
mix eval "Trento.Release.dump_scenario([\"healthy-27-node-SAP-cluster\", \"-p\", \"test/fixtures/scenarios\", \"-d\", \"100\"])"
# append discarded_discovery_events.json to fixture events
(manual)

Repeat the algorithm until the discarded_discovery_events is empty after a run; that means all events have been correctly ingested by Trento Web and thus are in the correct order.

Copy link
Member

@nelsonkopliku nelsonkopliku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@balanza balanza marked this pull request as draft November 8, 2024 09:33
@balanza
Copy link
Member Author

balanza commented Nov 8, 2024

This PR has been made upon assumptions that might be invalid and need further reasoning.

More specifically, exporting commands in order is indeed correct but leads to too many files; the actual implementation just keeps the last discovery per host.

@balanza balanza closed this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants