Skip to content
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

AzCopy throwing "panic error" when using "--include-before" option for remove files #2186

Closed
johndoua opened this issue Apr 26, 2023 · 1 comment
Assignees
Labels
Milestone

Comments

@johndoua
Copy link

Which version of the AzCopy was used?

10.18.1

Which platform are you using? (ex: Windows, Mac, Linux)

Windows x64

What command did you run?

azcopy.exe remove "https:/somestorageaccount.file.core.windows.net/storage/MyFolder" --include-before 2023-04-26T19:10:00

What problem was encountered?

INFO: Any empty folders will not be processed, because --recursive was not specified
panic: cannot use IncludeBeforeDateFilter on an object for which no Last Modified Time has been retrieved

goroutine 1 [running]:
github.com/Azure/azure-storage-azcopy/v10/cmd.(*IncludeBeforeDateFilter).DoesPass(, {{0x0, 0x0}, 0x1, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, ...})
/home/vsts/work/1/s/cmd/zc_filter.go:345 +0xc5
github.com/Azure/azure-storage-azcopy/v10/cmd.passedFilters({
, _, }, {{0x0, 0x0}, 0x1, {0x0, 0x0, 0x0}, {0x0, ...}, ...})
/home/vsts/work/1/s/cmd/zc_enumerator.go:747 +0x11d
github.com/Azure/azure-storage-azcopy/v10/cmd.processIfPassedFilters({
, _, _}, {{0x0, 0x0}, 0x1, {0x0, 0x0, 0x0}, {0x0, ...}, ...}, ...)
/home/vsts/work/1/s/cmd/zc_enumerator.go:770 +0x5c
github.com/Azure/azure-storage-azcopy/v10/cmd.(*fileTraverser).Traverse.func2({{0x0, 0x0}, 0x1, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, 0x0, ...})
/home/vsts/work/1/s/cmd/zc_traverser_file.go:165 +0xbb
github.com/Azure/azure-storage-azcopy/v10/cmd.(*fileTraverser).Traverse(0xc000355500, 0x0, 0xc000413540, {0xc0004134f0, 0x1, 0x1})
/home/vsts/work/1/s/cmd/zc_traverser_file.go:181 +0x6c3
github.com/Azure/azure-storage-azcopy/v10/cmd.(*CopyEnumerator).enumerate(0xc000355540)
/home/vsts/work/1/s/cmd/zc_enumerator.go:719 +0x42
github.com/Azure/azure-storage-azcopy/v10/cmd.(*CookedCopyCmdArgs).processCopyJobPartOrders(0xc000063400)
/home/vsts/work/1/s/cmd/copy.go:1580 +0xae5
github.com/Azure/azure-storage-azcopy/v10/cmd.(*CookedCopyCmdArgs).process(0xc000063400)
/home/vsts/work/1/s/cmd/copy.go:1276 +0x86
github.com/Azure/azure-storage-azcopy/v10/cmd.init.17.func2(0xc00021f900?, {0xc00035f740?, 0x1?, 0x3?})
/home/vsts/work/1/s/cmd/remove.go:90 +0x21a
github.com/spf13/cobra.(*Command).execute(0xc00021f900, {0xc00035f6e0, 0x3, 0x3})
/home/vsts/go/pkg/mod/github.com/spf13/[email protected]/command.go:860 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0x20bb1c0)
/home/vsts/go/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/home/vsts/go/pkg/mod/github.com/spf13/[email protected]/command.go:902
github.com/Azure/azure-storage-azcopy/v10/cmd.Execute({0xc000034ca0?, 0xc000064110?}, {0xc000030780?, 0x184099a?}, 0x74?, {0x6d3d3586, 0xac7b, 0x2946, {0x64, 0x97, ...}})
/home/vsts/work/1/s/cmd/root.go:192 +0x106
main.main()
/home/vsts/work/1/s/main.go:87 +0x4eb

How can we reproduce the problem in the simplest way?

Perform an AzCopy remove operation with the parameter "--include-before" (for Azure files)

Have you found a mitigation/solution?

Use AzCopy remove with "--include-before" for Azure blob. It works perfectly

@gapra-msft
Copy link
Member

Hi this issue was resolved in the latest AzCopy release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants