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

Add flow run path_nodes and path_times fields #109

Merged
merged 4 commits into from
Dec 5, 2024
Merged

Conversation

norkans7
Copy link
Contributor

@norkans7 norkans7 commented Dec 4, 2024

Just add the fields to the test DB
Use the path_nodes and path_times when set

@norkans7 norkans7 changed the title Add flow run path_nodes and path_times fields WIP: Add flow run path_nodes and path_times fields Dec 4, 2024
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.11%. Comparing base (fb5ac37) to head (629c2ef).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #109      +/-   ##
==========================================
- Coverage   63.08%   61.11%   -1.97%     
==========================================
  Files           7        7              
  Lines         997     1304     +307     
==========================================
+ Hits          629      797     +168     
- Misses        263      402     +139     
  Partials      105      105              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@norkans7 norkans7 changed the title WIP: Add flow run path_nodes and path_times fields Add flow run path_nodes and path_times fields Dec 4, 2024
testdb.sql Outdated
(2, '7d68469c-0494-498a-bdf3-bac68321fd6d', 2, TRUE, 6, 1,
'{"agree": {"category": "Strongly agree", "node_uuid": "a0434c54-3e26-4eb0-bafc-46cdeaf435ac", "name": "Do you agree?", "value": "A", "created_on": "2017-05-03T12:25:21.714339+00:00", "input": "A"}}',
'[{"uuid": "c3d0b417-db75-417c-8050-33776ec8f620", "node_uuid": "10896d63-8df7-4022-88dd-a9d93edf355b", "arrived_on": "2017-08-12T15:07:24.049815+02:00", "exit_uuid": "2f890507-2ad2-4bd1-92fc-0ca031155fca"}]',
'2017-08-12 21:11:59.890662+02:00','2017-08-12 21:11:59.890662+02:00','2017-08-12 21:11:59.890662+02:00', 'C', NULL),
'{"d1a55403-83a3-42f1-b24c-6446bb18e6a6"}', '{"2017-08-12T15:07:25.049815+02:00"}', '2017-08-12 21:11:59.890662+02:00','2017-08-12 21:11:59.890662+02:00','2017-08-12 21:11:59.890662+02:00', 'C', NULL),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I intentionally set the path_nodes and path times to not match the values in path for to be sure with the tests

OLD node "10896d63-8df7-4022-88dd-a9d93edf355b"
NEW node "d1a55403-83a3-42f1-b24c-6446bb18e6a6"

Copy link
Member

Choose a reason for hiding this comment

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

that's fine - but let's tweak this to have 2 items in the path to check that the arrays are merged correctly

@norkans7 norkans7 requested a review from rowanseymour December 4, 2024 21:15
@norkans7 norkans7 marked this pull request as ready for review December 4, 2024 21:26
@@ -24,36 +24,47 @@ const (
const sqlLookupRuns = `
SELECT rec.uuid, rec.exited_on, row_to_json(rec)
FROM (
SELECT
Copy link
Contributor Author

Choose a reason for hiding this comment

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

actual change f0cb122

(5, 'abed67d2-06b8-4749-8bb9-ecda037b673b', 3, TRUE, 7, 2, '{}', '[]', NULL, NULL, '2017-10-10 21:11:59.890663+02:00','2017-10-10 21:11:59.890662+02:00','2017-10-10 21:11:59.890662+02:00', 'C', NULL),
(6, '6262eefe-a6e9-4201-9b76-a7f25e3b7f29', 3, TRUE, 7, 2, '{}', '[]', NULL, NULL, '2017-12-12 21:11:59.890662+02:00','2017-12-12 21:11:59.890662+02:00','2017-12-12 21:11:59.890662+02:00', 'C', NULL),
(7, '6c0d7db9-076b-4edc-ab4b-38576ae394fc', 2, TRUE, 7, 2, '{}', '[]', NULL, NULL, '2017-08-13 13:11:59.890662+02:00','2017-08-14 16:11:59.890662+02:00', NULL, 'W', NULL),
(8, '0c54f7b9-875b-4385-ae85-fb9e84f4b3d6', 2, TRUE, 6, 1,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add a new run with path nodes and path times

@rowanseymour rowanseymour merged commit 81999dc into main Dec 5, 2024
6 of 7 checks passed
@rowanseymour rowanseymour deleted the update-fields branch December 5, 2024 14:21
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants