fix: prevent false enabled_clients diff in database dry-run - #1479
Draft
harshithRai wants to merge 2 commits into
Draft
fix: prevent false enabled_clients diff in database dry-run#1479harshithRai wants to merge 2 commits into
harshithRai wants to merge 2 commits into
Conversation
harshithRai
force-pushed
the
DXCDT-2281
branch
2 times, most recently
from
August 28, 2026 09:11
fe7bcf7 to
f5fd72a
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1479 +/- ##
==========================================
+ Coverage 80.81% 80.84% +0.02%
==========================================
Files 163 163
Lines 7805 7811 +6
Branches 1741 1743 +2
==========================================
+ Hits 6308 6315 +7
+ Misses 797 796 -1
Partials 700 700 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
🔧 Changes
Fixes a false positive in
--dry-runmode where database connections withenabled_clientswere incorrectly reported as changed.In the database dry-run path (
dryRunChanges), the local connection had itsenabled_clientspopulated, but the remote connection it was compared against was fetched fromconnections.list, which no longer returnsenabled_clientsinline. The field now lives behind the dedicated enabled-clients endpoint. Because the remote object lacked the key entirely, the diff reported a false difference:The fix enriches the remote connections with their
enabled_clientsviagetConnectionEnabledClientsbefore diffing, mirroring what the real import path already does ingetType(). The change is scoped entirely todryRunChanges, so real import and export behavior is untouched.📚 References
🔬 Testing
Added a regression test in
test/tools/auth0/handlers/dryRun.tests.tsthat fails on the old code (reports a spurious update) and passes with the fix.Verified end to end against live tenants: exported a tenant to a directory, then ran a dry-run against the identical export. On tenants whose
connections.listomitsenabled_clientsinline, the old code produced the false positive and the fix removes it. Confirmed the real import and export paths are unaffected.To reproduce manually:
📝 Checklist