-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update dolt to v1.15.0 in unit_tests #22
Conversation
4672341
to
73d1bc6
Compare
Wrong parsing of merge output was causing test_merge_fast_forward to fail
This will be removed once issue with dolt table import -u is fixed dolthub/dolt#6675
Improve merge docstring This fixes test_dolt_log_merge_commit test as now merge message is correctly used
This code was never reach as --commit flag was always set by default in dolt merge command
Test is fixed thanks to adding -m flag to merge command
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.
shall we mention in the readme the version of dolt? right now a user needs to check the github actions
73d1bc6
to
f89bc4d
Compare
@@ -184,7 +184,10 @@ def writer(filepath: str): | |||
for row in rows: | |||
fieldnames = fieldnames.union(set(row.keys())) | |||
|
|||
csv_writer = csv.DictWriter(f, fieldnames) | |||
# TODO: this is only needed to make sure test_update_rows passes until an issue |
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.
Let's see if/how quickly dolt resolves the dolt table import -u function.
Until then this fix is needed albeit not necessary in the future.
if len(output) == 5 and output[merge_conflict_pos].startswith("CONFLICT"): | ||
# TODO: this was and remains a hack, we need to parse the output properly | ||
merge_conflict_pos = 8 | ||
if len(output) > 1 and output[merge_conflict_pos].startswith("CONFLICT"): |
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.
The existing version, coming directly from the original doltcli from dolt, was equally hacky.
You can see by searching in the dolt codebase for "CONFLICT (" that the output of the merge command is not immediately clear.
Examples of outputs I could generate are as follows.
For fast forward:
['Fast-forward', 'Updating 41sae35r40u...mkfb6701os', '\x1b[33mcommit 41sae35r...[33m) \x1b[0m', 'Author: tommasogritt...gmail.com>', 'Date: Fri Sep 15 15...+0200 2023', '', '\tOther branch', '', 'test_players | 1 +', '1 tables changed, 1 ...deleted(-)', '']
For conflict:
['Updating rnqbuq47gb4...v73thsjb0u', '\x1b[33mcommit rnqbuq47...[33m) \x1b[0m', 'Author: tommasogritt...gmail.com>', 'Date: Fri Sep 15 15...+0200 2023', '', '\tadded Micheal id 5', '', 'Auto-merging test_players', 'CONFLICT (content): ...st_players', 'Automatic merge fail... unmerged.', "Use 'dolt conflicts...conflicts.', '']
For automatic merging with merge message set to "this_is_my_merge_message"
['Updating fno7svcm2h9...3jfcics6og', '\x1b[33mcommit fno7svcm...[33m) \x1b[0m', 'Merge: sakvecfg1201s...3jfcics6og', 'Author: tommasogritt...gmail.com>', 'Date: Fri Sep 15 15...+0200 2023', '', '\tthis_is_my_merge_message', '', 'test_players | 1 +', '1 tables changed, 1 ...deleted(-)', '']
It started as a simple issue to update to the most recent version of dolt and ended up taking quite a while to fix all the tests and some code logic.