Skip to content

Commit fa61205

Browse files
authored
Merge pull request #1771 from Azure/dev
10.15.0 Release
2 parents 87e0ff7 + 9a3336c commit fa61205

File tree

116 files changed

+2662
-2507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+2662
-2507
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ testSuite/testSuite.exe
323323
*.exe
324324

325325
#Python Dependancies
326-
testSuite/test_suite_config.ini
326+
test_suite_config.ini
327327
testSuite/venv/*
328328
testSuite/venv1/*
329329
testSuite/scripts/__pycache__/utility.cpython-36.pyc

ChangeLog.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11

22
# Change Log
33

4+
## Version 10.15.0
5+
6+
### New features
7+
8+
1. Added support for OAuth forwarding when performing Blob -> Blob copy.
9+
2. Allow users to dynamically change the bandwidth cap via messages through the STDIN.
10+
3. GCS -> Blob is now GA.
11+
4. Enable MinIO(S3) logs in DEBUG mode.
12+
6. Upgraded Go version to 1.17.9.
13+
14+
### Bug fixes
15+
1. Resolved alignment of atomicSuccessfulBytesInActiveFiles.
16+
2. Fixed issue where last-write-time was still getting persisted even when --preserve-smb-info is false.
17+
3. Fixed issue where concurrency was always AUTO for Azure Files despite explicit override.
18+
4. Removed outdated load command following the deprecation of the cflsload package.
19+
420
## Version 10.14.1
521

622
### Bug fixes

azbfs/zc_filesystemRequestOptions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ type ListPathsFilesystemOptions struct {
1515
MaxResults *int32
1616
// The continuation token to resume listing.
1717
ContinuationToken *string
18-
}
18+
}

azure-pipelines.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
env:
3030
GO111MODULE: 'on'
3131
inputs:
32-
version: '1.16.14'
32+
version: '1.17.9'
3333

3434
- script: |
3535
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.43.0
@@ -94,19 +94,22 @@ jobs:
9494
steps:
9595
- task: GoTool@0
9696
inputs:
97-
version: '1.16.14'
97+
version: '1.17.9'
9898

9999
# Running E2E Tests on Linux - AMD64
100100
- script: |
101101
set -e
102102
GOARCH=amd64 GOOS=linux go build -o azcopy_linux_amd64
103103
export AZCOPY_E2E_EXECUTABLE_PATH=$(pwd)/azcopy_linux_amd64
104-
go test -timeout 20m -race -short -cover ./e2etest
104+
go test -timeout 60m -race -short -cover ./e2etest
105105
env:
106106
AZCOPY_E2E_ACCOUNT_KEY: $(AZCOPY_E2E_ACCOUNT_KEY)
107107
AZCOPY_E2E_ACCOUNT_NAME: $(AZCOPY_E2E_ACCOUNT_NAME)
108108
AZCOPY_E2E_ACCOUNT_KEY_HNS: $(AZCOPY_E2E_ACCOUNT_KEY_HNS)
109109
AZCOPY_E2E_ACCOUNT_NAME_HNS: $(AZCOPY_E2E_ACCOUNT_NAME_HNS)
110+
AZCOPY_E2E_TENANT_ID: $(OAUTH_TENANT_ID)
111+
AZCOPY_E2E_APPLICATION_ID: $(ACTIVE_DIRECTORY_APPLICATION_ID)
112+
AZCOPY_E2E_CLIENT_SECRET: $(AZCOPY_SPA_CLIENT_SECRET)
110113
AZCOPY_E2E_CLASSIC_ACCOUNT_NAME: $(AZCOPY_E2E_CLASSIC_ACCOUNT_NAME)
111114
AZCOPY_E2E_CLASSIC_ACCOUNT_KEY: $(AZCOPY_E2E_CLASSIC_ACCOUNT_KEY)
112115
CPK_ENCRYPTION_KEY: $(CPK_ENCRYPTION_KEY)
@@ -119,12 +122,15 @@ jobs:
119122
go build -o $(System.DefaultWorkingDirectory)/azcopy_windows_amd64.exe
120123
go build -o $(System.DefaultWorkingDirectory)/azcopy_windows_386.exe
121124
echo 'starting E2E tests on windows'
122-
go test -timeout 30m -race -cover -v ./e2etest
125+
go test -timeout 60m -race -cover -v ./e2etest
123126
env:
124127
AZCOPY_E2E_ACCOUNT_KEY: $(AZCOPY_E2E_ACCOUNT_KEY)
125128
AZCOPY_E2E_ACCOUNT_NAME: $(AZCOPY_E2E_ACCOUNT_NAME)
126129
AZCOPY_E2E_ACCOUNT_KEY_HNS: $(AZCOPY_E2E_ACCOUNT_KEY_HNS)
127130
AZCOPY_E2E_ACCOUNT_NAME_HNS: $(AZCOPY_E2E_ACCOUNT_NAME_HNS)
131+
AZCOPY_E2E_TENANT_ID: $(OAUTH_TENANT_ID)
132+
AZCOPY_E2E_APPLICATION_ID: $(ACTIVE_DIRECTORY_APPLICATION_ID)
133+
AZCOPY_E2E_CLIENT_SECRET: $(AZCOPY_SPA_CLIENT_SECRET)
128134
AZCOPY_E2E_CLASSIC_ACCOUNT_NAME: $(AZCOPY_E2E_CLASSIC_ACCOUNT_NAME)
129135
AZCOPY_E2E_CLASSIC_ACCOUNT_KEY: $(AZCOPY_E2E_CLASSIC_ACCOUNT_KEY)
130136
CPK_ENCRYPTION_KEY: $(CPK_ENCRYPTION_KEY)
@@ -139,12 +145,15 @@ jobs:
139145
go build -o azcopy_darwin_amd64
140146
echo 'starting E2E tests on mac-os'
141147
export AZCOPY_E2E_EXECUTABLE_PATH=$(pwd)/azcopy_darwin_amd64
142-
go test -timeout 30m -race -cover -v ./e2etest
148+
go test -timeout 60m -race -cover -v ./e2etest
143149
env:
144150
AZCOPY_E2E_ACCOUNT_KEY: $(AZCOPY_E2E_ACCOUNT_KEY)
145151
AZCOPY_E2E_ACCOUNT_NAME: $(AZCOPY_E2E_ACCOUNT_NAME)
146152
AZCOPY_E2E_ACCOUNT_KEY_HNS: $(AZCOPY_E2E_ACCOUNT_KEY_HNS)
147153
AZCOPY_E2E_ACCOUNT_NAME_HNS: $(AZCOPY_E2E_ACCOUNT_NAME_HNS)
154+
AZCOPY_E2E_TENANT_ID: $(OAUTH_TENANT_ID)
155+
AZCOPY_E2E_APPLICATION_ID: $(ACTIVE_DIRECTORY_APPLICATION_ID)
156+
AZCOPY_E2E_CLIENT_SECRET: $(AZCOPY_SPA_CLIENT_SECRET)
148157
AZCOPY_E2E_CLASSIC_ACCOUNT_NAME: $(AZCOPY_E2E_CLASSIC_ACCOUNT_NAME)
149158
AZCOPY_E2E_CLASSIC_ACCOUNT_KEY: $(AZCOPY_E2E_CLASSIC_ACCOUNT_KEY)
150159
CPK_ENCRYPTION_KEY: $(CPK_ENCRYPTION_KEY)
@@ -167,7 +176,7 @@ jobs:
167176
- task: GoTool@0
168177
name: 'Set_up_Golang'
169178
inputs:
170-
version: '1.16.14'
179+
version: '1.17.9'
171180
- task: DownloadSecureFile@1
172181
name: ciGCSServiceAccountKey
173182
displayName: 'Download GCS Service Account Key'
@@ -187,7 +196,7 @@ jobs:
187196
# the set -e line is needed so that the unit tests failure would cause the job to fail properly
188197
# "-check.v" (must be after package list) outputs timings
189198
set -e
190-
go test -timeout 45m -race -short -cover ./cmd ./common ./common/parallel ./ste ./azbfs ./sddl "-check.v"
199+
go test -timeout 60m -race -short -cover ./cmd ./common ./common/parallel ./ste ./azbfs ./sddl "-check.v"
191200
GOARCH=amd64 GOOS=linux go build -o azcopy_linux_amd64
192201
name: 'Run_unit_tests'
193202
env:
@@ -206,9 +215,6 @@ jobs:
206215
export TEST_SUITE_EXECUTABLE_LOCATION=$(pwd)/test-validator
207216
export TEST_DIRECTORY_PATH=$(pwd)/test-temp
208217
209-
# install the CLFSLoad extension
210-
pip3 install clfsload
211-
212218
keyctl session test python ./testSuite/scripts/run.py
213219
name: 'Run_smoke_tests'
214220
env:

cmd/copy.go

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"encoding/json"
2727
"errors"
2828
"fmt"
29+
"github.com/Azure/azure-storage-azcopy/v10/jobsAdmin"
2930
"io"
3031
"math"
3132
"net/url"
@@ -66,7 +67,7 @@ type rawCopyCmdArgs struct {
6667
src string
6768
dst string
6869
fromTo string
69-
//blobUrlForRedirection string
70+
// blobUrlForRedirection string
7071

7172
// new include/exclude only apply to file names
7273
// implemented for remove (and sync) only
@@ -1312,9 +1313,9 @@ func (cca *CookedCopyCmdArgs) processRedirectionUpload(blobResource common.Resou
13121313
// dispatches the job order (in parts) to the storage engine
13131314
func (cca *CookedCopyCmdArgs) processCopyJobPartOrders() (err error) {
13141315
ctx := context.WithValue(context.TODO(), ste.ServiceAPIVersionOverride, ste.DefaultServiceApiVersion)
1315-
// Make AUTO default for Azure Files since Azure Files throttles too easily.
1316-
if ste.JobsAdmin != nil && (cca.FromTo.From() == common.ELocation.File() || cca.FromTo.To() == common.ELocation.File()) {
1317-
ste.JobsAdmin.SetConcurrencySettingsToAuto()
1316+
// Make AUTO default for Azure Files since Azure Files throttles too easily unless user specified concurrency value
1317+
if jobsAdmin.JobsAdmin != nil && (cca.FromTo.From() == common.ELocation.File() || cca.FromTo.To() == common.ELocation.File()) && glcm.GetEnvironmentVariable(common.EEnvironmentVariable.ConcurrencyValue()) == "" {
1318+
jobsAdmin.JobsAdmin.SetConcurrencySettingsToAuto()
13181319
}
13191320

13201321
// Note: credential info here is only used by remove at the moment.
@@ -1556,6 +1557,55 @@ func (cca *CookedCopyCmdArgs) ReportProgressOrExit(lcm common.LifecycleMgr) (tot
15561557
// if json is not desired, and job is done, then we generate a special end message to conclude the job
15571558
duration := time.Now().Sub(cca.jobStartTime) // report the total run time of the job
15581559

1560+
var computeThroughput = func() float64 {
1561+
// compute the average throughput for the last time interval
1562+
bytesInMb := float64(float64(summary.BytesOverWire-cca.intervalBytesTransferred) / float64(base10Mega))
1563+
timeElapsed := time.Since(cca.intervalStartTime).Seconds()
1564+
1565+
// reset the interval timer and byte count
1566+
cca.intervalStartTime = time.Now()
1567+
cca.intervalBytesTransferred = summary.BytesOverWire
1568+
1569+
return common.Iffloat64(timeElapsed != 0, bytesInMb/timeElapsed, 0) * 8
1570+
}
1571+
glcm.Progress(func(format common.OutputFormat) string {
1572+
if format == common.EOutputFormat.Json() {
1573+
jsonOutput, err := json.Marshal(summary)
1574+
common.PanicIfErr(err)
1575+
return string(jsonOutput)
1576+
} else {
1577+
// abbreviated output for cleanup jobs
1578+
if cca.isCleanupJob {
1579+
return cleanupStatusString
1580+
}
1581+
1582+
// if json is not needed, then we generate a message that goes nicely on the same line
1583+
// display a scanning keyword if the job is not completely ordered
1584+
var scanningString = " (scanning...)"
1585+
if summary.CompleteJobOrdered {
1586+
scanningString = ""
1587+
}
1588+
1589+
throughput := computeThroughput()
1590+
throughputString := fmt.Sprintf("2-sec Throughput (Mb/s): %v", jobsAdmin.ToFixed(throughput, 4))
1591+
if throughput == 0 {
1592+
// As there would be case when no bits sent from local, e.g. service side copy, when throughput = 0, hide it.
1593+
throughputString = ""
1594+
}
1595+
1596+
// indicate whether constrained by disk or not
1597+
isBenchmark := cca.FromTo.From() == common.ELocation.Benchmark()
1598+
perfString, diskString := getPerfDisplayText(summary.PerfStrings, summary.PerfConstraint, duration, isBenchmark)
1599+
1600+
return fmt.Sprintf("%.1f %%, %v Done, %v Failed, %v Pending, %v Skipped, %v Total%s, %s%s%s",
1601+
summary.PercentComplete,
1602+
summary.TransfersCompleted,
1603+
summary.TransfersFailed,
1604+
summary.TotalTransfers-(summary.TransfersCompleted+summary.TransfersFailed+summary.TransfersSkipped),
1605+
summary.TransfersSkipped, summary.TotalTransfers, scanningString, perfString, throughputString, diskString)
1606+
}
1607+
})
1608+
15591609
if jobDone {
15601610
exitCode := cca.getSuccessExitCode()
15611611
if summary.TransfersFailed > 0 {
@@ -1585,7 +1635,7 @@ TotalBytesTransferred: %v
15851635
Final Job Status: %v%s%s
15861636
`,
15871637
summary.JobID.String(),
1588-
ste.ToFixed(duration.Minutes(), 4),
1638+
jobsAdmin.ToFixed(duration.Minutes(), 4),
15891639
summary.FileTransfers,
15901640
summary.FolderPropertyTransfers,
15911641
summary.TotalTransfers,
@@ -1603,7 +1653,7 @@ Final Job Status: %v%s%s
16031653
}
16041654

16051655
// log to job log
1606-
jobMan, exists := ste.JobsAdmin.JobMgr(summary.JobID)
1656+
jobMan, exists := jobsAdmin.JobsAdmin.JobMgr(summary.JobID)
16071657
if exists {
16081658
jobMan.Log(pipeline.LogInfo, logStats+"\n"+output)
16091659
}
@@ -1620,56 +1670,6 @@ Final Job Status: %v%s%s
16201670
}
16211671
}
16221672

1623-
var computeThroughput = func() float64 {
1624-
// compute the average throughput for the last time interval
1625-
bytesInMb := float64(float64(summary.BytesOverWire-cca.intervalBytesTransferred) / float64(base10Mega))
1626-
timeElapsed := time.Since(cca.intervalStartTime).Seconds()
1627-
1628-
// reset the interval timer and byte count
1629-
cca.intervalStartTime = time.Now()
1630-
cca.intervalBytesTransferred = summary.BytesOverWire
1631-
1632-
return common.Iffloat64(timeElapsed != 0, bytesInMb/timeElapsed, 0) * 8
1633-
}
1634-
1635-
glcm.Progress(func(format common.OutputFormat) string {
1636-
if format == common.EOutputFormat.Json() {
1637-
jsonOutput, err := json.Marshal(summary)
1638-
common.PanicIfErr(err)
1639-
return string(jsonOutput)
1640-
} else {
1641-
// abbreviated output for cleanup jobs
1642-
if cca.isCleanupJob {
1643-
return cleanupStatusString
1644-
}
1645-
1646-
// if json is not needed, then we generate a message that goes nicely on the same line
1647-
// display a scanning keyword if the job is not completely ordered
1648-
var scanningString = " (scanning...)"
1649-
if summary.CompleteJobOrdered {
1650-
scanningString = ""
1651-
}
1652-
1653-
throughput := computeThroughput()
1654-
throughputString := fmt.Sprintf("2-sec Throughput (Mb/s): %v", ste.ToFixed(throughput, 4))
1655-
if throughput == 0 {
1656-
// As there would be case when no bits sent from local, e.g. service side copy, when throughput = 0, hide it.
1657-
throughputString = ""
1658-
}
1659-
1660-
// indicate whether constrained by disk or not
1661-
isBenchmark := cca.FromTo.From() == common.ELocation.Benchmark()
1662-
perfString, diskString := getPerfDisplayText(summary.PerfStrings, summary.PerfConstraint, duration, isBenchmark)
1663-
1664-
return fmt.Sprintf("%.1f %%, %v Done, %v Failed, %v Pending, %v Skipped, %v Total%s, %s%s%s",
1665-
summary.PercentComplete,
1666-
summary.TransfersCompleted,
1667-
summary.TransfersFailed,
1668-
summary.TotalTransfers-(summary.TransfersCompleted+summary.TransfersFailed+summary.TransfersSkipped),
1669-
summary.TransfersSkipped, summary.TotalTransfers, scanningString, perfString, throughputString, diskString)
1670-
}
1671-
})
1672-
16731673
return
16741674
}
16751675

@@ -1763,7 +1763,7 @@ func init() {
17631763
cpCmd := &cobra.Command{
17641764
Use: "copy [source] [destination]",
17651765
Aliases: []string{"cp", "c"},
1766-
SuggestFor: []string{"cpy", "cy", "mv"}, //TODO why does message appear twice on the console
1766+
SuggestFor: []string{"cpy", "cy", "mv"}, // TODO why does message appear twice on the console
17671767
Short: copyCmdShortDescription,
17681768
Long: copyCmdLongDescription,
17691769
Example: copyCmdExample,

cmd/copyEnumeratorHelper.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package cmd
33
import (
44
"fmt"
55
"github.com/Azure/azure-pipeline-go/pipeline"
6-
"github.com/Azure/azure-storage-azcopy/v10/ste"
6+
"github.com/Azure/azure-storage-azcopy/v10/jobsAdmin"
77
"math/rand"
88
"strings"
99

@@ -85,8 +85,8 @@ func dispatchFinalPart(e *common.CopyJobPartOrderRequest, cca *CookedCopyCmdArgs
8585
return fmt.Errorf("copy job part order with JobId %s and part number %d failed because %s", e.JobID, e.PartNum, resp.ErrorMsg)
8686
}
8787

88-
if ste.JobsAdmin != nil {
89-
ste.JobsAdmin.LogToJobLog(FinalPartCreatedMessage, pipeline.LogInfo)
88+
if jobsAdmin.JobsAdmin != nil {
89+
jobsAdmin.JobsAdmin.LogToJobLog(FinalPartCreatedMessage, pipeline.LogInfo)
9090
}
9191

9292
// set the flag on cca, to indicate the enumeration is done

0 commit comments

Comments
 (0)