Skip to content

Schema updates#686

Merged
yesoreyeram merged 12 commits into
mainfrom
andreas/schema-updates
Mar 19, 2026
Merged

Schema updates#686
yesoreyeram merged 12 commits into
mainfrom
andreas/schema-updates

Conversation

@aangelisc
Copy link
Copy Markdown
Contributor

  • Fix project table parameters
  • Remove project_items table
  • Update schemads and reuse shared types
  • Improve and simplify filter handling
  • Update tests

@aangelisc aangelisc requested a review from a team as a code owner March 16, 2026 12:19
@aangelisc aangelisc requested a review from zoltanbedi March 16, 2026 12:19
Copilot AI review requested due to automatic review settings March 18, 2026 13:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the experimental “Grafana SQL” schema layer and its request normalization to align with newer schemads types, while removing the legacy project_items table and adjusting project table parameter behavior.

Changes:

  • Upgrade github.com/grafana/schemads and refactor SQL request normalization to use shared schemads query/filter types.
  • Remove project_items table from the schema and corresponding tableToQueryType mapping.
  • Improve normalization behavior for table parameters (owner/repo/workflow/projects org mapping) and update tests/versioning/changelog.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/github/sql_handler_test.go Updates/extends normalization + filter tests for the new schemads filter shape and table parameter behavior.
pkg/github/sql.go Switches normalization and filter application to schemads typed structs; adds tableParameterValues handling and filter extraction helpers.
pkg/github/schema.go Removes project_items table; fixes projects table parameters to reuse org-only parameters.
package.json Bumps plugin version to 2.7.1.
go.mod Upgrades github.com/grafana/schemads to v0.0.3.
go.sum Updates checksums for the schemads upgrade.
cspell.config.json Adds new test tokens to the dictionary.
CHANGELOG.md Adds 2.7.1 entry describing schema updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/github/sql.go Outdated
Comment thread pkg/github/sql.go Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the experimental SQL schema integration for the GitHub datasource by aligning backend normalization/filter handling with the newer schemads query/filter types, fixing project table parameter behavior, and removing the dedicated project_items table.

Changes:

  • Update SQL query normalization to read tableParameterValues and new filters shape (name + conditions) using github.com/grafana/schemads types.
  • Fix projects table parameters (now reusing the shared org-only parameters) and remove the project_items table from the schema and table-to-query mapping.
  • Bump schemads dependency and plugin version, and update tests + changelog accordingly.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/github/sql.go Switches normalization/filter logic to schemads types; adds tableParameterValues mapping and simplified filter pushdown.
pkg/github/schema.go Fixes projects table parameters (org-only) and removes the project_items table definition.
pkg/github/sql_handler_test.go Updates/extends tests for the new filter model and tableParameterValues behavior.
go.mod Bumps github.com/grafana/schemads to v0.0.5.
go.sum Updates checksums for schemads v0.0.5.
package.json Bumps plugin version to 2.7.1.
CHANGELOG.md Adds 2.7.1 entry describing the schema update.
cspell.config.json Adds test-only words used in table suffix override cases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@grafana grafana deleted a comment from Copilot AI Mar 18, 2026
@yesoreyeram yesoreyeram merged commit 7821a70 into main Mar 19, 2026
23 checks passed
@yesoreyeram yesoreyeram deleted the andreas/schema-updates branch March 19, 2026 15:20
@github-project-automation github-project-automation Bot moved this from Backlog to Complete in OSS Big Tent Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

3 participants