Skip to content

fix(issues): treat missing fullDatabaseId on IssueField types as unsupported GHES schema - #3907

Open
tang-ontheway wants to merge 1 commit into
github:mainfrom
tang-ontheway:fix/search-issues-ghes-full-database-id
Open

tang-ontheway wants to merge 1 commit into
github:mainfrom
tang-ontheway:fix/search-issues-ghes-full-database-id

Conversation

@tang-ontheway

Copy link
Copy Markdown

Fixes #3899

Root Cause

On GitHub Enterprise Server 3.21, the GraphQL issue field types (IssueFieldDate, IssueFieldNumber, IssueFieldSingleSelect, IssueFieldText) exist in the schema, so search_issues's optional fetchIssueFieldValuesByNodeID enrichment fails with:
Field 'fullDatabaseId' doesn't exist on type 'IssueFieldDate'

isUnsupportedIssueFieldValuesSchemaError in pkg/github/issues.go only recognized missing-field errors for issueFieldValues on Issue and unknown-type / invalid-fragment errors on IssueField* types, so this schema mismatch was treated as a fatal error instead of degrading gracefully to the REST search results.

Changes

  • Updated isUnsupportedIssueFieldValuesSchemaError in pkg/github/issues.go to also recognize missing fullDatabaseId field errors (doesn't exist on type, does not exist on type, cannot query field, is not defined on type) on IssueFieldDate, IssueFieldNumber, IssueFieldSingleSelect, and IssueFieldText.
  • Added regression test cases in pkg/github/issues_test.go (Test_SearchIssues_FieldValuesEnrichment) covering single-quoted and double-quoted missing fullDatabaseId errors on IssueFieldDate and IssueFieldText.

Verification

  • go test ./pkg/github -run Test_SearchIssues -v: all subtests passed (0.415s).

@tang-ontheway
tang-ontheway requested a review from a team as a code owner November 20, 2026 02:35
Copilot AI adaptive review requested due to automatic review settings November 20, 2026 02:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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 fullDatabaseId schema 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)

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.

search_issues fails on GHES 3.21: Field 'fullDatabaseId' doesn't exist on type 'IssueFieldDate'

2 participants