build(deps): maintain Go dependencies and migrate mapstructure v2 - #9061
Open
DoDiODev wants to merge 6 commits into
Open
build(deps): maintain Go dependencies and migrate mapstructure v2#9061DoDiODev wants to merge 6 commits into
DoDiODev wants to merge 6 commits into
Conversation
Signed-off-by: DoDiODev <DoDiDev@proton.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Go dependency maintenance and mapstructure v2 — PR text
Summary
This PR performs a focused Go dependency maintenance update and replaces the
archived direct
mitchellh/mapstructureimport with the maintainedgo-viper/mapstructure/v2module. It contains no schema or migration-scriptchanges. A small DAL compatibility fix keeps PostgreSQL index drops working
with the updated GORM PostgreSQL driver; the affected SonarQube E2E test now
uses the same DAL abstraction. There are no API, CI, frontend, Docker-image,
or Go-toolchain changes.
Changes
golang.org/x/modv0.38.0v0.40.0gorm.io/driver/postgresv1.5.2v1.6.2gorm.io/gormv1.25.5v1.31.2github.com/coreos/go-oidc/v3v3.9.0v3.20.0github.com/mitchellh/mapstructurev1.5.0directgithub.com/go-viper/mapstructure/v2v2.5.0directgolang.org/x/syncv0.22.0The mapstructure change is an import-path-only migration. Existing struct tags,
custom decode hooks,
WeaklyTypedInput, and decoder configuration are retained.The old
mitchellh/mapstructure v1.4.1entry that remains ingo.modistransitive through
github.com/spf13/viper; no application source imports itany longer.
go mod tidyalso records the expected transitive updates, includinggolang.org/x/tools v0.49.0andgo-jose/v4from the OIDC upgrade.The fresh direct-module audit on 2026-08-19 also reported updates for
aws-sdk-go,cockroachdb/errors,gin,validator/v10,go-sql-driver/mysql,google/uuid,ants/v2,cron/v3,cast,cobra,viper,swaggo,gjson,viant/afs,gorm.io/datatypes,gorm.io/driver/mysql, and the previouslylisted
gocsv,properties,go-internal,testify, andx/exp. All areexplicitly deferred as independent review items; no unreviewed direct update
is bundled into this PR.
Direct-module decisions
The pre-branch direct build-graph audit reported additional updates. They are
intentionally not bundled without their own review:
gocarina/gocsv: pseudo-version update deferred pending changelog/diff review.magiconair/properties:v1.8.5 → v1.18.11is a large independent jump andshould be handled separately.
rogpeppe/go-internal:v1.14.1 → v1.16.0deferred.stretchr/testify:v1.11.1 → v1.12.0deferred.golang.org/x/exp: pseudo-version update deferred pending compatibility review.The Go toolchain bootstrap and minimum patch level are deliberately outside this
change.
Validation
Completed successfully:
go mod tidygo test ./helpers/oidchelper/... ./server/api/auth/...Jira, Customize, Issue Trace, and Zentao packages
go test ./impls/dalgorm ./plugins/sonarqube/e2e -run 'Test_validateQuery|TestSonarqubeIssueCodeBlockLongComponent' -count=1gofmt -dover all changed Go filesmake build(all plugins, mocks, Swagger generation, and the server)make unit-test-gomake e2e-testruns against isolated locallake_testdatabases, both completed with exit code 0
govulncheck -show verbose ./...: no vulnerabilities reachable from theDevLake code; three uncallable module-only findings have no fixed version
x/mod v0.40.0, GORMv1.31.2, PostgreSQL driverv1.6.2,go-oidc
v3.20.0, and mapstructure v2.5.0: no known CVEs reportedThe PostgreSQL run initially exposed the updated driver's invalid
DROP INDEX CURRENT_SCHEMA()."…"SQL. The DAL now uses a PostgreSQL-specificDROP INDEX IF EXISTSpath, while retaining the existing GORM migrator pathfor other dialects. The SonarQube migration E2E test passes on both the PR
branch and
upstream/main's older dependency baseline.Required pre-merge gates
databases.
exercise connection and scope-config decoding with mapstructure v2.
Commit structure
build(deps): bump x/mod to v0.40.0build(deps): update gorm postgres driverbuild(deps): update go-oidcrefactor(deps): replace mapstructure with go-viper v2fix(db): keep postgres index drops compatible with updated GORM