chore: fix regression from #2912 - tracing in ReadSchema calls#2947
Merged
miparnisari merged 2 commits intomainfrom Mar 5, 2026
Merged
chore: fix regression from #2912 - tracing in ReadSchema calls#2947miparnisari merged 2 commits intomainfrom
miparnisari merged 2 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (74.54%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #2947 +/- ##
==========================================
+ Coverage 73.39% 74.54% +1.16%
==========================================
Files 490 490
Lines 60376 60385 +9
==========================================
+ Hits 44306 45008 +702
+ Misses 12908 12225 -683
+ Partials 3162 3152 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3084a5a to
52f1815
Compare
52f1815 to
299f005
Compare
299f005 to
1785f40
Compare
1785f40 to
c427f84
Compare
miparnisari
commented
Mar 4, 2026
| // SchemaText returns the schema text at the current revision by reading all namespaces and caveats | ||
| // and generating the schema text from them. | ||
| func (l *legacySchemaReaderAdapter) SchemaText() (string, error) { | ||
| ctx := context.Background() |
Contributor
Author
There was a problem hiding this comment.
removing this line is the actual fix
tstirrat15
approved these changes
Mar 5, 2026
|
|
||
| func GenerateSchema(definitions []compiler.SchemaDefinition) (string, bool, error) { | ||
| return GenerateSchemaWithCaveatTypeSet(definitions, caveattypes.Default.TypeSet) | ||
| return GenerateSchemaWithCaveatTypeSet(context.TODO(), definitions, caveattypes.Default.TypeSet) |
Contributor
There was a problem hiding this comment.
What does TODO mean? I've never quite understood that. Should it be a .Background()?
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
SchemaText()losing the context informationBefore:
After: