fix: strip unresolved placeholders on deploy instead of throwing - #1436
Open
ankita10119 wants to merge 1 commit into
Open
fix: strip unresolved placeholders on deploy instead of throwing#1436ankita10119 wants to merge 1 commit into
ankita10119 wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1436 +/- ##
=========================================
Coverage ? 80.24%
=========================================
Files ? 163
Lines ? 7542
Branches ? 1665
=========================================
Hits ? 6052
Misses ? 801
Partials ? 689 ☔ 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
Previously, deploying a resource with an unresolved
##...##or@@...@@placeholder would throw an error and abort the deploy. This caused the export→import round-trip to fail for connections and other resources where the CLI auto-generates secret placeholders on export (e.g.##CONNECTIONS_WAAD_SECRET##), since Auth0 does not expose the actual secret value, making it impossible for users to provide the keyword mapping.Change: Instead of throwing, unresolved placeholders are now stripped from the payload before the API call, with a warn log per field. Auth0 preserves its existing value for any stripped field.
stripUnresolvedPlaceholdersutility insrc/tools/utils.tsAPIHandler.processChanges(create, update, conflict paths) now callsstripUnresolvedPlaceholdersin place ofvalidateNoUnresolvedPlaceholders📚 References
🔬 Testing
test/tools/utils.test.jsandtest/tools/auth0/handlers/default.tests.ts##CONNECTIONS_WAAD_SECRET##), ran import without defining the mapping, field was stripped with a warning and the connection updated successfully📝 Checklist