feat(analyze-schema): implement version-aware extension reporting#3286
feat(analyze-schema): implement version-aware extension reporting#3286krishanu7 wants to merge 1 commit into
Conversation
| "pg_parquet": { | ||
| ybversion.SERIES_2025_2: "2025.2.0.0", | ||
| }, | ||
| } |
There was a problem hiding this comment.
Version map uses wrong type for integration
Medium Severity
extensionsFixedInVersions stores version values as map[string]string, but MinimumVersionsFixedIn on the Issue struct expects map[string]*ybversion.YBVersion. Every existing usage of MinimumVersionsFixedIn in issues_ddl.go uses *ybversion.YBVersion constants directly. GetExtensionFixedVersions returns map[string]string, which is type-incompatible with the field it's designed to populate. This inconsistency means the data cannot be used without adding string-to-*ybversion.YBVersion parsing, making the integration unnecessarily error-prone.
Additional Locations (1)
There was a problem hiding this comment.
change the map type to map[string]map[string]*ybversion.YBVersion @krishanu7
- Enhanced to report extension support based on the specified target YugabyteDB version. - Added a version support matrix for extensions like , , , and . - Updated [NewExtensionsIssue](yb-voyager/yb-voyager/src/query/queryissue/issues_ddl.go) to dynamically populate , allowing Voyager to filter false positives for supported versions. - Handled the removal of the extension for PG15-based YugabyteDB versions (2.25+). - Added a new unit test suite [yb-voyager/yb-voyager/src/query/queryissue/extensions_test.go) to verify version-specific support across multiple YugabyteDB series.
bcdf2ce to
461c29c
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| issue.MinimumVersionsFixedIn = make(map[string]*ybversion.YBVersion) | ||
| for series, verStr := range fixedVersions { | ||
| ver, _ := ybversion.NewYBVersion(verStr) | ||
| issue.MinimumVersionsFixedIn[series] = ver |
There was a problem hiding this comment.
Ignored error could cause nil pointer panic
Medium Severity
The error from ybversion.NewYBVersion(verStr) is silently discarded. If parsing ever fails (e.g., a malformed version string is added to extensionsFixedInVersions in the future), ver will be nil and stored in MinimumVersionsFixedIn. Later, IsFixedIn retrieves this nil value and calls v.GreaterThanOrEqual(nil), which dereferences nil.Version and causes a runtime panic. While the current hardcoded version strings are all valid, this pattern creates a latent crash risk that's hard to diagnose.
sincfaio
left a comment
There was a problem hiding this comment.
Thank You @krishanu7 for solving this issue! If you can address the review comments, we can merge this soon.
There was a problem hiding this comment.
move these tests to issues_ddl.go?
| "pg_parquet": { | ||
| ybversion.SERIES_2025_2: "2025.2.0.0", | ||
| }, | ||
| } |
There was a problem hiding this comment.
change the map type to map[string]map[string]*ybversion.YBVersion @krishanu7


Describe the changes in this pull request
This pull request enhances the analyze-schema / assessment phase to detect unsupported PostgreSQL extensions based on the specified target YugabyteDB version, instead of relying on a static extension list.
Previously, YB Voyager used a fixed list of supported extensions, which caused false positives when extensions were newly supported in recent YugabyteDB releases.
Key changes:
Base Support Added
vectorto theSupportedExtensionsOnYBlist inhelpers.go.Version Support Matrix
helpers.go.migtestssuite, ensuring consistency.Dynamic Issue Metadata
NewExtensionsIssueinissues_ddl.goto populate theMinimumVersionsFixedInfield.Deprecation Handling
timetravel, marking it unsupported only for PG15-based versions (2.25+, 2025.1+), while preserving support for older versions.Describe if there are any user-facing changes
Reports
schema_analysis_report.jsonand assessment reports will no longer flag extensions such asvector,pg_partman, oranonas unsupported when the provided--target-db-versionsupports them.Command Line
Configuration
Installation
How was this pull request tested?
New Unit Tests
yb-voyager/src/query/queryissue/extensions_test.go2.252024.12024.22025.1Manual Verification
analyze-schemawith different--target-db-versionvalues to verify:vectoris correctly detected as supported where applicable.Does your PR have changes in callhome/yugabyted payloads? If so, is the payload version incremented?
No.
Does your PR have changes to on-disk structures that can cause upgrade issues?
No.
Note
Medium Risk
Changes schema assessment output by dynamically suppressing/flagging
UNSUPPORTED_EXTENSIONissues based on target YugabyteDB version; incorrect version mappings could hide real incompatibilities or reintroduce false positives.Overview
Makes
UNSUPPORTED_EXTENSIONreporting version-aware by attaching per-extensionMinimumVersionsFixedIndata toNewExtensionsIssue, derived from a new extension→YB-series minimum-version matrix.Updates the static supported extension list to include
vector, and adds unit tests covering version-specific support/removal scenarios (e.g.,pg_partman,anon,timetravel) plus unknown-extension behavior across multiple YugabyteDB versions.Written by Cursor Bugbot for commit 461c29c. This will update automatically on new commits. Configure here.