From a71f1499bff451fd0776bd91ffb7a28890816e3b Mon Sep 17 00:00:00 2001 From: Varun Athreya Date: Sat, 12 Sep 2026 01:16:51 +0530 Subject: [PATCH 1/2] chore: update go-database-reconciler to v1.42.5-0.20260910123708-de3744ec50a3 --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 09871d27a..59df1f266 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/fatih/color v1.19.0 github.com/google/go-cmp v0.7.0 github.com/kong/go-apiops v0.4.6 - github.com/kong/go-database-reconciler v1.42.4 + github.com/kong/go-database-reconciler v1.42.5-0.20260910123708-de3744ec50a3 github.com/kong/go-kong v0.78.0 github.com/mitchellh/go-homedir v1.1.0 github.com/spf13/cobra v1.10.2 diff --git a/go.sum b/go.sum index 0591fe9c0..23805c9a9 100644 --- a/go.sum +++ b/go.sum @@ -256,8 +256,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kong/go-apiops v0.4.6 h1:sQkTievX92AT5PZNZcUFbm7inysBVeZIIagXN8MWnP8= github.com/kong/go-apiops v0.4.6/go.mod h1:Xt99d90LallLVwYJAGaufiNbBdsK0KKboe7gR4Ryths= -github.com/kong/go-database-reconciler v1.42.4 h1:CxeipG/dWIHi73bztg6BU7lIwotOKP1FUmfbz7sp6PE= -github.com/kong/go-database-reconciler v1.42.4/go.mod h1:/lEPLhpDI1x+OOhQ+JeY3OsxvXYN04o12AmqzN7llRQ= +github.com/kong/go-database-reconciler v1.42.5-0.20260910123708-de3744ec50a3 h1:lyOdsCUS4gDB4SOpzH2HZQT9qMP8k4iU6EVv+3SXDEE= +github.com/kong/go-database-reconciler v1.42.5-0.20260910123708-de3744ec50a3/go.mod h1:/lEPLhpDI1x+OOhQ+JeY3OsxvXYN04o12AmqzN7llRQ= github.com/kong/go-kong v0.78.0 h1:VK5g26BCeF+l9o3j3pgU3BOuOdmTd9Vj33x29mKGtkg= github.com/kong/go-kong v0.78.0/go.mod h1:Wx5aTcMjyUnIF94M5NYFWb/EnuEkqB5STrWvybFSYYQ= github.com/kong/go-slugify v1.0.0 h1:vCFAyf2sdoSlBtLcrmDWUFn0ohlpKiKvQfXZkO5vSKY= From dc0316f8fd09a4919b2ad47018aee88bfbe10729 Mon Sep 17 00:00:00 2001 From: Varun Athreya Date: Fri, 18 Sep 2026 11:12:54 +0530 Subject: [PATCH 2/2] tests: add partial diff tests for no perpetual diff and real change detection --- tests/integration/diff_test.go | 57 ++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/tests/integration/diff_test.go b/tests/integration/diff_test.go index 073635905..a16a62c2b 100644 --- a/tests/integration/diff_test.go +++ b/tests/integration/diff_test.go @@ -1170,6 +1170,63 @@ func Test_Diff_EmptyArrayPluginConfig_OmittedFieldMatchesEmptyArray(t *testing.T assert.Equal(t, emptyOutput, out) } +func Test_Diff_Partials_NoPerpetualDiff(t *testing.T) { + runWhenEnterpriseOrKonnect(t, ">=3.10.0") + + isKonnect := os.Getenv("DECK_KONNECT_TOKEN") != "" + + if isKonnect { + runDualTestWithSkipDefaults(t, "Test_Diff_Partials_NoPerpetualDiff", testDiffPartialsNoPerpetualDiffImpl) + } else { + testDiffPartialsNoPerpetualDiffImpl(t) + } +} + +func testDiffPartialsNoPerpetualDiffImpl(t *testing.T) { + setup(t) + ctx := context.Background() + + stateFile := "testdata/sync/039-partials/kong.yaml" + + for i := range 2 { + require.NoError(t, sync(ctx, stateFile)) + + out, err := diff(stateFile) + require.NoError(t, err) + require.Equal(t, emptyOutput, out, "diff after sync %d reported changes", i+1) + } +} + +func Test_Diff_Partials_RealChangeStillDetected(t *testing.T) { + runWhenEnterpriseOrKonnect(t, ">=3.10.0") + + isKonnect := os.Getenv("DECK_KONNECT_TOKEN") != "" + + if isKonnect { + runDualTestWithSkipDefaults(t, "Test_Diff_Partials_RealChangeStillDetected", testDiffPartialsRealChangeStillDetectedImpl) + } else { + testDiffPartialsRealChangeStillDetectedImpl(t) + } +} + +func testDiffPartialsRealChangeStillDetectedImpl(t *testing.T) { + setup(t) + ctx := context.Background() + + require.NoError(t, sync(ctx, "testdata/sync/039-partials/kong.yaml")) + + out, err := diff("testdata/sync/039-partials/kong-update.yaml") + require.NoError(t, err) + assert.NotEqual(t, emptyOutput, out) + assert.Contains(t, out, "updating partial my-ee-partial") + + require.NoError(t, sync(ctx, "testdata/sync/039-partials/kong-update.yaml")) + + out, err = diff("testdata/sync/039-partials/kong-update.yaml") + require.NoError(t, err) + assert.Equal(t, emptyOutput, out) +} + func Test_Diff_Konnect_Workspace(t *testing.T) { runWhenKonnect(t) setup(t)