Migrate from ginkgo v1 to ginkgo v2#907
Merged
tnikolova82 merged 1 commit intomasterfrom Apr 15, 2026
Merged
Conversation
The update-libbuildpack CI task now installs the ginkgo v2 CLI, which is incompatible with test binaries compiled against ginkgo v1. This caused unit test failures with 'flag provided but not defined: -ginkgo.timeout'. - Update all 15 test files to import github.com/onsi/ginkgo/v2 - Remove github.com/onsi/ginkgo/extensions/table import (DescribeTable and Entry are built into the v2 main package) - Make ginkgo/v2 a direct dependency in go.mod, drop ginkgo v1 - Run go mod tidy and go mod vendor
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.
Summary
github.com/onsi/ginkgo(v1) togithub.com/onsi/ginkgo/v2update-libbuildpackCI job failure caused by ginkgo CLI v2 / library v1 version mismatchProblem
The
update-libbuildpackCI task (buildpacks-ci@0f1b456f) was updated to install the ginkgo v2 CLI (go install github.com/onsi/ginkgo/v2/ginkgo@latest). However, the nodejs-buildpack still imported ginkgo v1 in all test files. When the v2 CLI (v2.28.1) runs test binaries compiled against v1 (v1.16.5), it passes flags that don't exist in v1, causing:This broke
update-libbuildpackbuilds #7 and #8.Changes
"github.com/onsi/ginkgo"to"github.com/onsi/ginkgo/v2"supply/supply_test.go: Removed"github.com/onsi/ginkgo/extensions/table"import —DescribeTableandEntryare built into the v2 main packagego.mod: Madeginkgo/v2 v2.22.1a direct dependency, removedginkgo v1.16.5fsnotify,nxadm/tail,tomb.v1)Testing
All 5 unit test suites pass locally with ginkgo v2 CLI:
The nodejs-buildpack was the last buildpack still on ginkgo v1 — all other buildpacks have already migrated.