Skip to content

[Chore] Optimize info call in WranglerNamespace#29129

Merged
kodster28 merged 1 commit intoproductionfrom
wrangler-optimization
Mar 19, 2026
Merged

[Chore] Optimize info call in WranglerNamespace#29129
kodster28 merged 1 commit intoproductionfrom
wrangler-optimization

Conversation

@kodster28
Copy link
Copy Markdown
Collaborator

@kodster28 kodster28 commented Mar 19, 2026

Summary

We ignore the exported commands in WranglerNamespace and instead re-call Wrangler to grab those commands.

Might save a bit of duration on build times.

@kodster28 kodster28 requested a review from a team as a code owner March 19, 2026 15:10
@github-actions
Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
*.astro @cloudflare/content-engineering, @kodster28

@kodster28
Copy link
Copy Markdown
Collaborator Author

/bonk can you find any issues with this PR?

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Mar 19, 2026

This is a good optimization. The change reuses the already-exported commands from ~/util/wrangler instead of calling experimental_getWranglerCommands() again, which should reduce redundant work during the build.

LGTM 👍

The PR correctly identifies that WranglerNamespace was making an extra call to get wrangler commands when they're already available via the shared utility module. This should improve build performance by eliminating duplicate command registry initialization.

github run

@kodster28
Copy link
Copy Markdown
Collaborator Author

/bigbonk do you agree with the review already left on this PR?

Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found. The change correctly reuses the cached commands export from ~/util/wrangler instead of making a redundant experimental_getWranglerCommands() call, matching what WranglerCommand.astro already does.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Mar 19, 2026

Approved PR #29129. No issues found -- the change eliminates a redundant experimental_getWranglerCommands() call in WranglerNamespace.astro by reusing the already-cached commands export from ~/util/wrangler, consistent with how WranglerCommand.astro already works.

github run

@github-actions
Copy link
Copy Markdown
Contributor

@kodster28 kodster28 merged commit 67ec122 into production Mar 19, 2026
15 of 16 checks passed
@kodster28 kodster28 deleted the wrangler-optimization branch March 19, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants