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
core: add support for wipe arg to Directory.export #6909
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,6 +179,7 @@ func (c *Client) LocalDirExport( | |
ctx context.Context, | ||
def *bksolverpb.Definition, | ||
destPath string, | ||
merge bool, | ||
) (rerr error) { | ||
ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("export_path", destPath)) | ||
bklog.G(ctx).Debug("exporting local dir") | ||
|
@@ -226,7 +227,8 @@ func (c *Client) LocalDirExport( | |
} | ||
|
||
ctx = engine.LocalExportOpts{ | ||
Path: destPath, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, so this defaulted to 'delete everything' before? I've had files mysteriously disappear recently, maybe this expains it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No the behavior before was to not delete any files, that's unchanged here. So something else must have been afoot 🔎 |
||
Path: destPath, | ||
Merge: merge, | ||
}.AppendToOutgoingContext(ctx) | ||
|
||
_, descRef, err := expInstance.Export(ctx, cacheRes, nil, clientMetadata.ClientID) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
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.
I kind of like being extra explicit about the fact that it will delete files on the host, so leaving in that extra part but will clarify the phrasing.