feat(snapshots): Implement volume shadow copy support on Windows (#3543)

* Implement volume shadow copy support on Windows

* Update go-vss version

* Fix unused variables

* Rename upload_actions*.go files

* Move vss settings to a separate policy section

* Handle existing shadow copy root

* Fix tests

* Fix lint issues

* Add cli policy test

* Add OS snapshot integration test

* Add GitHub Actions VSS test

* Fix "Incorrect function" error for root VSS snapshots

* Rename err to finalErr in createOSSnapshot

* Add OSSnapshotMode test

* Do not modify paths starting with \\?\ on Windows

* Allow warning messages in logfile tests

* Fix ignorefs not wrapping OS snapshot directory

* Retry VSS creation if another op was in progress

---------

Co-authored-by: Jarek Kowalski <jaak@jkowalski.net>
This commit is contained in:
Maxim Khitrov
2024-02-04 00:44:41 -05:00
committed by GitHub
parent 3fed193051
commit f62ef51700
23 changed files with 528 additions and 22 deletions

View File

@@ -0,0 +1,42 @@
name: Volume Shadow Copy Test
on:
push:
branches: [ master ]
tags:
- v*
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
vss-test:
name: Volume Shadow Copy Test
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
check-latest: true
id: go
- name: Install gsudo
shell: bash
run: |
choco install -y --no-progress gsudo
echo "C:\tools\gsudo\Current" >> $GITHUB_PATH
- name: Admin Test
run: gsudo make os-snapshot-tests
- name: Non-Admin Test
run: gsudo -i Medium make os-snapshot-tests
- name: Upload Logs
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: logs
path: .logs/**/*.log
if-no-files-found: ignore
if: ${{ always() }}