Skip to content

Commit

Permalink
Merge pull request #1378 from tesshuflower/restic-v0.17.0
Browse files Browse the repository at this point in the history
Update restic to v0.17.1
  • Loading branch information
openshift-merge-bot[bot] committed Sep 10, 2024
2 parents 876fd10 + c3e5468 commit 9c2c60e
Show file tree
Hide file tree
Showing 506 changed files with 26,890 additions and 12,251 deletions.
17 changes: 9 additions & 8 deletions controllers/mover/restic/mover.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,14 +368,14 @@ func (m *Mover) ensureJob(ctx context.Context, cachePVC *corev1.PersistentVolume
utils.EnvFromSecret(repo.Name, "AWS_SECRET_ACCESS_KEY", true),
utils.EnvFromSecret(repo.Name, "AWS_SESSION_TOKEN", true), // New in v0.14.0
utils.EnvFromSecret(repo.Name, "AWS_DEFAULT_REGION", true),
/* These vars are in restic main but not in an official release yet (as of v0.16.3)
utils.EnvFromSecret(repo.Name, "RESTIC_AWS_ASSUME_ROLE_ARN", true),
utils.EnvFromSecret(repo.Name, "RESTIC_AWS_ASSUME_ROLE_SESSION_NAME", true),
utils.EnvFromSecret(repo.Name, "RESTIC_AWS_ASSUME_ROLE_EXTERNAL_ID", true),
utils.EnvFromSecret(repo.Name, "RESTIC_AWS_ASSUME_ROLE_POLICY", true),
utils.EnvFromSecret(repo.Name, "RESTIC_AWS_ASSUME_ROLE_REGION", true),
utils.EnvFromSecret(repo.Name, "RESTIC_AWS_ASSUME_ROLE_STS_ENDPOINT", true),
*/
utils.EnvFromSecret(repo.Name, "AWS_PROFILE", true),
// AWS_SHARED_CREDENTIALS_FILE <- not implementing
utils.EnvFromSecret(repo.Name, "RESTIC_AWS_ASSUME_ROLE_ARN", true), // New in v0.17.0
utils.EnvFromSecret(repo.Name, "RESTIC_AWS_ASSUME_ROLE_SESSION_NAME", true), // New in v0.17.0
utils.EnvFromSecret(repo.Name, "RESTIC_AWS_ASSUME_ROLE_EXTERNAL_ID", true), // New in v0.17.0
utils.EnvFromSecret(repo.Name, "RESTIC_AWS_ASSUME_ROLE_POLICY", true), // New in v0.17.0
utils.EnvFromSecret(repo.Name, "RESTIC_AWS_ASSUME_ROLE_REGION", true), // New in v0.17.0
utils.EnvFromSecret(repo.Name, "RESTIC_AWS_ASSUME_ROLE_STS_ENDPOINT", true), // New in v0.17.0
utils.EnvFromSecret(repo.Name, "ST_AUTH", true),
utils.EnvFromSecret(repo.Name, "ST_USER", true),
utils.EnvFromSecret(repo.Name, "ST_KEY", true),
Expand Down Expand Up @@ -403,6 +403,7 @@ func (m *Mover) ensureJob(ctx context.Context, cachePVC *corev1.PersistentVolume
utils.EnvFromSecret(repo.Name, "AZURE_ACCOUNT_KEY", true),
utils.EnvFromSecret(repo.Name, "AZURE_ACCOUNT_SAS", true), // New in v0.14.0
utils.EnvFromSecret(repo.Name, "AZURE_ENDPOINT_SUFFIX", true), // New in v0.16.0
// AZURE_FORCE_CLI_CREDENTIAL <- not implementing, requires azure cli or local credentials stored from cli?
utils.EnvFromSecret(repo.Name, "GOOGLE_PROJECT_ID", true),
utils.EnvFromSecret(repo.Name, "RESTIC_REST_USERNAME", true), // New in v0.16.1
utils.EnvFromSecret(repo.Name, "RESTIC_REST_PASSWORD", true), // New in v0.16.1
Expand Down
2 changes: 1 addition & 1 deletion mover-restic/SOURCE_VERSIONS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
https://github.com/restic/restic.git v0.16.5 fe9f142b5249f7db1a7f2bad1bedf9321c885e51
https://github.com/restic/restic.git v0.17.1 975aa41e1e6a1c88deb501451f23cbdbb013f1da
https://github.com/minio/minio-go.git v7.0.66 5415e6c72a71610108fe05ee747ac760dd40094f
8 changes: 4 additions & 4 deletions mover-restic/restic/.github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@3d58c274f17dffee475a5520cbe67f0a882c4dbb
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
Expand All @@ -45,7 +45,7 @@ jobs:
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226
uses: docker/setup-buildx-action@2b51285047da1547ffb1b2203d8be4c0af6b1f20

- name: Ensure consistent binaries
run: |
Expand All @@ -55,7 +55,7 @@ jobs:
if: github.ref != 'refs/heads/master'

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1
with:
push: true
context: .
Expand Down
49 changes: 29 additions & 20 deletions mover-restic/restic/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
contents: read

env:
latest_go: "1.21.x"
latest_go: "1.22.x"
GO111MODULE: on

jobs:
Expand All @@ -23,27 +23,32 @@ jobs:
# list of jobs to run:
include:
- job_name: Windows
go: 1.21.x
go: 1.22.x
os: windows-latest

- job_name: macOS
go: 1.21.x
go: 1.22.x
os: macOS-latest
test_fuse: false

- job_name: Linux
go: 1.21.x
go: 1.22.x
os: ubuntu-latest
test_cloud_backends: true
test_fuse: true
check_changelog: true

- job_name: Linux (race)
go: 1.21.x
go: 1.22.x
os: ubuntu-latest
test_fuse: true
test_opts: "-race"

- job_name: Linux
go: 1.21.x
os: ubuntu-latest
test_fuse: true

- job_name: Linux
go: 1.20.x
os: ubuntu-latest
Expand All @@ -61,6 +66,9 @@ jobs:
GOPROXY: https://proxy.golang.org

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v5
with:
Expand All @@ -69,7 +77,7 @@ jobs:
- name: Get programs (Linux/macOS)
run: |
echo "build Go tools"
go install github.com/restic/rest-server/cmd/rest-server@latest
go install github.com/restic/rest-server/cmd/rest-server@master
echo "install minio server"
mkdir $HOME/bin
Expand Down Expand Up @@ -101,7 +109,7 @@ jobs:
$ProgressPreference = 'SilentlyContinue'
echo "build Go tools"
go install github.com/restic/rest-server/...
go install github.com/restic/rest-server/cmd/rest-server@master
echo "install minio server"
mkdir $Env:USERPROFILE/bin
Expand Down Expand Up @@ -134,9 +142,6 @@ jobs:
echo $Env:USERPROFILE\tar\bin >> $Env:GITHUB_PATH
if: matrix.os == 'windows-latest'

- name: Check out code
uses: actions/checkout@v4

- name: Build with build.go
run: |
go run build.go
Expand Down Expand Up @@ -225,14 +230,14 @@ jobs:
name: Cross Compile for subset ${{ matrix.subset }}

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go ${{ env.latest_go }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.latest_go }}

- name: Check out code
uses: actions/checkout@v4

- name: Cross-compile for subset ${{ matrix.subset }}
run: |
mkdir build-output build-output-debug
Expand All @@ -242,20 +247,24 @@ jobs:
lint:
name: lint
runs-on: ubuntu-latest
permissions:
contents: read
# allow annotating code in the PR
checks: write
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Go ${{ env.latest_go }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.latest_go }}

