Skip to content

Benchmark: grafana PR 94942 - #19

Open
celmis-codereviewer wants to merge 2 commits into
cr-base-94942from
cr-pr-94942
Open

celmis-codereviewer wants to merge 2 commits into
cr-base-94942from
cr-pr-94942

Conversation

@celmis-codereviewer

Copy link
Copy Markdown

Benchmark reproduction of grafana#94942

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

celmis-codereviewer

This comment was marked as outdated.

@celmis-codereviewer celmis-codereviewer left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 COMMENT — findings to consider

Full findings and scope are in the review summary comment on this pull request — one persistent comment, updated in place on every run.

Comment thread pkg/expr/reader.go
if enabled {
return false
}
return false

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why: When IsEnabledGlobally returns true on line 195 of pkg/expr/reader.go, enableSqlExpressions reaches line 199 and returns false instead of true, causing SQL expression queries to always fail with an error regardless of feature flag configuration.

🟠 enableSqlExpressions unconditionally returns false

In enableSqlExpressions, enabled is set to !h.features.IsEnabledGlobally(...). If the feature is disabled (IsEnabledGlobally returns false), enabled is true and line 197 returns false. If the feature is enabled (IsEnabledGlobally returns true), enabled is false, skipping the if block and reaching line 199 which also returns false. As a result, enableSqlExpressions always returns false, preventing SQL expressions from ever being enabled.

Suggested change
return false
func enableSqlExpressions(h *ExpressionQueryReader) bool {
return h.features.IsEnabledGlobally(featuremgmt.FlagSqlExpressions)
}

agent: defect · rule: defect.dead-branch · confidence: 1.00

@celmis-codereviewer

Copy link
Copy Markdown
Author

🤖 Code Review for PR #19

⚙ ADJUSTED — graph context partial (5 of 6 changed files): 1 of 6 changed files have no symbols in the index; 1 of them is not in that checkout at all (pkg/expr/reader.go) — this PR's base is older than the indexed revision, so those files were renamed or deleted before it and no re-index can bring them back; there is nothing to fix.

💬 COMMENT — findings to consider

Findings

  • 🟠 Error: 1

Scope

  • Files changed: 6
  • Lines: +47 / -19

Performance

  • Analysis time: 49.8s · agents: structural, cve, security, contract, defect · tokens: 33,961/11,151

Powered by Code Analyzer · context: tree-sitter graph + structural, cve, security, contract, defect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants