Repository navigation
fix(issues): treat missing fullDatabaseId on IssueField types as unsupported GHES schema - #3907
tang-ontheway wants to merge 1 commit into
Conversation
…pported GHES schema
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the GHES compatibility change intended to preserve REST results when optional GraphQL enrichment is unsupported.
No open issues 🎉
What changed in this PR
Fixes #3899 by allowing search_issues to return REST results when GHES lacks fullDatabaseId on issue field types, rather than failing during optional GraphQL enrichment.
Changes:
- Recognizes missing
fullDatabaseIdschema errors across the four supported issue field types. - Adds regression cases for single- and double-quoted errors, including a request using a fields filter.
| File | Description |
|---|---|
pkg/github/issues.go |
Extends unsupported-schema detection to missing fullDatabaseId fields. |
pkg/github/issues_test.go |
Tests graceful fallback for GHES schema errors on date and text field types. |
Review effort: Balanced (adaptive)
IrynaKulakova
left a comment
There was a problem hiding this comment.
The change recognizes the reported GHES 3.21 missing fullDatabaseId schema error for supported IssueField types, falls back to REST search results when enrichment is unavailable, and preserves failures for unrelated GraphQL errors. Focused search and list compatibility tests pass.
|
Thanks @IrynaKulakova for reviewing and approving! |
Fixes #3899
Root Cause
On GitHub Enterprise Server 3.21, the GraphQL issue field types (
IssueFieldDate,IssueFieldNumber,IssueFieldSingleSelect,IssueFieldText) exist in the schema, sosearch_issues's optionalfetchIssueFieldValuesByNodeIDenrichment fails with:Field 'fullDatabaseId' doesn't exist on type 'IssueFieldDate'isUnsupportedIssueFieldValuesSchemaErrorinpkg/github/issues.goonly recognized missing-field errors forissueFieldValuesonIssueand unknown-type / invalid-fragment errors onIssueField*types, so this schema mismatch was treated as a fatal error instead of degrading gracefully to the REST search results.Changes
isUnsupportedIssueFieldValuesSchemaErrorinpkg/github/issues.goto also recognize missingfullDatabaseIdfield errors (doesn't exist on type,does not exist on type,cannot query field,is not defined on type) onIssueFieldDate,IssueFieldNumber,IssueFieldSingleSelect, andIssueFieldText.pkg/github/issues_test.go(Test_SearchIssues_FieldValuesEnrichment) covering single-quoted and double-quoted missingfullDatabaseIderrors onIssueFieldDateandIssueFieldText.Verification
go test ./pkg/github -run Test_SearchIssues -v: all subtests passed (0.415s).