fix: resolve relative imports for new scripts in local development#7465
Open
devdattatalele wants to merge 2 commits intowindmill-labs:mainfrom
Open
fix: resolve relative imports for new scripts in local development#7465devdattatalele wants to merge 2 commits intowindmill-labs:mainfrom
devdattatalele wants to merge 2 commits intowindmill-labs:mainfrom
Conversation
When generating metadata for new scripts with relative imports, the Bun bundler now checks for locally provided script content before attempting to fetch from the server. This fixes the issue where new scripts in new directories would fail because the imported scripts don't exist on the server yet. Fixes windmill-labs#7352
Contributor
|
This is very cool but are you sure the CLI currently provide those files currently when generating-metadata ? Could you write a cli test for it (if you look we have some already). It would be a waste for the CLI to send all the local scripts so an optimization would to use local logic on CLI to try to guess which scripts are worth sending by doing local traversal of imports. |
- Add collectLocalScripts() to find imported scripts recursively - Add import extractors for TypeScript/JS and Python - Optimize to only send scripts in import chain (not all scripts) - Add comprehensive test suite with 4 test cases Addresses maintainer feedback on PR windmill-labs#7465: - Verified CLI wasn't sending local scripts before - Implemented optimization via import traversal - Added CLI tests using containerized backend Fixes windmill-labs#7352
Contributor
Author
|
@rubenfiszel! Updated the PR! CLI now sends imported scripts via |
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.
When generating metadata for new scripts with relative imports, the Bun bundler now checks for locally provided script content before attempting to fetch from the server. This fixes the issue where new scripts in new directories would fail because the imported scripts don't exist on the server yet.
Fixes #7352