-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Stop trying to parse deleted schema files #9722
Merged
Merged
Conversation
This file contains 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
…etrics It was raised in #8860 that an error is being raised during partial parsing when files containing metrics/semantic models are deleted. In further testing it looks like this error specifically happens when a file containing both semantic models and metrics is deleted. If the deleted file contains just semantic models or metrics there seems to be no issue. The next commit should contain the fix.
Waaaay back (in 7563b99) deleted schema files started being separated out from deleted non-schema files. However ever since, when it came to scheduling files for reparsing, we've only done so for deleted non-schema files. We even missed this when we refactored the scheduling code in b37e5b5. This change updates `_schedule_for_parsing` which is used by `schedule_nodes_for_parsing` to begin skipping deleted schema files in addition to deleted non schema files.
As noted in the previous commit, we started separating out deleted schema files from deleted non-schema files a looong time ago. However, this whole time we've been adding `deleted_schema_files` to the list of files to be parsed. This change corrects for that.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9722 +/- ##
==========================================
- Coverage 88.08% 88.02% -0.07%
==========================================
Files 178 178
Lines 22419 22439 +20
==========================================
+ Hits 19747 19751 +4
- Misses 2672 2688 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
gshank
approved these changes
Mar 6, 2024
github-actions bot
pushed a commit
that referenced
this pull request
Mar 7, 2024
* Add test around deleting a YAML file containing semantic models and metrics It was raised in #8860 that an error is being raised during partial parsing when files containing metrics/semantic models are deleted. In further testing it looks like this error specifically happens when a file containing both semantic models and metrics is deleted. If the deleted file contains just semantic models or metrics there seems to be no issue. The next commit should contain the fix. * Skip deleted schema files when scheduling files during partial parsing Waaaay back (in 7563b99) deleted schema files started being separated out from deleted non-schema files. However ever since, when it came to scheduling files for reparsing, we've only done so for deleted non-schema files. We even missed this when we refactored the scheduling code in b37e5b5. This change updates `_schedule_for_parsing` which is used by `schedule_nodes_for_parsing` to begin skipping deleted schema files in addition to deleted non schema files. * Update `add_to_pp_files` to ignore `deleted_schema_files` As noted in the previous commit, we started separating out deleted schema files from deleted non-schema files a looong time ago. However, this whole time we've been adding `deleted_schema_files` to the list of files to be parsed. This change corrects for that. * Add changie doc for partial parsing KeyError fix (cherry picked from commit deedeeb)
QMalcolm
added a commit
that referenced
this pull request
Mar 7, 2024
* Stop trying to parse deleted schema files (#9722) * Add test around deleting a YAML file containing semantic models and metrics It was raised in #8860 that an error is being raised during partial parsing when files containing metrics/semantic models are deleted. In further testing it looks like this error specifically happens when a file containing both semantic models and metrics is deleted. If the deleted file contains just semantic models or metrics there seems to be no issue. The next commit should contain the fix. * Skip deleted schema files when scheduling files during partial parsing Waaaay back (in 7563b99) deleted schema files started being separated out from deleted non-schema files. However ever since, when it came to scheduling files for reparsing, we've only done so for deleted non-schema files. We even missed this when we refactored the scheduling code in b37e5b5. This change updates `_schedule_for_parsing` which is used by `schedule_nodes_for_parsing` to begin skipping deleted schema files in addition to deleted non schema files. * Update `add_to_pp_files` to ignore `deleted_schema_files` As noted in the previous commit, we started separating out deleted schema files from deleted non-schema files a looong time ago. However, this whole time we've been adding `deleted_schema_files` to the list of files to be parsed. This change corrects for that. * Add changie doc for partial parsing KeyError fix (cherry picked from commit deedeeb) * Empty commit to trigger github actions --------- Co-authored-by: Quigley Malcolm <[email protected]> Co-authored-by: Quigley Malcolm <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
resolves #8860
Problem
Waaaay back (in 7563b99) deleted schema files started being separated out from deleted non-schema files. However, ever since when it came to scheduling files for re-parsing, we've only done so for deleted non-schema files. We even missed this when we refactored the scheduling code in b37e5b5. This means when schema files got deleted and then the project went through partial parsing, you were likely to see an error like the following
We've over the years added more things you could define in schema files, which in turn means schema files have been changing (and getting deleted) more frequently. Thus we've been seeing this error crop up more and more.
Solution
Not scheduling deleted schema files for parsing (like we've always been doing for deleted non-schema files)
Checklist