-
Notifications
You must be signed in to change notification settings - Fork 6
😅Fix failing smoke test on greenfield #2956
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -200,14 +200,14 @@ def infield_legacy( | |
| for view_id in sorted_views: | ||
| instance_batch = to_create_by_view_id[view_id] | ||
| try: | ||
| _ = client.tool.instances.create(instance_batch) | ||
| _ = client.tool.instances.create(instance_batch, replace=True) | ||
| except ToolkitAPIError as e: | ||
| raise AssertionError( | ||
| f"Failed to create instance batch for view {view_id!s}. Error: {e}. Batch: {[item.as_id() for item in instance_batch]}" | ||
| ) from e | ||
| if edges: | ||
| try: | ||
| _ = client.tool.instances.create(edges) | ||
| _ = client.tool.instances.create(edges, replace=True) | ||
| except ToolkitAPIError as e: | ||
| raise AssertionError( | ||
| f"Failed to create instance batch for edges with no view. Error: {e}. Batch: {[item.as_id() for item in edges]}" | ||
|
|
@@ -355,6 +355,10 @@ def test_migrate_data( | |
| "InField migration failed. Found source space identifier in destination data, indicating that some instances were not migrated correctly." | ||
| ) | ||
|
|
||
| # Cleanup for next run. | ||
| destination_node_ids = [node_id for node_ids in destination_by_view_id.values() for node_id in node_ids] | ||
| toolkit_client.tool.instances.delete(destination_node_ids) | ||
|
Comment on lines
+358
to
+360
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The smoke tests currently failed because, this PR changed the destination data. Since the destination data is not cleaned up, only added to, then, the test started failing. |
||
|
|
||
| data_regression.check({"instances": destination_instances}) | ||
|
|
||
| def _get_destination_nodes( | ||
|
|
||
Oops, something went wrong.
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.
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.
This is strictly not necessary, but I added it as it make the set up more robust. Legacy InField is set up exactly the same way each time, it it pre-exist it will be overwritten.