-
Notifications
You must be signed in to change notification settings - Fork 5
[kernel-869] exclude files from extensions #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[kernel-869] exclude files from extensions #98
Conversation
a9498e8 to
cf9bfed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
rgarcia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the pr! left some comments on naming, code duplication, and making the util more generic. main concerns are around duplicating the existing ZipDirectory function and making the exclusion options more intuitive.
88b7410 to
27ef5de
Compare
rgarcia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good — prior feedback well addressed. nice cleanup consolidating into the existing ZipDirectory. couple minor nits.
cmd/extensions.go
Outdated
|
|
||
| // Pre-flight size check | ||
| if in.Output != "json" { | ||
| pterm.Info.Println("Analyzing extension directory...") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: "Analyzing..." is misleading since we go straight to zipping. consider changing to "Compressing extension directory..." and dropping the "Zipping extension directory..." message on line 328 since they'd be redundant.
cmd/extensions.go
Outdated
| } | ||
|
|
||
| if fileInfo.Size() > MaxExtensionSizeBytes { | ||
| pterm.Error.Printf("Extension bundle is too large: %s (max: 50MB)\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: the hardcoded "50MB" here could drift from MaxExtensionSizeBytes — consider using FormatBytes(MaxExtensionSizeBytes) instead.
27ef5de to
0ff03f7
Compare
0ff03f7 to
e0e904b
Compare
Note
Medium Risk
Touches shared zipping logic used by deploy and browser/extension workflows; incorrect exclusion or walker error handling could omit files or break packaging, though most callers pass
nilto preserve behavior.Overview
Adds configurable zip exclusions to
util.ZipDirectoryvia newZipOptions(directory names + filename glob patterns) and propagates the new signature to existing callers.Extension uploads now build smaller bundles by default (excluding e.g.
node_modules,.git, tests/logs), print the bundle size, and fail fast if the resulting zip exceeds 50MB; deploy/browser extension zipping keeps current behavior by passingnil. Addsutil.FormatBytesand new tests covering zip exclusions and unzip behavior.Written by Cursor Bugbot for commit e0e904b. This will update automatically on new commits. Configure here.