- name: Check out code
uses: actions/checkout@v4

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.55.2
version: v1.57.1
args: --verbose --timeout 5m

# only run golangci-lint for pull requests, otherwise ALL hints get
Expand Down Expand Up @@ -293,7 +302,7 @@ jobs:

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
Expand All @@ -316,7 +325,7 @@ jobs:

- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
push: false
context: .
Expand Down
1 change: 1 addition & 0 deletions mover-restic/restic/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.idea
/restic
/restic.exe
/.vagrant
Expand Down
16 changes: 16 additions & 0 deletions mover-restic/restic/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ linters:
# parse and typecheck code
- typecheck

# ensure that http response bodies are closed
- bodyclose

- importas

issues:
# don't use the default exclude rules, this hides (among others) ignored
# errors from Close() calls
Expand All @@ -51,3 +56,14 @@ issues:
# staticcheck: there's no easy way to replace these packages
- "SA1019: \"golang.org/x/crypto/poly1305\" is deprecated"
- "SA1019: \"golang.org/x/crypto/openpgp\" is deprecated"

exclude-rules:
# revive: ignore unused parameters in tests
- path: (_test\.go|testing\.go|backend/.*/tests\.go)
text: "unused-parameter:"

linters-settings:
importas:
alias:
- pkg: github.com/restic/restic/internal/test
alias: rtest
4 changes: 4 additions & 0 deletions mover-restic/restic/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ build:
tools:
python: "3.11"

# Build HTMLZip
formats:
- htmlzip

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/conf.py
Expand Down
Loading

0 comments on commit 9c2c60e

Please sign in to comment.