Skip to content

Commit 108dbdd

Browse files
nakulkar-msftadreed-msftmstenzmicrosoft-github-policy-service[bot]mohsha-msft
authored
Release 10.17.0 (#2029)
* Add mitigation for weird NtQuerySecurityObject behavior on NAS sources (#1872) * Add check for 0 length, attempt to validate the returned object. * Change to grabbing real SD length * Add comment describing issue * Prevent infinite loop upon listing failure * Fix GCP error checking * Fix GCP disable * Fix bad URL delete (#1892) * Manipulate URLs safely * Fix folder deletion test * Prevent infinite loop upon listing failure * Fix GCP error checking * Fix GCP disable * Fail when errors listing/clearing bucket * Update MacOS testing pipeline (#1896) * fixing small typo (,) in help of jobs clean (#1899) * Microsoft mandatory file * fixing small typo (,) in help of jobs clean Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> Co-authored-by: Mohit Sharma <65536214+mohsha-msft@users.noreply.github.com> * Implement MD OAuth testing (#1859) * Implement MD OAuth testing * Handle async on RevokeAccess, handle job cancel/failure better * Prevent parallel testing of managed disks * lint check * Prevent infinite loop upon listing failure * Fix GCP error checking * Fix GCP disable * Fail when errors listing/clearing bucket * Add env vars * Avoid revoking MD access, as it can be shared. * Fix intermittent failures * Disable MD OAuth testing temporarily. * Add "all" to documentation (#1902) * 10.16.1 patch notes (#1913) * Add bugfixes to change log. * Correct wording & punctuation * Correct version * Export Successfully Updated bytes (#1884) * Add info in error message for mkdir on Log/Plan (#1883) * Microsoft mandatory file * Add info in error message for mkdir on Log/Plan Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> Co-authored-by: Mohit Sharma <65536214+mohsha-msft@users.noreply.github.com> * Fix fixupTokenJson (#1890) * Microsoft mandatory file * Fix fixupTokenJson Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> Co-authored-by: Mohit Sharma <65536214+mohsha-msft@users.noreply.github.com> Co-authored-by: Adam Orosz <adam.orosz@neotechnology.com> * Do not log request/response for container creation error (#1893) * Expose AZCOPY_DOWNLOAD_TO_TEMP_PATH environment variable. (#1895) * Slice against the correct string (#1927) * UX improvement: avoid crash when copying S2S with user delegation SAS (#1932) * Fix bad build + Prevent bad builds in the future (#1917) * Fix bad build + Prevent bad builds in the future * Add Windows build * Make sync use last write time for Azure Files (#1930) * Make sync use last write time for Azure Files * Implement test * 10.16.2 Changelog (#1948) * Update azcopy version * Fixed a bug where preserve permissions would not work with OAuth * Added CODEOWNERS file * Fixed issue where CPK would not be injected on retries * remove OAuth from test * Updated version check string to indicate current AzCopy version (#1969) * added codeowner * Enhance job summary with details about file/folders (#1952) * Add flag to disable version check (#1950) * darwin arm64 * Update golang version to 10.19.2 (#1925) * enable cgo * added tests * Minor fixes: More in description (#1968) * Echo auto-login failure if any * Update help for sync command to use trailing slash on directories * azcopy fail to copy 12TB file to Storage containers in Dev. The logic is used to calculate proper blockSize if it’s not provided, and due to the uint32 cast, it can’t give proper blockSize if filesize is between 50000 * (8 * 1024 * 1024) * X + 1, to 50000 * (8 * 1024 * 1024) * X + 49999. It should return 16MB instead of 8MB blockSize. Accommodated the changes suggested by Narasimha Kulkarni * Added extra logging when switching endpoints * Enable support for preserving SMB info on Linux. (#1723) * Microsoft mandatory file * Enable support for preserving SMB info on Linux. Implemented the GetSDDL/PutSDDL GetSMBProperties/PutSMBProperties methods for Linux using extended attributes. Following are the xattrs we use for fetching/setting various required info. // Extended Attribute (xattr) keys for fetching various information from Linux cifs client. const ( CIFS_XATTR_CREATETIME = "user.cifs.creationtime" // File creation time. CIFS_XATTR_ATTRIB = "user.cifs.dosattrib" // FileAttributes. CIFS_XATTR_CIFS_ACL = "system.cifs_acl" // DACL only. CIFS_XATTR_CIFS_NTSD = "system.cifs_ntsd" // Owner, Group, DACL. CIFS_XATTR_CIFS_NTSD_FULL = "system.cifs_ntsd_full" // Owner, Group, DACL, SACL. ) Majority of the changes are in sddl/sddlHelper_linux.go which implement the following Win32 APIs for dealing with SIDs. ConvertSecurityDescriptorToStringSecurityDescriptorW ConvertStringSecurityDescriptorToSecurityDescriptorW ConvertSidToStringSidW ConvertStringSidToSidW Note: I have skipped Object ACE support in sddl/sddlHelper_linux.go as those should not be used for filesystem properties, only AD object properties. Can someone confirm this? TBD: Conditional SID * Audited, fixed, tested support for "No ACL"/NO_ACCESS_CONTROL and ACL w/o any ACE Tested the following cases: c:\Users\natomar\Downloads>cd testacl // This has "No ACLs" and everyone should be allowed access. c:\Users\natomar\Downloads\testacl>touch NO_ACCESS_CONTROL.txt c:\Users\natomar\Downloads\testacl>cacls NO_ACCESS_CONTROL.txt /S:D:NO_ACCESS_CONTROL Are you sure (Y/N)?y processed file: c:\Users\natomar\Downloads\testacl\NO_ACCESS_CONTROL.txt // This has "No ACLs" and everyone should be allowed access. // It additionally has the "P" (protected) flag set, but that won't have // any effect as that just prevents ACE inheritance but this ACL will // not have any ACLs due to the NO_ACCESS_CONTROL flag. c:\Users\natomar\Downloads\testacl>touch PNO_ACCESS_CONTROL.txt c:\Users\natomar\Downloads\testacl>cacls PNO_ACCESS_CONTROL.txt /S:D:PNO_ACCESS_CONTROL Are you sure (Y/N)?y processed file: c:\Users\natomar\Downloads\testacl\PNO_ACCESS_CONTROL.txt // This should set DACL but with no ACEs, but since "P" is not set it // inherits ACEs from the parent dir. c:\Users\natomar\Downloads\testacl>touch empty_d.txt c:\Users\natomar\Downloads\testacl>cacls empty_d.txt /S:D: Are you sure (Y/N)?y processed file: c:\Users\natomar\Downloads\testacl\empty_d.txt // This should set DACL but with no ACEs, but since "P" is set it // doesn't inherit ACEs from the parent dir and hence this will block // all users. c:\Users\natomar\Downloads\testacl>touch empty_d_with_p.txt c:\Users\natomar\Downloads\testacl>cacls empty_d_with_p.txt /S:D:P Are you sure (Y/N)?y processed file: c:\Users\natomar\Downloads\testacl\empty_d_with_p.txt * Don't fail outright for ACL revision 4. Though our supported ACL types must carry ACL revision 2 as per the doc https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dtyp/20233ed8-a6c6-4097-aafa-dd545ed24428 but I've seen some dirs have ACL revision 4 but ACL types are still supported ones. So instead of failing upfront, let it fail with unsupported ACE type. Also hexadecimal aceRights are more commonly seen than I expected, so removing a log. * Minor fix after running azcopy on a large dir. This was something which I have doubt on. Now that we got a real world issue due to this, it's all clear :-) * Some minor updates after the rebase to latest Azcopy. * Set default value of flag preserve-smb-info to true on Windows and false on other OS (cherry picked from commit ac5bedb) Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> Co-authored-by: Nagendra Tomar <Nagendra.Tomar@microsoft.com> * Added log indicating a sub-directory is being enqueued (#1999) * Log sync deletions to scanning logger (#2000) * ieproxy fix * remove cgo * fix * fix * fix * more testing * more testing * more testing * more testing * mod tidy * mod tidy * more testing * Added codespell (#2008) * Added codespell * Fixed initial codespell errors * Fix format in codespell.yml * Added s3 url parts * Added CodeQL (#2009) * Added linting file * Upgrade codeql to v2 * Fix incorrect conversion between integer types * Fix GCP URL parts * Fix for rare infinite loop on mutex acquisition (#2012) * small fix * removed test * Added trivy file (#2015) * Added trivy file * renamed trivy * Improve debug-ability of e2e tests by uploading logs of failed jobs (#1898) * Upload testing logs to storage account on failed test * Handle as pipeline artifact instead * mkdirall * copy plan files too * Fix failing tests * Change overwrite to affect any "locked in"/completed state * Fail copy job if single blob does not exist (#1981) * Job fail if single file does not exist * fixed change * fail only on a single file not existing * fail on file not found * fail on file not found * fail on file not found * cleanup * added tests * cleanup * removed test * Correct odd behavior around folder overwrites (#1961) * Fix files sync by determining which LMT to use via smb properties flag (#1958) * Fix files sync by determining which LMT to use via smb properties flag * Implement testing for LMT switch * Fix testing * Limit SMB testing to SMB-compatible environment * Enforce SMB LMT for Linux/MacOS test of SMB LMT preference * Fix metadata parsing (#1953) * Fix metadata parsing * rework metadata parsing to be more robust; add test * Fix comment lines * Codespell :| * Fix ADLSG2 intermittent failure (#1901) * Fix ADLSG2 intermittent failure * Add test * Reduce code dupe * Fix build errors * Fix infinite loop maybe? * Store source token and pass to other threads (#1996) * Store source token * testing * failing pipe * cleanup * test logger * fix test failure * fix 2 * fix * sync fix * cleanup check * Hash based sync (#2020) * Implement hash based sync for MD5 * Implement testing * Ensure folders are handled properly in HBS & Test S2S * Add skip/process logging * Include generic xattr syncmeta application * Fix 0-size blobs * Fix core testing * Revert "Include generic xattr syncmeta application" This reverts commit fba55e4. * Warn on no hash @ source, remove MHP * Comments * Comments * Copy properties from Source (#1964) * Copy properties from Source * Remove unnecessary ws changes * Preserve UNIX properties * Move entity type to Overwrite option * Add python suite * Review comments * Fix test * Release notes and version update (#2028) Co-authored-by: adreed-msft <49764384+adreed-msft@users.noreply.github.com> Co-authored-by: mstenz <mstenz-design@web.de> Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> Co-authored-by: Mohit Sharma <65536214+mohsha-msft@users.noreply.github.com> Co-authored-by: Adele Reed <adreed@microsoft.com> Co-authored-by: Karla Saur <1703543+ksaur@users.noreply.github.com> Co-authored-by: adam-orosz <106535811+adam-orosz@users.noreply.github.com> Co-authored-by: Adam Orosz <adam.orosz@neotechnology.com> Co-authored-by: Ze Qian Zhang <zezha@microsoft.com> Co-authored-by: Gauri Prasad <gapra@microsoft.com> Co-authored-by: Gauri Prasad <51212198+gapra-msft@users.noreply.github.com> Co-authored-by: Tamer Sherif <tasherif@microsoft.com> Co-authored-by: Tamer Sherif <69483382+tasherif-msft@users.noreply.github.com> Co-authored-by: reshmav18 <73923840+reshmav18@users.noreply.github.com> Co-authored-by: linuxsmiths <linuxsmiths@gmail.com> Co-authored-by: Nagendra Tomar <Nagendra.Tomar@microsoft.com>
1 parent a10fdd0 commit 108dbdd

File tree

133 files changed

+4766
-620
lines changed

Some content is hidden

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

133 files changed

+4766
-620
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @gapra-msft @adreed-msft @nakulkar-msft @siminsavani-msft @vibhansa-msft @tasherif-msft

.github/workflows/codeql-analysis.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
pull_request:
16+
branches: [ main, dev ]
17+
push:
18+
branches: [ main, dev ]
19+
20+
jobs:
21+
analyze:
22+
name: Analyze
23+
runs-on: ubuntu-latest
24+
permissions:
25+
actions: read
26+
contents: read
27+
security-events: write
28+
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
language: [ 'go' ]
33+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
34+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
39+
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v2
43+
with:
44+
languages: ${{ matrix.language }}
45+
# If you wish to specify custom queries, you can do so here or in a config file.
46+
# By default, queries listed here will override any specified in a config file.
47+
# Prefix the list here with "+" to use these queries and those in the config file.
48+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
49+
50+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51+
# If this step fails, then you should remove it and run the build manually (see below)
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v2
54+
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
57+
58+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59+
# and modify them (or add more) to build your code if your project
60+
# uses a compiled language
61+
62+
#- run: |
63+
# make bootstrap
64+
# make release
65+
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v2

.github/workflows/codespell.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# GitHub Action to automate the identification of common misspellings in text files.
2+
# https://github.com/codespell-project/actions-codespell
3+
# https://github.com/codespell-project/codespell
4+
name: codespell
5+
on:
6+
push:
7+
branches:
8+
- dev
9+
- main
10+
pull_request:
11+
branches:
12+
- dev
13+
- main
14+
jobs:
15+
codespell:
16+
name: Check for spelling errors
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: codespell-project/actions-codespell@master
21+
with:
22+
check_filenames: true
23+
skip: ./sddl/sddlPortable_test.go,./sddl/sddlHelper_linux.go
24+
ignore_words_list: "resue,pase,cancl,cacl,froms"

.github/workflows/trivy.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: trivy
7+
8+
on:
9+
push:
10+
branches: [ "main", "dev" ]
11+
pull_request:
12+
# The branches below must be a subset of the branches above
13+
branches: [ "main", "dev" ]
14+
schedule:
15+
- cron: '31 19 * * 1'
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
build:
22+
permissions:
23+
contents: read # for actions/checkout to fetch code
24+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
25+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
26+
27+
name: Build
28+
runs-on: "ubuntu-22.04"
29+
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v3
33+
34+
- name: Build AzCopy
35+
run: |
36+
go build -o azcopy
37+
ls -l
38+
- name: Run Trivy vulnerability scanner
39+
uses: aquasecurity/trivy-action@master
40+
with:
41+
scan-type: fs
42+
scan-ref: './azcopy'
43+
ignore-unfixed: true
44+
format: 'sarif'
45+
output: 'trivy-results-binary.sarif'
46+
severity: 'CRITICAL,HIGH,MEDIUM,LOW'
47+
48+
- name: List Issues
49+
run: |
50+
cat trivy-results-binary.sarif
51+
- name: Upload Trivy scan results to GitHub Security tab
52+
uses: github/codeql-action/upload-sarif@v2
53+
with:
54+
sarif_file: 'trivy-results-binary.sarif'

ChangeLog.md

+22-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11

22
# Change Log
33

4+
## Version 10.17.0
5+
6+
### New features
7+
8+
1. Added support for hash-based sync. AzCopy sync can now take two new flags `--compare-hash` and `--missing-hash-policy=Generate`, which which user will be able to transfer only those files which differ in their MD5 hash.
9+
10+
### Bug fixes
11+
1. Fixed [issue 1994](https://github.com/Azure/azure-storage-azcopy/pull/1994): Error in calculation of block size
12+
2. Fixed [issue 1957](https://github.com/Azure/azure-storage-azcopy/pull/1957): Repeated Authentication token refresh
13+
3. Fixed [issue 1870](https://github.com/Azure/azure-storage-azcopy/pull/1870): Fixed issue where CPK would not be injected on retries
14+
4. Fixed [issue 1946](https://github.com/Azure/azure-storage-azcopy/issues/1946): Fixed Metadata parsing
15+
5: Fixed [issue 1931](https://github.com/Azure/azure-storage-azcopy/issues/1931)
16+
417
## Version 10.16.2
518

619
### Bug Fixes
@@ -35,7 +48,7 @@
3548
1. Fixed [issue 1506](https://github.com/Azure/azure-storage-azcopy/issues/1506): Added input watcher to resolve issue since job could not be resumed.
3649
2. Fixed [issue 1794](https://github.com/Azure/azure-storage-azcopy/issues/1794): Moved log-level to root.go so log-level arguments do not get ignored.
3750
3. Fixed [issue 1824](https://github.com/Azure/azure-storage-azcopy/issues/1824): Avoid creating .azcopy under HOME if plan/log location is specified elsewhere.
38-
4. Fixed [isue 1830](https://github.com/Azure/azure-storage-azcopy/issues/1830), [issue 1412](https://github.com/Azure/azure-storage-azcopy/issues/1418), and [issue 873](https://github.com/Azure/azure-storage-azcopy/issues/873): Improved error message for when AzCopy cannot determine if source is directory.
51+
4. Fixed [issue 1830](https://github.com/Azure/azure-storage-azcopy/issues/1830), [issue 1412](https://github.com/Azure/azure-storage-azcopy/issues/1418), and [issue 873](https://github.com/Azure/azure-storage-azcopy/issues/873): Improved error message for when AzCopy cannot determine if source is directory.
3952
5. Fixed [issue 1777](https://github.com/Azure/azure-storage-azcopy/issues/1777): Fixed job list to handle respective output-type correctly.
4053
6. Fixed win64 alignment issue.
4154

@@ -191,7 +204,7 @@
191204

192205
### New features
193206
1. Added option to [disable parallel blob listing](https://github.com/Azure/azure-storage-azcopy/pull/1263)
194-
1. Added support for uploading [large files](https://github.com/Azure/azure-storage-azcopy/pull/1254/files) upto 4TiB. Please refer the [public documentation](https://docs.microsoft.com/en-us/rest/api/storageservices/create-file) for more information
207+
1. Added support for uploading [large files](https://github.com/Azure/azure-storage-azcopy/pull/1254/files) up to 4TiB. Please refer the [public documentation](https://docs.microsoft.com/en-us/rest/api/storageservices/create-file) for more information
195208
1. Added support for `include-before`flag. Refer [this](https://github.com/Azure/azure-storage-azcopy/issues/1075) for more information
196209

197210
### Bug fixes
@@ -469,7 +482,7 @@ disallowed because none (other than include-path) are respected.
469482

470483
1. The `*` character is no longer supported as a wildcard in URLs, except for the two exceptions
471484
noted below. It remains supported in local file paths.
472-
1. The first execption is that `/*` is still allowed at the very end of the "path" section of a
485+
1. The first exception is that `/*` is still allowed at the very end of the "path" section of a
473486
URL. This is illustrated by the difference between these two source URLs:
474487
`https://account/container/virtual?SAS` and
475488
`https://account/container/virtualDir/*?SAS`. The former copies the virtual directory
@@ -501,7 +514,7 @@ disallowed because none (other than include-path) are respected.
501514
1. Percent complete is displayed as each job runs.
502515
1. VHD files are auto-detected as page blobs.
503516
1. A new benchmark mode allows quick and easy performance benchmarking of your network connection to
504-
Blob Storage. Run AzCopy with the paramaters `bench --help` for details. This feature is in
517+
Blob Storage. Run AzCopy with the parameters `bench --help` for details. This feature is in
505518
Preview status.
506519
1. The location for AzCopy's "plan" files can be specified with the environment variable
507520
`AZCOPY_JOB_PLAN_LOCATION`. (If you move the plan files and also move the log files using the existing
@@ -520,7 +533,7 @@ disallowed because none (other than include-path) are respected.
520533
1. Memory usage can be controlled by setting the new environment variable `AZCOPY_BUFFER_GB`.
521534
Decimal values are supported. Actual usage will be the value specified, plus some overhead.
522535
1. An extra integrity check has been added: the length of the
523-
completed desination file is checked against that of the source.
536+
completed destination file is checked against that of the source.
524537
1. When downloading, AzCopy can automatically decompress blobs (or Azure Files) that have a
525538
`Content-Encoding` of `gzip` or `deflate`. To enable this behaviour, supply the `--decompress`
526539
parameter.
@@ -685,21 +698,21 @@ information, including those needed to set the new headers.
685698

686699
1. For creating MD5 hashes when uploading, version 10.x now has the OPPOSITE default to version
687700
AzCopy 8.x. Specifically, as of version 10.0.9, MD5 hashes are NOT created by default. To create
688-
Content-MD5 hashs when uploading, you must now specify `--put-md5` on the command line.
701+
Content-MD5 hashes when uploading, you must now specify `--put-md5` on the command line.
689702

690703
### New features
691704

692705
1. Can migrate data directly from Amazon Web Services (AWS). In this high-performance data path
693706
the data is read directly from AWS by the Azure Storage service. It does not need to pass through
694-
the machine running AzCopy. The copy happens syncronously, so you can see its exact progress.
707+
the machine running AzCopy. The copy happens synchronously, so you can see its exact progress.
695708
1. Can migrate data directly from Azure Files or Azure Blobs (any blob type) to Azure Blobs (any
696709
blob type). In this high-performance data path the data is read directly from the source by the
697710
Azure Storage service. It does not need to pass through the machine running AzCopy. The copy
698-
happens syncronously, so you can see its exact progress.
711+
happens synchronously, so you can see its exact progress.
699712
1. Sync command prompts with 4 options about deleting unneeded files from the target: Yes, No, All or
700713
None. (Deletion only happens if the `--delete-destination` flag is specified).
701714
1. Can download to /dev/null. This throws the data away - but is useful for testing raw network
702-
performance unconstrained by disk; and also for validing MD5 hashes in bulk (when run in a cloud
715+
performance unconstrained by disk; and also for validating MD5 hashes in bulk (when run in a cloud
703716
VM in the same region as the Storage account)
704717

705718
### Bug fixes

azbfs/parsing_urls.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type BfsURLParts struct {
2020
isIPEndpointStyle bool // Ex: "https://ip/accountname/filesystem"
2121
}
2222

23-
// isIPEndpointStyle checkes if URL's host is IP, in this case the storage account endpoint will be composed as:
23+
// isIPEndpointStyle checks if URL's host is IP, in this case the storage account endpoint will be composed as:
2424
// http(s)://IP(:port)/storageaccount/share(||container||etc)/...
2525
func isIPEndpointStyle(url url.URL) bool {
2626
return net.ParseIP(url.Host) != nil

azbfs/zc_credential_token.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type TokenCredential interface {
2525
// indicating how long the TokenCredential object should wait before calling your tokenRefresher function again.
2626
func NewTokenCredential(initialToken string, tokenRefresher func(credential TokenCredential) time.Duration) TokenCredential {
2727
tc := &tokenCredential{}
28-
tc.SetToken(initialToken) // We dont' set it above to guarantee atomicity
28+
tc.SetToken(initialToken) // We don't set it above to guarantee atomicity
2929
if tokenRefresher == nil {
3030
return tc // If no callback specified, return the simple tokenCredential
3131
}

azure-pipelines.yml

+27-8
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
env:
3030
GO111MODULE: 'on'
3131
inputs:
32-
version: '1.17.9'
32+
version: '1.19.2'
3333

3434
- script: |
35-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.43.0
35+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.46.2
3636
echo 'Installation complete'
3737
./bin/golangci-lint --version
3838
./bin/golangci-lint run e2etest
@@ -83,7 +83,12 @@ jobs:
8383
8484
- script: |
8585
go build -o "$(Build.ArtifactStagingDirectory)/azcopy_darwin_amd64"
86-
displayName: 'Generate MacOS Build'
86+
displayName: 'Generate MacOS Build with AMD64'
87+
condition: eq(variables.type, 'mac-os')
88+
89+
- script: |
90+
GOARCH=arm64 CGO_ENABLED=1 go build -o "$(Build.ArtifactStagingDirectory)/azcopy_darwin_arm64"
91+
displayName: 'Generate MacOS Build with ARM64'
8792
condition: eq(variables.type, 'mac-os')
8893
8994
- task: PublishBuildArtifacts@1
@@ -116,7 +121,7 @@ jobs:
116121
steps:
117122
- task: GoTool@0
118123
inputs:
119-
version: '1.17.9'
124+
version: '1.19.2'
120125

121126
# Running E2E Tests on Linux - AMD64
122127
- script: |
@@ -134,6 +139,7 @@ jobs:
134139
AZCOPY_E2E_CLIENT_SECRET: $(AZCOPY_SPA_CLIENT_SECRET)
135140
AZCOPY_E2E_CLASSIC_ACCOUNT_NAME: $(AZCOPY_E2E_CLASSIC_ACCOUNT_NAME)
136141
AZCOPY_E2E_CLASSIC_ACCOUNT_KEY: $(AZCOPY_E2E_CLASSIC_ACCOUNT_KEY)
142+
AZCOPY_E2E_LOG_OUTPUT: '$(System.DefaultWorkingDirectory)/logs'
137143
AZCOPY_E2E_OAUTH_MANAGED_DISK_CONFIG: $(AZCOPY_E2E_OAUTH_MANAGED_DISK_CONFIG)
138144
AZCOPY_E2E_STD_MANAGED_DISK_CONFIG: $(AZCOPY_E2E_STD_MANAGED_DISK_CONFIG)
139145
CPK_ENCRYPTION_KEY: $(CPK_ENCRYPTION_KEY)
@@ -157,6 +163,7 @@ jobs:
157163
AZCOPY_E2E_CLIENT_SECRET: $(AZCOPY_SPA_CLIENT_SECRET)
158164
AZCOPY_E2E_CLASSIC_ACCOUNT_NAME: $(AZCOPY_E2E_CLASSIC_ACCOUNT_NAME)
159165
AZCOPY_E2E_CLASSIC_ACCOUNT_KEY: $(AZCOPY_E2E_CLASSIC_ACCOUNT_KEY)
166+
AZCOPY_E2E_LOG_OUTPUT: '$(System.DefaultWorkingDirectory)/logs'
160167
AZCOPY_E2E_OAUTH_MANAGED_DISK_CONFIG: $(AZCOPY_E2E_OAUTH_MANAGED_DISK_CONFIG)
161168
AZCOPY_E2E_STD_MANAGED_DISK_CONFIG: $(AZCOPY_E2E_STD_MANAGED_DISK_CONFIG)
162169
CPK_ENCRYPTION_KEY: $(CPK_ENCRYPTION_KEY)
@@ -182,13 +189,21 @@ jobs:
182189
AZCOPY_E2E_CLIENT_SECRET: $(AZCOPY_SPA_CLIENT_SECRET)
183190
AZCOPY_E2E_CLASSIC_ACCOUNT_NAME: $(AZCOPY_E2E_CLASSIC_ACCOUNT_NAME)
184191
AZCOPY_E2E_CLASSIC_ACCOUNT_KEY: $(AZCOPY_E2E_CLASSIC_ACCOUNT_KEY)
192+
AZCOPY_E2E_LOG_OUTPUT: '$(System.DefaultWorkingDirectory)/logs'
185193
AZCOPY_E2E_OAUTH_MANAGED_DISK_CONFIG: $(AZCOPY_E2E_OAUTH_MANAGED_DISK_CONFIG)
186194
AZCOPY_E2E_STD_MANAGED_DISK_CONFIG: $(AZCOPY_E2E_STD_MANAGED_DISK_CONFIG)
187195
CPK_ENCRYPTION_KEY: $(CPK_ENCRYPTION_KEY)
188196
CPK_ENCRYPTION_KEY_SHA256: $(CPK_ENCRYPTION_KEY_SHA256)
189-
displayName: 'E2E Test MacOs'
197+
displayName: 'E2E Test MacOs AMD64'
190198
condition: eq(variables.type, 'mac-os')
191199
200+
- task: PublishBuildArtifacts@1
201+
displayName: 'Publish logs'
202+
condition: succeededOrFailed()
203+
inputs:
204+
pathToPublish: '$(System.DefaultWorkingDirectory)/logs'
205+
artifactName: logs
206+
192207
- job: Test_On_Ubuntu
193208
variables:
194209
isMutexSet: 'false'
@@ -204,18 +219,22 @@ jobs:
204219
- task: GoTool@0
205220
name: 'Set_up_Golang'
206221
inputs:
207-
version: '1.17.9'
222+
version: '1.19.2'
208223
- task: DownloadSecureFile@1
209224
name: ciGCSServiceAccountKey
210225
displayName: 'Download GCS Service Account Key'
211226
inputs:
212227
secureFile: 'ci-gcs-dev.json'
213228
- script: |
214229
pip install azure-storage-blob==12.12.0
230+
# set the variable to indicate that the mutex is being acquired
231+
# note: we set it before acquiring the mutex to ensure we release the mutex.
232+
# setting this after can result in an un-broken mutex if someone cancels the pipeline after we acquire the
233+
# mutex but before we set this variable.
234+
# setting this before will always work since it is valid to break an un-acquired mutex.
235+
echo '##vso[task.setvariable variable=isMutexSet]true'
215236
# acquire the mutex before running live tests to avoid conflicts
216237
python ./tool_distributed_mutex.py lock "$(MUTEX_URL)"
217-
# set the variable to indicate that the mutex was actually acquired
218-
echo '##vso[task.setvariable variable=isMutexSet]true'
219238
name: 'Acquire_the_distributed_mutex'
220239
- script: |
221240
# run unit test and build executable

cmd/benchmark.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -273,15 +273,15 @@ func (h benchmarkSourceHelper) FromUrl(s string) (fileCount uint, bytesPerFile i
273273
pieces[0] = strings.Split(pieces[0], "=")[1]
274274
pieces[1] = strings.Split(pieces[1], "=")[1]
275275
pieces[2] = strings.Split(pieces[2], "=")[1]
276-
fc, err := strconv.ParseUint(pieces[0], 10, 64)
276+
fc, err := strconv.ParseUint(pieces[0], 10, 32)
277277
if err != nil {
278278
return 0, 0, 0, err
279279
}
280280
bpf, err := strconv.ParseInt(pieces[1], 10, 64)
281281
if err != nil {
282282
return 0, 0, 0, err
283283
}
284-
nf, err := strconv.ParseUint(pieces[2], 10, 64)
284+
nf, err := strconv.ParseUint(pieces[2], 10, 32)
285285
if err != nil {
286286
return 0, 0, 0, err
287287
}

0 commit comments

Comments
 (0)