-
Notifications
You must be signed in to change notification settings - Fork 26
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
[SCHEMATIC-183] Update tests - Use magic mock and add parentId #1554
Changes from 6 commits
6ea80d8
98552d3
040cc01
8f454ff
6a0383c
498af2b
98d345b
c4676cb
8dd2d09
0ee2fd2
0d24776
a4a5dba
b8360cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -705,7 +705,10 @@ def getFilesInStorageDataset( | |
ValueError: Dataset ID not found. | ||
""" | ||
file_list = [] | ||
|
||
# HACK: must requery the fileview to get new files, since SynapseStorage will query the last state | ||
# of the fileview which may not contain any new folders in the fileview. | ||
# This is a workaround to fileviews not always containing the latest information | ||
self.query_fileview(force_requery=True) | ||
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. Post in the team channel to discuss this hack and there's a message in #synapse channel for us to chime in on 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. I wonder if there is something that we can do here with this API: https://rest-docs.synapse.org/rest/POST/entity/id/table/query/async/start.html Specifically: If this get's updated as data is indexed into the table we could fetch the lastUpdatedOn field before we query the table to know if we need to re-query the table or not. 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. Another thing to note: if we look at the failing test that was the motivation behind this hack, it's because it falls outside of the overall schematic flow. So for example: when people upload a bunch of files, they usually first run manifest generate. Now manifest generate will have a "this dataset doesn't exist" situation but then afterwards, the fileview should always consist of the data - theoretically. There have been incidents when it doesn't but that's very little in the grand scheme of things. So we could remove the hack and trigger the fileview indexing within the test but that's probably best as a team decision (but that probably complicates things a bit as it requires re-querying within the synapse storage context that is being passed along per testing function) 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. @GiaJordan After a team discussion, we decided that it would be better to modify the test to re-query the fileview since this is such an edgecase. It does throw an error already, and upon multiple runs of this code outside of the test, it would work. This only doesn't work so smoothly in the test because resources are created and destroyed.
I commented out the HACK for now and the CI will run and I updated the HACK into the test: b8360cb 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. @thomasyu888 thanks for the information and the update! |
||
# Get path to dataset folder by using childern to avoid cases where the dataset is the scope of the view | ||
child_path = self.storageFileviewTable.loc[ | ||
self.storageFileviewTable["parentId"] == datasetId, "path" | ||
|
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.
Work with Bryan to see the difference in speeds between dev branch and prod branch within signoz.
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.
#1552
Is necessary to filter out difference between branches in gh runs. It's possible to get the data now, just a bit more difficult to filter it out. As of now the average duration of this function plotted over time:
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.
Feel free to pull develop into this feature branch and we can compare the develop branch to this feature branch performance.
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.
Thanks @BryanFauble. Done
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.
@thomasyu888 These are the results over the past 5 days. We can see your branch has a much better average execution time for this function. Although, similar to
bwmac/SCHEMATIC-163/error-message-update
for some reason.We can selected on a few fields to filter for what we want, perform an average of the duration for the function, then group by a few fields to get these results.
Some other tests: