Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Lint
on:
pull_request:
branches: [ master ]
branches: [ oadp-dev, oadp-1.* ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest]
name: Lint
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -33,19 +33,5 @@ jobs:
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: 'go.mod'
- id: govulncheck
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
with:
cache: false
go-version-input: '1.25.4'
# An explicit Go version is needed for govulncheck-action since internally
# it uses an outdated setup-go@v5.0 action that does not respect the 'toolchain'
# directive in the 'go.mod' file.
#go-version-file: 'go.mod'
repo-checkout: false
- name: Lint
run: make lint
- name: Check Locks
run: make check-locks
- name: Prettier
run: make check-prettier
File renamed without changes.
File renamed without changes.
20 changes: 4 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
name: Tests
on:
pull_request:
branches: [ master ]
branches: [ oadp-dev, oadp-1.* ]
push:
# ci-sandbox is a branch dedicated to testing post-submit code.
branches: [ master, artifacts-pr ]
branches: [ oadp-dev, oadp-1.* ]
tags:
- v*
schedule:
# run on Mondays at 8AM
- cron: '0 8 * * 1'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -29,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest, ubuntu-24.04-arm ]
os: [ubuntu-latest]
name: Tests
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -41,20 +37,12 @@ jobs:
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: 'go.mod'
- name: Install Windows-specific packages
run: "choco install --no-progress -y make zip unzip curl"
if: ${{ contains(matrix.os, 'windows') }}
- name: Install macOS-specific packages
run: "sudo xcode-select -r"
if: ${{ contains(matrix.os, 'macos') }}
- name: Setup
run: make -j4 ci-setup
run: make -j4 go-modules all-tools
- name: Test Blob Index Manager V0
run: make test-index-blob-v0
- name: Tests
run: make ci-tests
- name: Integration Tests
run: make -j2 ci-integration-tests
- name: Upload Logs
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
Expand Down
7 changes: 4 additions & 3 deletions repo/blob/azure/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import (
"fmt"

"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"
"github.com/pkg/errors"

"github.com/kopia/kopia/internal/clock"
"github.com/kopia/kopia/repo/blob"
"github.com/kopia/kopia/repo/blob/retrying"
"github.com/pkg/errors"
)

// NewWithClient creates new Azure backend storage with the specified client
// NewWithClient creates new Azure backend storage with the specified client.
func NewWithClient(ctx context.Context, opt *Options, client *azblob.Client) (blob.Storage, error) {
raw := &azStorage{
Options: *opt,
Expand All @@ -24,7 +25,7 @@ func NewWithClient(ctx context.Context, opt *Options, client *azblob.Client) (bl
// verify Azure connection is functional by listing blobs in a bucket, which will fail if the container
// does not exist. We list with a prefix that will not exist, to avoid iterating through any objects.
nonExistentPrefix := fmt.Sprintf("kopia-azure-storage-initializing-%v", clock.Now().UnixNano())
if err := raw.ListBlobs(ctx, blob.ID(nonExistentPrefix), func(md blob.Metadata) error {
if err := raw.ListBlobs(ctx, blob.ID(nonExistentPrefix), func(_ blob.Metadata) error {
return nil
}); err != nil {
return nil, errors.Wrap(err, "unable to list from the bucket")
Expand Down
Loading