feat: add deprecation warnings for external file path references in config handlers #1392
Open
ankita10119 wants to merge 1 commit into
Open
feat: add deprecation warnings for external file path references in config handlers #1392ankita10119 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 #1392 +/- ##
==========================================
- Coverage 79.86% 79.85% -0.02%
==========================================
Files 153 153
Lines 7064 7072 +8
Branches 1550 1551 +1
==========================================
+ Hits 5642 5647 +5
- Misses 781 783 +2
- Partials 641 642 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
kushalshit27
left a comment
There was a problem hiding this comment.
Please keep it simple.
Support for absolute paths and paths outside the config root will be deprecated in a future version to improve the security of the tool.`
+
`Please update your configuration to use paths relative to the config directory.`
+
"Current absolute paths used are [path1, path2]"
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
Added deprecation warnings across all config file loading paths to notify customers ahead of a planned breaking change (tracked in #1388) that will remove support for absolute paths and paths resolving outside the config root directory.
Affected locations:
src/context/directory/index.ts-loadFilefallback when relative path cannot be resolvedsrc/context/yaml/index.ts- same for YAML contextsrc/context/directory/handlers/actions.ts- actioncodepath resolved viafs.existsSyncas an absolute/external pathsrc/context/directory/handlers/actionModules.ts- same for action modulessrc/context/directory/handlers/databases.ts-customScriptspath resolving outside the config rootExisting behavior is fully preserved - files still load successfully. A
warn-level log is emitted to prompt customers to migrate to relative paths before the breaking change lands.📚 References
🔬 Testing
No new unit tests added as behavior is unchanged. Warnings can be verified manually by referencing a file outside the config directory in any of the affected asset types (actions, action modules, databases, pages) - a deprecation
warnlog is emitted and the file continues to load normally.All 1231 existing tests pass with no regressions.
📝 Checklist