Skip to content

Commit

Permalink
update win os version in github workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Owire <[email protected]>
  • Loading branch information
crazy-max authored and billywr committed Feb 10, 2025
2 parents f3aafa7 + d394e48 commit 2af24a2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/test-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
retention-days: 1

test-windows-amd64:
runs-on: windows-2022
runs-on: ${{ matrix.os }}
needs:
- build
env:
Expand All @@ -79,6 +79,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-2025]
worker:
- containerd
pkg:
Expand All @@ -89,7 +90,12 @@ jobs:
- ./frontend
- ./frontend/dockerfile
include:
-
- os: windows-2022
worker: containerd
pkg: ./...
skip-integration-tests: 1
- os: windows-2025
worker: containerd
pkg: ./...
skip-integration-tests: 1
steps:
Expand Down Expand Up @@ -165,6 +171,7 @@ jobs:
name: test-reports-${{ env.TEST_REPORT_NAME }}
path: ./bin/testreports
retention-days: 1
overwrite: true
-
name: Dump context
if: failure()
Expand Down
11 changes: 1 addition & 10 deletions solver/bboltcachestorage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,28 +267,19 @@ func (s *Store) emptyBranchWithParents(tx *bolt.Tx, id []byte) error {
if backlinks := tx.Bucket([]byte(backlinksBucket)).Bucket(id); backlinks != nil {
if err := backlinks.ForEach(func(k, v []byte) error {
if subLinks := tx.Bucket([]byte(linksBucket)).Bucket(k); subLinks != nil {
// Perform deletion outside of the iteration.
// https://github.com/etcd-io/bbolt/pull/611
var toDelete []string
if err := subLinks.ForEach(func(k, v []byte) error {
parts := bytes.Split(k, []byte("@"))
if len(parts) != 2 {
return errors.Errorf("invalid key %s", k)
}
if bytes.Equal(id, parts[1]) {
toDelete = append(toDelete, string(k))
return subLinks.Delete(k)
}
return nil
}); err != nil {
return err
}

for _, k := range toDelete {
if err := subLinks.Delete([]byte(k)); err != nil {
return err
}
}

if isEmptyBucket(subLinks) {
if subResult := tx.Bucket([]byte(resultBucket)).Bucket(k); isEmptyBucket(subResult) {
if err := tx.Bucket([]byte(linksBucket)).DeleteBucket(k); err != nil {
Expand Down

0 comments on commit 2af24a2

Please sign in to comment.