Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: only delete gc related labels #213

Merged
merged 3 commits into from
Oct 10, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/concurrent-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
env:
GO_VERSION: 1.18
HARBOR_VERSION: 2.8.4
NYDUS_VERSION: 2.1.6
NYDUS_VERSION: 2.2.3

jobs:
concurrent_test_same:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
env:
GO_VERSION: 1.18
HARBOR_VERSION: 2.8.4
NYDUS_VERSION: 2.1.6
NYDUS_VERSION: 2.2.3
OCI_IMAGE_NAME: redis

jobs:
Expand Down
9 changes: 6 additions & 3 deletions pkg/content/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"fmt"
"path/filepath"
"strconv"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -276,9 +277,11 @@ func (content *Content) Info(ctx context.Context, dgst digest.Digest) (ctrconten

func (content *Content) Update(ctx context.Context, info ctrcontent.Info, fieldpaths ...string) (ctrcontent.Info, error) {
// containerd content store write labels to annotate some blobs belong to a same repo,
// cleaning labels is needed by GC
if info.Labels != nil {
info.Labels = nil
// cleaning gc related labels
for k := range info.Labels {
if strings.HasPrefix(k, "containerd.io/gc") {
delete(info.Labels, k)
}
}
return content.store.Update(ctx, info, fieldpaths...)
}
Expand Down
6 changes: 1 addition & 5 deletions script/integration/nydus/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ sudo ./accelctl task create --sync localhost/library/$OCI_IMAGE_NAME:latest

# Verify filesystem consistency for converted image
sudo /usr/bin/nydusify check \
--nydus-image /usr/bin/nydus-image \
--nydusd /usr/bin/nydusd \
--source localhost/library/$OCI_IMAGE_NAME:latest \
--target localhost/library/$OCI_IMAGE_NAME:latest-nydus \
--backend-type registry \
--backend-config "{\"scheme\":\"http\",\"host\":\"localhost\",\"repo\":\"library/$OCI_IMAGE_NAME\",\"auth\":\"YWRtaW46SGFyYm9yMTIzNDU=\"}"
--target localhost/library/$OCI_IMAGE_NAME:latest-nydus

# Gracefully exit acceld
sudo pkill -SIGINT acceld
6 changes: 1 addition & 5 deletions script/integration/one-time.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,5 @@ sudo ./accelctl convert --config ./misc/config/config.nydus.yaml localhost/libra

# Verify filesystem consistency for converted image
sudo /usr/bin/nydusify check \
--nydus-image /usr/bin/nydus-image \
--nydusd /usr/bin/nydusd \
--source localhost/library/$OCI_IMAGE_NAME:latest \
--target localhost/library/$OCI_IMAGE_NAME:latest-nydus \
--backend-type registry \
--backend-config "{\"scheme\":\"http\",\"host\":\"localhost\",\"repo\":\"library/$OCI_IMAGE_NAME\",\"auth\":\"YWRtaW46SGFyYm9yMTIzNDU=\"}"
--target localhost/library/$OCI_IMAGE_NAME:latest-nydus
4 changes: 2 additions & 2 deletions script/release/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.18.7 AS build

ARG NYDUS_VERSION=v2.1.6
ARG NYDUS_VERSION=v2.2.3

ARG NYDUS_LINUX_AMD64_SHA256SUM="45c3c4294863725df2597a722767803db8250777fd3c3b85c1f7c29ecc2674be"
ARG NYDUS_LINUX_AMD64_SHA256SUM="80b6e86f30a6f61958a878b705c5e36c7312cf0816e51c1e5e5f309931e28813"

# Install acceld
COPY ./ /accel
Expand Down
Loading