Schema updates#686
Conversation
…fana/github-datasource into andreas/schema-updates
There was a problem hiding this comment.
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/schemadsand refactor SQL request normalization to use sharedschemadsquery/filter types. - Remove
project_itemstable from the schema and correspondingtableToQueryTypemapping. - 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.
There was a problem hiding this comment.
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
tableParameterValuesand newfiltersshape (name+conditions) usinggithub.com/grafana/schemadstypes. - Fix projects table parameters (now reusing the shared org-only parameters) and remove the
project_itemstable from the schema and table-to-query mapping. - Bump
schemadsdependency 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.
project_itemstableschemadsand reuse shared types