From a8f07a775ee20e1e484d2952cc71aee8ea77054c Mon Sep 17 00:00:00 2001 From: southwest <1403572259@qq.com> Date: Wed, 8 Jan 2025 19:35:31 +0800 Subject: [PATCH 01/17] feat: add 'LoadTocCache' in Download message when starting a preheat job Signed-off-by: southwest <1403572259@qq.com> --- go.mod | 4 ++-- go.sum | 10 ++++++---- scheduler/job/job.go | 3 +++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 087a3208959..aa172e423ed 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module d7y.io/dragonfly/v2 go 1.23.0 require ( - d7y.io/api/v2 v2.0.177 + d7y.io/api/v2 v2.1.4 github.com/MysteriousPotato/go-lockable v1.0.0 github.com/RichardKnop/machinery v1.10.8 github.com/Showmax/go-fqdn v1.0.0 @@ -91,7 +91,7 @@ require ( golang.org/x/sys v0.28.0 golang.org/x/time v0.7.0 google.golang.org/api v0.205.0 - google.golang.org/grpc v1.68.0 + google.golang.org/grpc v1.69.2 google.golang.org/protobuf v1.36.1 gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/yaml.v3 v3.0.1 diff --git a/go.sum b/go.sum index dd884e6f188..6cc47beb87e 100644 --- a/go.sum +++ b/go.sum @@ -53,8 +53,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -d7y.io/api/v2 v2.0.177 h1:iC+Jm4n7lKs3N1JIO25XOdtELbKSlis85LEoGbYlp98= -d7y.io/api/v2 v2.0.177/go.mod h1:+l4ErhthKmcIhcRU6F01Km8q+yDyICF7JImefg0t6HY= +d7y.io/api/v2 v2.1.4 h1:mggiXUbJ29uGk97MU1bBoi5QdZhyjILQX1krCkvYBho= +d7y.io/api/v2 v2.1.4/go.mod h1:UsTlWa7mE9sk90KqKk6ZWQgXGWNDDpM8dsp8BZnz2d4= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= @@ -1627,6 +1627,8 @@ go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5W go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M= go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -2190,8 +2192,8 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= -google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= +google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/scheduler/job/job.go b/scheduler/job/job.go index c748515ac9b..8fa2c36e17b 100644 --- a/scheduler/job/job.go +++ b/scheduler/job/job.go @@ -307,6 +307,7 @@ func (j *job) preheatAllSeedPeers(ctx context.Context, taskID string, req *inter RequestHeader: req.Headers, Timeout: durationpb.New(req.Timeout), CertificateChain: req.CertificateChain, + LoadToCache: true, }}) if err != nil { log.Errorf("preheat failed: %s", err.Error()) @@ -448,6 +449,7 @@ func (j *job) preheatAllPeers(ctx context.Context, taskID string, req *internalj RequestHeader: req.Headers, Timeout: durationpb.New(req.Timeout), CertificateChain: req.CertificateChain, + LoadToCache: true, }}) if err != nil { log.Errorf("preheat failed: %s", err.Error()) @@ -590,6 +592,7 @@ func (j *job) preheatV2(ctx context.Context, taskID string, req *internaljob.Pre FilteredQueryParams: filteredQueryParams, RequestHeader: req.Headers, CertificateChain: req.CertificateChain, + LoadToCache: true, }}) if err != nil { log.Errorf("preheat failed: %s", err.Error()) From abce59c87718e414b4bf3940ed297f7eba2083d3 Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Mon, 17 Feb 2025 13:03:13 +0800 Subject: [PATCH 02/17] feat: add load_to_cache field in preheat request Signed-off-by: southwest miao <1403572259@qq.com> --- internal/job/types.go | 1 + manager/job/preheat.go | 1 + manager/types/job.go | 3 +++ scheduler/job/job.go | 3 +++ 4 files changed, 8 insertions(+) diff --git a/internal/job/types.go b/internal/job/types.go index d54f9a20eb5..6b9d90c4006 100644 --- a/internal/job/types.go +++ b/internal/job/types.go @@ -33,6 +33,7 @@ type PreheatRequest struct { CertificateChain [][]byte `json:"certificate_chain" validate:"omitempty"` InsecureSkipVerify bool `json:"insecure_skip_verify" validate:"omitempty"` Timeout time.Duration `json:"timeout" validate:"omitempty"` + LoadToCache bool `json:"load_to_cache" validate:"omitempty"` } // PreheatResponse defines the response parameters for preheating. diff --git a/manager/job/preheat.go b/manager/job/preheat.go index 50c61cfd241..1fb874558d7 100644 --- a/manager/job/preheat.go +++ b/manager/job/preheat.go @@ -136,6 +136,7 @@ func (p *preheat) CreatePreheat(ctx context.Context, schedulers []models.Schedul CertificateChain: p.certificateChain, InsecureSkipVerify: p.insecureSkipVerify, Timeout: json.Timeout, + LoadToCache: json.LoadToCache, }, } default: diff --git a/manager/types/job.go b/manager/types/job.go index f9421196feb..22be25e6dc2 100644 --- a/manager/types/job.go +++ b/manager/types/job.go @@ -137,6 +137,9 @@ type PreheatArgs struct { // Timeout is the timeout for preheating, default is 30 minutes. Timeout time.Duration `json:"timeout" binding:"omitempty"` + + // LoadToCache is the flag for preheating content in cache storage. + LoadToCache bool `json:"load_to_cache" binding:"omitempty"` } type CreateSyncPeersJobRequest struct { diff --git a/scheduler/job/job.go b/scheduler/job/job.go index b6e370a9231..58dfbf6a44f 100644 --- a/scheduler/job/job.go +++ b/scheduler/job/job.go @@ -307,6 +307,7 @@ func (j *job) preheatAllSeedPeers(ctx context.Context, taskID string, req *inter RequestHeader: req.Headers, Timeout: durationpb.New(req.Timeout), CertificateChain: req.CertificateChain, + LoadToCache: req.LoadToCache, }}) if err != nil { log.Errorf("preheat failed: %s", err.Error()) @@ -448,6 +449,7 @@ func (j *job) preheatAllPeers(ctx context.Context, taskID string, req *internalj RequestHeader: req.Headers, Timeout: durationpb.New(req.Timeout), CertificateChain: req.CertificateChain, + LoadToCache: req.LoadToCache, }}) if err != nil { log.Errorf("preheat failed: %s", err.Error()) @@ -590,6 +592,7 @@ func (j *job) preheatV2(ctx context.Context, taskID string, req *internaljob.Pre FilteredQueryParams: filteredQueryParams, RequestHeader: req.Headers, CertificateChain: req.CertificateChain, + LoadToCache: req.LoadToCache, }}) if err != nil { log.Errorf("preheat failed: %s", err.Error()) From 142bf1ce715fba2816f8851156509dedb5137bd7 Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Sun, 16 Mar 2025 19:53:14 +0800 Subject: [PATCH 03/17] feat: load_to_cache Signed-off-by: southwest miao <1403572259@qq.com> --- internal/job/types.go | 1 + manager/types/job.go | 3 +++ scheduler/job/job.go | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/internal/job/types.go b/internal/job/types.go index d54f9a20eb5..6b9d90c4006 100644 --- a/internal/job/types.go +++ b/internal/job/types.go @@ -33,6 +33,7 @@ type PreheatRequest struct { CertificateChain [][]byte `json:"certificate_chain" validate:"omitempty"` InsecureSkipVerify bool `json:"insecure_skip_verify" validate:"omitempty"` Timeout time.Duration `json:"timeout" validate:"omitempty"` + LoadToCache bool `json:"load_to_cache" validate:"omitempty"` } // PreheatResponse defines the response parameters for preheating. diff --git a/manager/types/job.go b/manager/types/job.go index f9421196feb..51b91073442 100644 --- a/manager/types/job.go +++ b/manager/types/job.go @@ -137,6 +137,9 @@ type PreheatArgs struct { // Timeout is the timeout for preheating, default is 30 minutes. Timeout time.Duration `json:"timeout" binding:"omitempty"` + + // LoadToCache is the flag indicating whether loading piece to cache, default is false. + LoadToCache bool `json:"load_to_cache" binding:"omitempty"` } type CreateSyncPeersJobRequest struct { diff --git a/scheduler/job/job.go b/scheduler/job/job.go index 8fa2c36e17b..2630839ed55 100644 --- a/scheduler/job/job.go +++ b/scheduler/job/job.go @@ -307,7 +307,7 @@ func (j *job) preheatAllSeedPeers(ctx context.Context, taskID string, req *inter RequestHeader: req.Headers, Timeout: durationpb.New(req.Timeout), CertificateChain: req.CertificateChain, - LoadToCache: true, + LoadToCache: req.LoadToCache, }}) if err != nil { log.Errorf("preheat failed: %s", err.Error()) @@ -449,7 +449,7 @@ func (j *job) preheatAllPeers(ctx context.Context, taskID string, req *internalj RequestHeader: req.Headers, Timeout: durationpb.New(req.Timeout), CertificateChain: req.CertificateChain, - LoadToCache: true, + LoadToCache: req.LoadToCache, }}) if err != nil { log.Errorf("preheat failed: %s", err.Error()) @@ -592,7 +592,7 @@ func (j *job) preheatV2(ctx context.Context, taskID string, req *internaljob.Pre FilteredQueryParams: filteredQueryParams, RequestHeader: req.Headers, CertificateChain: req.CertificateChain, - LoadToCache: true, + LoadToCache: req.LoadToCache, }}) if err != nil { log.Errorf("preheat failed: %s", err.Error()) From 92d8c8b081b7db04522c8f59f20589d003c07faf Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Thu, 10 Apr 2025 19:56:26 +0800 Subject: [PATCH 04/17] test(dragonfly-client-storage): add e2e test for cache upload/download. Signed-off-by: southwest miao <1403572259@qq.com> --- manager/types/job.go | 2 +- test/e2e/v2/manager/preheat.go | 118 +++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 1 deletion(-) diff --git a/manager/types/job.go b/manager/types/job.go index fb60daa39c8..102fa8a970b 100644 --- a/manager/types/job.go +++ b/manager/types/job.go @@ -144,7 +144,7 @@ type PreheatArgs struct { // Timeout is the timeout for preheating, default is 30 minutes. Timeout time.Duration `json:"timeout" binding:"omitempty"` - // LoadToCache is the flag for preheating content in cache storage. + // LoadToCache is the flag for preheating content in cache storage, defailt is false. LoadToCache bool `json:"load_to_cache" binding:"omitempty"` } diff --git a/test/e2e/v2/manager/preheat.go b/test/e2e/v2/manager/preheat.go index 3986ec2c994..e34afb536b6 100644 --- a/test/e2e/v2/manager/preheat.go +++ b/test/e2e/v2/manager/preheat.go @@ -19,6 +19,8 @@ package manager import ( "encoding/json" "fmt" + "regexp" + "strconv" . "github.com/onsi/ginkgo/v2" //nolint . "github.com/onsi/gomega" //nolint @@ -205,6 +207,122 @@ var _ = Describe("Preheat with Manager", func() { }) }) + Context("100MiB file in cache", func() { + var ( + testFile *util.File + err error + ) + + BeforeEach(func() { + testFile, err = util.GetFileServer().GenerateFile(util.FileSize100MiB) + Expect(err).NotTo(HaveOccurred()) + Expect(testFile).NotTo(BeNil()) + }) + + AfterEach(func() { + err = util.GetFileServer().DeleteFile(testFile.GetInfo()) + Expect(err).NotTo(HaveOccurred()) + }) + + It("preheat files in cache should be ok", Label("preheat", "file", "cache"), func() { + managerPod, err := util.ManagerExec(0) + fmt.Println(err) + Expect(err).NotTo(HaveOccurred()) + + req, err := structure.StructToMap(types.CreatePreheatJobRequest{ + Type: internaljob.PreheatJob, + Args: types.PreheatArgs{ + Type: "file", + URL: testFile.GetDownloadURL(), + Scope: "single_seed_peer", + LoadToCache: true, + }, + }) + Expect(err).NotTo(HaveOccurred()) + + out, err := managerPod.CurlCommand("POST", map[string]string{"Content-Type": "application/json"}, req, + "http://dragonfly-manager.dragonfly-system.svc:8080/api/v1/jobs").CombinedOutput() + fmt.Println(err) + Expect(err).NotTo(HaveOccurred()) + fmt.Println(string(out)) + + job := &models.Job{} + err = json.Unmarshal(out, job) + fmt.Println(err) + Expect(err).NotTo(HaveOccurred()) + + done := waitForDone(job, managerPod) + Expect(done).Should(BeTrue()) + + seedClientPod, err := util.SeedClientExec(0) + fmt.Println(err) + Expect(err).NotTo(HaveOccurred()) + + out, err = seedClientPod.Command("curl", "-s", "http://0.0.0.0:4002/metrics").CombinedOutput() + fmt.Println(err) + Expect(err).NotTo(HaveOccurred()) + metricsOutput := string(out) + + downloadTrafficRegex := regexp.MustCompile(`dragonfly_client_download_traffic{[^}]*storage_type="memory"[^}]*} ([0-9]+)`) + downloadMatches := downloadTrafficRegex.FindStringSubmatch(metricsOutput) + Expect(downloadMatches).NotTo(BeNil(), "Download traffic metric not found") + downloadTraffic, _ := strconv.ParseInt(downloadMatches[1], 10, 64) + fmt.Printf("Download traffic: %d bytes\n", downloadTraffic) + Expect(downloadTraffic).To(Equal(int64(util.FileSize100MiB)), "Download traffic should exactly match file size") + + sha256sum, err := util.CalculateSha256ByTaskID([]*util.PodExec{seedClientPod}, testFile.GetTaskID()) + Expect(err).NotTo(HaveOccurred()) + Expect(testFile.GetSha256()).To(Equal(sha256sum)) + + req, err = structure.StructToMap(types.CreatePreheatJobRequest{ + Type: internaljob.PreheatJob, + Args: types.PreheatArgs{ + Type: "file", + URL: testFile.GetDownloadURL(), + Scope: "all_seed_peers", + }, + }) + Expect(err).NotTo(HaveOccurred()) + + out, err = managerPod.CurlCommand("POST", map[string]string{"Content-Type": "application/json"}, req, + "http://dragonfly-manager.dragonfly-system.svc:8080/api/v1/jobs").CombinedOutput() + fmt.Println(err) + Expect(err).NotTo(HaveOccurred()) + fmt.Println(string(out)) + + job = &models.Job{} + err = json.Unmarshal(out, job) + fmt.Println(err) + Expect(err).NotTo(HaveOccurred()) + + done = waitForDone(job, managerPod) + Expect(done).Should(BeTrue()) + + seedClientPods := make([]*util.PodExec, 2) + for i := 0; i < 2; i++ { + seedClientPods[i], err = util.SeedClientExec(i + 1) + fmt.Println(err) + Expect(err).NotTo(HaveOccurred()) + } + + sha256sum, err = util.CalculateSha256ByTaskID(seedClientPods, testFile.GetTaskID()) + Expect(err).NotTo(HaveOccurred()) + Expect(testFile.GetSha256()).To(Equal(sha256sum)) + + out, err = seedClientPod.Command("curl", "-s", "http://0.0.0.0:4002/metrics").CombinedOutput() + fmt.Println(err) + Expect(err).NotTo(HaveOccurred()) + metricsOutput = string(out) + + uploadTrafficRegex := regexp.MustCompile(`dragonfly_client_upload_traffic{[^}]*storage_type="memory"[^}]*} ([0-9]+)`) + uploadMatches := uploadTrafficRegex.FindStringSubmatch(metricsOutput) + Expect(uploadMatches).NotTo(BeNil(), "Upload traffic metric not found") + uploadTraffic, _ := strconv.ParseInt(uploadMatches[1], 10, 64) + fmt.Printf("Upload traffic: %d bytes\n", uploadTraffic) + Expect(uploadTraffic).To(Equal(int64(util.FileSize100MiB*2)), "Upload traffic should match file size times number of clients") + }) + }) + Context("ghcr.io/dragonflyoss/busybox:v1.35.0 image", func() { It("preheat image should be ok", Label("preheat", "image"), func() { managerPod, err := util.ManagerExec(0) From a2329a14e74b535b2d0cd249fbf86b9eeef57ebd Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Fri, 11 Apr 2025 13:03:53 +0800 Subject: [PATCH 05/17] update regexp match. Signed-off-by: southwest miao <1403572259@qq.com> --- test/e2e/v2/manager/preheat.go | 38 +++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/test/e2e/v2/manager/preheat.go b/test/e2e/v2/manager/preheat.go index e34afb536b6..9e8a3c02543 100644 --- a/test/e2e/v2/manager/preheat.go +++ b/test/e2e/v2/manager/preheat.go @@ -21,6 +21,7 @@ import ( "fmt" "regexp" "strconv" + "strings" . "github.com/onsi/ginkgo/v2" //nolint . "github.com/onsi/gomega" //nolint @@ -263,12 +264,21 @@ var _ = Describe("Preheat with Manager", func() { Expect(err).NotTo(HaveOccurred()) metricsOutput := string(out) - downloadTrafficRegex := regexp.MustCompile(`dragonfly_client_download_traffic{[^}]*storage_type="memory"[^}]*} ([0-9]+)`) - downloadMatches := downloadTrafficRegex.FindStringSubmatch(metricsOutput) - Expect(downloadMatches).NotTo(BeNil(), "Download traffic metric not found") + metricsLines := strings.Split(metricsOutput, "\n") + var downloadLine string + for _, line := range metricsLines { + if strings.HasPrefix(line, "dragonfly_client_download_traffic") { + downloadLine = line + break + } + } + Expect(downloadLine).NotTo(BeEmpty()) + + memoryStorageRegex := regexp.MustCompile(`storage_type="memory"[^}]*} ([0-9]+)`) + downloadMatches := memoryStorageRegex.FindStringSubmatch(downloadLine) + Expect(downloadMatches).NotTo(BeNil()) downloadTraffic, _ := strconv.ParseInt(downloadMatches[1], 10, 64) - fmt.Printf("Download traffic: %d bytes\n", downloadTraffic) - Expect(downloadTraffic).To(Equal(int64(util.FileSize100MiB)), "Download traffic should exactly match file size") + Expect(downloadTraffic).To(Equal(int64(util.FileSize100MiB))) sha256sum, err := util.CalculateSha256ByTaskID([]*util.PodExec{seedClientPod}, testFile.GetTaskID()) Expect(err).NotTo(HaveOccurred()) @@ -314,12 +324,20 @@ var _ = Describe("Preheat with Manager", func() { Expect(err).NotTo(HaveOccurred()) metricsOutput = string(out) - uploadTrafficRegex := regexp.MustCompile(`dragonfly_client_upload_traffic{[^}]*storage_type="memory"[^}]*} ([0-9]+)`) - uploadMatches := uploadTrafficRegex.FindStringSubmatch(metricsOutput) - Expect(uploadMatches).NotTo(BeNil(), "Upload traffic metric not found") + metricsLines = strings.Split(metricsOutput, "\n") + var uploadLine string + for _, line := range metricsLines { + if strings.HasPrefix(line, "dragonfly_client_upload_traffic") { + uploadLine = line + break + } + } + Expect(uploadLine).NotTo(BeEmpty()) + + uploadMatches := memoryStorageRegex.FindStringSubmatch(uploadLine) + Expect(uploadMatches).NotTo(BeNil()) uploadTraffic, _ := strconv.ParseInt(uploadMatches[1], 10, 64) - fmt.Printf("Upload traffic: %d bytes\n", uploadTraffic) - Expect(uploadTraffic).To(Equal(int64(util.FileSize100MiB*2)), "Upload traffic should match file size times number of clients") + Expect(uploadTraffic).To(Equal(int64(util.FileSize100MiB * 2))) }) }) From e1f4842857b001027e70f561dfc7840919fb1f66 Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Sat, 12 Apr 2025 10:47:29 +0800 Subject: [PATCH 06/17] fix: use log to match. Signed-off-by: southwest miao <1403572259@qq.com> --- test/e2e/v2/manager/preheat.go | 58 +++++++++++----------------------- 1 file changed, 19 insertions(+), 39 deletions(-) diff --git a/test/e2e/v2/manager/preheat.go b/test/e2e/v2/manager/preheat.go index 9e8a3c02543..8462674e438 100644 --- a/test/e2e/v2/manager/preheat.go +++ b/test/e2e/v2/manager/preheat.go @@ -20,7 +20,6 @@ import ( "encoding/json" "fmt" "regexp" - "strconv" "strings" . "github.com/onsi/ginkgo/v2" //nolint @@ -208,14 +207,14 @@ var _ = Describe("Preheat with Manager", func() { }) }) - Context("100MiB file in cache", func() { + Context("10MiB file in cache", func() { var ( testFile *util.File err error ) BeforeEach(func() { - testFile, err = util.GetFileServer().GenerateFile(util.FileSize100MiB) + testFile, err = util.GetFileServer().GenerateFile(util.FileSize10MiB) Expect(err).NotTo(HaveOccurred()) Expect(testFile).NotTo(BeNil()) }) @@ -259,27 +258,6 @@ var _ = Describe("Preheat with Manager", func() { fmt.Println(err) Expect(err).NotTo(HaveOccurred()) - out, err = seedClientPod.Command("curl", "-s", "http://0.0.0.0:4002/metrics").CombinedOutput() - fmt.Println(err) - Expect(err).NotTo(HaveOccurred()) - metricsOutput := string(out) - - metricsLines := strings.Split(metricsOutput, "\n") - var downloadLine string - for _, line := range metricsLines { - if strings.HasPrefix(line, "dragonfly_client_download_traffic") { - downloadLine = line - break - } - } - Expect(downloadLine).NotTo(BeEmpty()) - - memoryStorageRegex := regexp.MustCompile(`storage_type="memory"[^}]*} ([0-9]+)`) - downloadMatches := memoryStorageRegex.FindStringSubmatch(downloadLine) - Expect(downloadMatches).NotTo(BeNil()) - downloadTraffic, _ := strconv.ParseInt(downloadMatches[1], 10, 64) - Expect(downloadTraffic).To(Equal(int64(util.FileSize100MiB))) - sha256sum, err := util.CalculateSha256ByTaskID([]*util.PodExec{seedClientPod}, testFile.GetTaskID()) Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) @@ -319,25 +297,27 @@ var _ = Describe("Preheat with Manager", func() { Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) - out, err = seedClientPod.Command("curl", "-s", "http://0.0.0.0:4002/metrics").CombinedOutput() + out, err = seedClientPod.Command("cat", "/var/log/dragonfly/dfdaemon/dfdaemon.log").CombinedOutput() fmt.Println(err) Expect(err).NotTo(HaveOccurred()) - metricsOutput = string(out) + logs := string(out) - metricsLines = strings.Split(metricsOutput, "\n") - var uploadLine string - for _, line := range metricsLines { - if strings.HasPrefix(line, "dragonfly_client_upload_traffic") { - uploadLine = line - break - } - } - Expect(uploadLine).NotTo(BeEmpty()) + Expect(logs).To(ContainSubstring(fmt.Sprintf("put task to cache: %s", testFile.GetTaskID()))) - uploadMatches := memoryStorageRegex.FindStringSubmatch(uploadLine) - Expect(uploadMatches).NotTo(BeNil()) - uploadTraffic, _ := strconv.ParseInt(uploadMatches[1], 10, 64) - Expect(uploadTraffic).To(Equal(int64(util.FileSize100MiB * 2))) + pieceRegex := regexp.MustCompile(`pieces: \[([0-9, ]+)\]`) + pieceMatches := pieceRegex.FindStringSubmatch(logs) + Expect(pieceMatches).NotTo(BeNil()) + pieceNumbers := strings.Split(strings.ReplaceAll(pieceMatches[1], " ", ""), ",") + + for _, number := range pieceNumbers { + pieceID := fmt.Sprintf("%s-%s", testFile.GetTaskID(), number) + putPieceCacheLog := fmt.Sprintf("put piece to cache: %s", pieceID) + Expect(logs).To(ContainSubstring(putPieceCacheLog)) + + getPieceCacheLog := fmt.Sprintf("get piece from cache: %s", pieceID) + cacheHits := strings.Count(logs, getPieceCacheLog) + Expect(cacheHits).To(Equal(2)) + } }) }) From fe78dd1fa76522d905e85cdbd5176737badd1240 Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Sat, 12 Apr 2025 11:31:56 +0800 Subject: [PATCH 07/17] fix: fix comment by copilot advice. Signed-off-by: southwest miao <1403572259@qq.com> --- manager/types/job.go | 2 +- test/e2e/v2/manager/preheat.go | 42 ++++++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/manager/types/job.go b/manager/types/job.go index 102fa8a970b..11d29afc8c3 100644 --- a/manager/types/job.go +++ b/manager/types/job.go @@ -144,7 +144,7 @@ type PreheatArgs struct { // Timeout is the timeout for preheating, default is 30 minutes. Timeout time.Duration `json:"timeout" binding:"omitempty"` - // LoadToCache is the flag for preheating content in cache storage, defailt is false. + // LoadToCache is the flag for preheating content in cache storage, default is false. LoadToCache bool `json:"load_to_cache" binding:"omitempty"` } diff --git a/test/e2e/v2/manager/preheat.go b/test/e2e/v2/manager/preheat.go index 8462674e438..a8f01383eeb 100644 --- a/test/e2e/v2/manager/preheat.go +++ b/test/e2e/v2/manager/preheat.go @@ -254,11 +254,36 @@ var _ = Describe("Preheat with Manager", func() { done := waitForDone(job, managerPod) Expect(done).Should(BeTrue()) - seedClientPod, err := util.SeedClientExec(0) - fmt.Println(err) - Expect(err).NotTo(HaveOccurred()) + var preheatedSeedClient *util.PodExec + var preheatedSeedClientIndex int + var otherSeedClientIndices []int + + for i := 0; i < 3; i++ { + seedClient, err := util.SeedClientExec(i) + fmt.Println(err) + Expect(err).NotTo(HaveOccurred()) + + taskIDCmd := fmt.Sprintf("grep -a '%s' /var/log/dragonfly/dfdaemon/dfdaemon.log", testFile.GetTaskID()) + successCmd := fmt.Sprintf("%s | grep -a 'download task succeeded'", taskIDCmd) + + out, err = seedClient.Command("bash", "-c", successCmd).CombinedOutput() + if err == nil && len(out) > 0 { + preheatedSeedClient = seedClient + preheatedSeedClientIndex = i + fmt.Printf("Found preheated seed client: %d\n", i) + break + } + } + + Expect(preheatedSeedClient).NotTo(BeNil()) + + for i := 0; i < 3; i++ { + if i != preheatedSeedClientIndex { + otherSeedClientIndices = append(otherSeedClientIndices, i) + } + } - sha256sum, err := util.CalculateSha256ByTaskID([]*util.PodExec{seedClientPod}, testFile.GetTaskID()) + sha256sum, err := util.CalculateSha256ByTaskID([]*util.PodExec{preheatedSeedClient}, testFile.GetTaskID()) Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) @@ -287,8 +312,8 @@ var _ = Describe("Preheat with Manager", func() { Expect(done).Should(BeTrue()) seedClientPods := make([]*util.PodExec, 2) - for i := 0; i < 2; i++ { - seedClientPods[i], err = util.SeedClientExec(i + 1) + for i, idx := range otherSeedClientIndices { + seedClientPods[i], err = util.SeedClientExec(idx) fmt.Println(err) Expect(err).NotTo(HaveOccurred()) } @@ -297,7 +322,7 @@ var _ = Describe("Preheat with Manager", func() { Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) - out, err = seedClientPod.Command("cat", "/var/log/dragonfly/dfdaemon/dfdaemon.log").CombinedOutput() + out, err = preheatedSeedClient.Command("cat", "/var/log/dragonfly/dfdaemon/dfdaemon.log").CombinedOutput() fmt.Println(err) Expect(err).NotTo(HaveOccurred()) logs := string(out) @@ -315,8 +340,7 @@ var _ = Describe("Preheat with Manager", func() { Expect(logs).To(ContainSubstring(putPieceCacheLog)) getPieceCacheLog := fmt.Sprintf("get piece from cache: %s", pieceID) - cacheHits := strings.Count(logs, getPieceCacheLog) - Expect(cacheHits).To(Equal(2)) + Expect(logs).To(ContainSubstring(getPieceCacheLog)) } }) }) From 59e576afac8ca4f2d09ed901d00871eff70d170a Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Sat, 12 Apr 2025 14:48:08 +0800 Subject: [PATCH 08/17] fix: use dfget to download. Signed-off-by: southwest miao <1403572259@qq.com> --- test/e2e/v2/manager/preheat.go | 42 ++++++---------------------------- 1 file changed, 7 insertions(+), 35 deletions(-) diff --git a/test/e2e/v2/manager/preheat.go b/test/e2e/v2/manager/preheat.go index a8f01383eeb..016feefc1a4 100644 --- a/test/e2e/v2/manager/preheat.go +++ b/test/e2e/v2/manager/preheat.go @@ -255,8 +255,6 @@ var _ = Describe("Preheat with Manager", func() { Expect(done).Should(BeTrue()) var preheatedSeedClient *util.PodExec - var preheatedSeedClientIndex int - var otherSeedClientIndices []int for i := 0; i < 3; i++ { seedClient, err := util.SeedClientExec(i) @@ -269,7 +267,6 @@ var _ = Describe("Preheat with Manager", func() { out, err = seedClient.Command("bash", "-c", successCmd).CombinedOutput() if err == nil && len(out) > 0 { preheatedSeedClient = seedClient - preheatedSeedClientIndex = i fmt.Printf("Found preheated seed client: %d\n", i) break } @@ -277,48 +274,23 @@ var _ = Describe("Preheat with Manager", func() { Expect(preheatedSeedClient).NotTo(BeNil()) - for i := 0; i < 3; i++ { - if i != preheatedSeedClientIndex { - otherSeedClientIndices = append(otherSeedClientIndices, i) - } - } - sha256sum, err := util.CalculateSha256ByTaskID([]*util.PodExec{preheatedSeedClient}, testFile.GetTaskID()) Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) - req, err = structure.StructToMap(types.CreatePreheatJobRequest{ - Type: internaljob.PreheatJob, - Args: types.PreheatArgs{ - Type: "file", - URL: testFile.GetDownloadURL(), - Scope: "all_seed_peers", - }, - }) - Expect(err).NotTo(HaveOccurred()) - - out, err = managerPod.CurlCommand("POST", map[string]string{"Content-Type": "application/json"}, req, - "http://dragonfly-manager.dragonfly-system.svc:8080/api/v1/jobs").CombinedOutput() + clientPod, err := util.ClientExec() fmt.Println(err) Expect(err).NotTo(HaveOccurred()) - fmt.Println(string(out)) - job = &models.Job{} - err = json.Unmarshal(out, job) - fmt.Println(err) + out, err = clientPod.Command("sh", "-c", fmt.Sprintf("dfget %s --disable-back-to-source --output %s", testFile.GetDownloadURL(), testFile.GetOutputPath())).CombinedOutput() + fmt.Println(string(out), err) Expect(err).NotTo(HaveOccurred()) - done = waitForDone(job, managerPod) - Expect(done).Should(BeTrue()) - - seedClientPods := make([]*util.PodExec, 2) - for i, idx := range otherSeedClientIndices { - seedClientPods[i], err = util.SeedClientExec(idx) - fmt.Println(err) - Expect(err).NotTo(HaveOccurred()) - } + sha256sum, err = util.CalculateSha256ByTaskID([]*util.PodExec{clientPod}, testFile.GetTaskID()) + Expect(err).NotTo(HaveOccurred()) + Expect(testFile.GetSha256()).To(Equal(sha256sum)) - sha256sum, err = util.CalculateSha256ByTaskID(seedClientPods, testFile.GetTaskID()) + sha256sum, err = util.CalculateSha256ByOutput([]*util.PodExec{clientPod}, testFile.GetOutputPath()) Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) From d92a1c1bd0f777bfe3446beb5c69cef5c3b14958 Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Sun, 13 Apr 2025 12:13:43 +0800 Subject: [PATCH 09/17] update Signed-off-by: southwest miao <1403572259@qq.com> --- client-rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-rs b/client-rs index 250f083980e..4f6417c2216 160000 --- a/client-rs +++ b/client-rs @@ -1 +1 @@ -Subproject commit 250f083980e8aba6d25a49bfae4de3206932315a +Subproject commit 4f6417c2216d80fdbd3990e5fd6b99cd65145086 From 8e43da512bdeb53ac5227f9f829b7b59f74ee8ab Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Sun, 13 Apr 2025 16:10:52 +0800 Subject: [PATCH 10/17] updata Signed-off-by: southwest miao <1403572259@qq.com> --- client-rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-rs b/client-rs index 4f6417c2216..3abe3654ef7 160000 --- a/client-rs +++ b/client-rs @@ -1 +1 @@ -Subproject commit 4f6417c2216d80fdbd3990e5fd6b99cd65145086 +Subproject commit 3abe3654ef7aff9ccb6dbc95cb5e03b3e78de1ac From e4cc1bde2500f7c8e80aa264146b3a34c50a5424 Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Mon, 14 Apr 2025 14:12:59 +0800 Subject: [PATCH 11/17] update Signed-off-by: southwest miao <1403572259@qq.com> --- test/e2e/v2/manager/preheat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/v2/manager/preheat.go b/test/e2e/v2/manager/preheat.go index 016feefc1a4..1f99311f277 100644 --- a/test/e2e/v2/manager/preheat.go +++ b/test/e2e/v2/manager/preheat.go @@ -294,7 +294,7 @@ var _ = Describe("Preheat with Manager", func() { Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) - out, err = preheatedSeedClient.Command("cat", "/var/log/dragonfly/dfdaemon/dfdaemon.log").CombinedOutput() + out, err = preheatedSeedClient.Command("grep", "-E", "\"(put task to cache|put piece to cache|get piece from cache)\"", "/var/log/dragonfly/dfdaemon/dfdaemon.log").CombinedOutput() fmt.Println(err) Expect(err).NotTo(HaveOccurred()) logs := string(out) From b442c01c798cf5903d4415a24ddb531cf12a59ea Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Mon, 14 Apr 2025 14:17:33 +0800 Subject: [PATCH 12/17] fix: string match in log. Signed-off-by: southwest miao <1403572259@qq.com> --- test/e2e/v2/manager/preheat.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/e2e/v2/manager/preheat.go b/test/e2e/v2/manager/preheat.go index 1f99311f277..ab8cc3c17dc 100644 --- a/test/e2e/v2/manager/preheat.go +++ b/test/e2e/v2/manager/preheat.go @@ -261,7 +261,7 @@ var _ = Describe("Preheat with Manager", func() { fmt.Println(err) Expect(err).NotTo(HaveOccurred()) - taskIDCmd := fmt.Sprintf("grep -a '%s' /var/log/dragonfly/dfdaemon/dfdaemon.log", testFile.GetTaskID()) + taskIDCmd := fmt.Sprintf("grep -a '%s' /var/log/dragonfly/dfdaemon/*", testFile.GetTaskID()) successCmd := fmt.Sprintf("%s | grep -a 'download task succeeded'", taskIDCmd) out, err = seedClient.Command("bash", "-c", successCmd).CombinedOutput() @@ -294,7 +294,7 @@ var _ = Describe("Preheat with Manager", func() { Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) - out, err = preheatedSeedClient.Command("grep", "-E", "\"(put task to cache|put piece to cache|get piece from cache)\"", "/var/log/dragonfly/dfdaemon/dfdaemon.log").CombinedOutput() + out, err = preheatedSeedClient.Command("grep", "-E", "\"(put task to cache|put piece to cache|get piece from cache)\"", "/var/log/dragonfly/dfdaemon/*").CombinedOutput() fmt.Println(err) Expect(err).NotTo(HaveOccurred()) logs := string(out) From c3028b47b9a233f155b5f266e6222b4f96b24c07 Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Mon, 14 Apr 2025 21:19:58 +0800 Subject: [PATCH 13/17] test: skip in compatibility-e2e-v2 Signed-off-by: southwest miao <1403572259@qq.com> --- .github/workflows/compatibility-e2e-v2.yml | 6 +++--- test/e2e/v2/manager/preheat.go | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/compatibility-e2e-v2.yml b/.github/workflows/compatibility-e2e-v2.yml index 4f2c42baa88..d33dbe9154a 100644 --- a/.github/workflows/compatibility-e2e-v2.yml +++ b/.github/workflows/compatibility-e2e-v2.yml @@ -33,12 +33,12 @@ jobs: image: manager image-tag: v2.2.1 chart-name: manager - skip: "Rate Limit" + skip: "Rate Limit | preheat.*cache" - module: scheduler image: scheduler image-tag: v2.2.1 chart-name: scheduler - skip: "Rate Limit" + skip: "Rate Limit | preheat.*cache" - module: client image: client image-tag: v0.2.18 @@ -146,7 +146,7 @@ jobs: - name: Run E2E test run: | - ginkgo -v -r --race --fail-fast --cover --trace --show-node-events --skip=${{ matrix.skip }} test/e2e/v2 + ginkgo -v -r --race --fail-fast --cover --trace --show-node-events --skip="${{ matrix.skip }}" test/e2e/v2 cat coverprofile.out >> coverage.txt - name: Move cache diff --git a/test/e2e/v2/manager/preheat.go b/test/e2e/v2/manager/preheat.go index ab8cc3c17dc..f7fcef17329 100644 --- a/test/e2e/v2/manager/preheat.go +++ b/test/e2e/v2/manager/preheat.go @@ -256,14 +256,14 @@ var _ = Describe("Preheat with Manager", func() { var preheatedSeedClient *util.PodExec + taskIDCmd := fmt.Sprintf("grep -a '%s' /var/log/dragonfly/dfdaemon/*", testFile.GetTaskID()) + successCmd := fmt.Sprintf("%s | grep -a 'download task succeeded'", taskIDCmd) + for i := 0; i < 3; i++ { seedClient, err := util.SeedClientExec(i) fmt.Println(err) Expect(err).NotTo(HaveOccurred()) - taskIDCmd := fmt.Sprintf("grep -a '%s' /var/log/dragonfly/dfdaemon/*", testFile.GetTaskID()) - successCmd := fmt.Sprintf("%s | grep -a 'download task succeeded'", taskIDCmd) - out, err = seedClient.Command("bash", "-c", successCmd).CombinedOutput() if err == nil && len(out) > 0 { preheatedSeedClient = seedClient @@ -294,7 +294,7 @@ var _ = Describe("Preheat with Manager", func() { Expect(err).NotTo(HaveOccurred()) Expect(testFile.GetSha256()).To(Equal(sha256sum)) - out, err = preheatedSeedClient.Command("grep", "-E", "\"(put task to cache|put piece to cache|get piece from cache)\"", "/var/log/dragonfly/dfdaemon/*").CombinedOutput() + out, err = preheatedSeedClient.Command("bash", "-c", taskIDCmd).CombinedOutput() fmt.Println(err) Expect(err).NotTo(HaveOccurred()) logs := string(out) From 81bc8f2fe62ceb8f14e437d04324722bd063687f Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Mon, 14 Apr 2025 21:50:13 +0800 Subject: [PATCH 14/17] fix: made skip description clear. Signed-off-by: southwest miao <1403572259@qq.com> --- .github/workflows/compatibility-e2e-v2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compatibility-e2e-v2.yml b/.github/workflows/compatibility-e2e-v2.yml index d33dbe9154a..aa4d976110b 100644 --- a/.github/workflows/compatibility-e2e-v2.yml +++ b/.github/workflows/compatibility-e2e-v2.yml @@ -33,12 +33,12 @@ jobs: image: manager image-tag: v2.2.1 chart-name: manager - skip: "Rate Limit | preheat.*cache" + skip: "Rate Limit | preheat files in cache" - module: scheduler image: scheduler image-tag: v2.2.1 chart-name: scheduler - skip: "Rate Limit | preheat.*cache" + skip: "Rate Limit | preheat files in cache" - module: client image: client image-tag: v0.2.18 From 218785d0422a8975cc1a967bf8876774950e6315 Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Mon, 14 Apr 2025 21:53:17 +0800 Subject: [PATCH 15/17] update Signed-off-by: southwest miao <1403572259@qq.com> --- test/e2e/v2/manager/preheat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/v2/manager/preheat.go b/test/e2e/v2/manager/preheat.go index f7fcef17329..65e97bddccb 100644 --- a/test/e2e/v2/manager/preheat.go +++ b/test/e2e/v2/manager/preheat.go @@ -224,7 +224,7 @@ var _ = Describe("Preheat with Manager", func() { Expect(err).NotTo(HaveOccurred()) }) - It("preheat files in cache should be ok", Label("preheat", "file", "cache"), func() { + It("Preheat files in cache should be ok", Label("preheat", "file", "cache"), func() { managerPod, err := util.ManagerExec(0) fmt.Println(err) Expect(err).NotTo(HaveOccurred()) From a7e7ef95392c8a022df3c43a5fa089e95e52edf0 Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Mon, 14 Apr 2025 21:53:59 +0800 Subject: [PATCH 16/17] fix: use capital Signed-off-by: southwest miao <1403572259@qq.com> --- .github/workflows/compatibility-e2e-v2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compatibility-e2e-v2.yml b/.github/workflows/compatibility-e2e-v2.yml index aa4d976110b..1ed6c00029c 100644 --- a/.github/workflows/compatibility-e2e-v2.yml +++ b/.github/workflows/compatibility-e2e-v2.yml @@ -33,12 +33,12 @@ jobs: image: manager image-tag: v2.2.1 chart-name: manager - skip: "Rate Limit | preheat files in cache" + skip: "Rate Limit | Preheat files in cache" - module: scheduler image: scheduler image-tag: v2.2.1 chart-name: scheduler - skip: "Rate Limit | preheat files in cache" + skip: "Rate Limit | Preheat files in cache" - module: client image: client image-tag: v0.2.18 From ac07e0e381b439f7b1f3dd10d6375945899e9a5e Mon Sep 17 00:00:00 2001 From: southwest miao <1403572259@qq.com> Date: Mon, 14 Apr 2025 21:57:37 +0800 Subject: [PATCH 17/17] lowercase Signed-off-by: southwest miao <1403572259@qq.com> --- .github/workflows/compatibility-e2e-v2.yml | 4 ++-- test/e2e/v2/manager/preheat.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compatibility-e2e-v2.yml b/.github/workflows/compatibility-e2e-v2.yml index 1ed6c00029c..aa4d976110b 100644 --- a/.github/workflows/compatibility-e2e-v2.yml +++ b/.github/workflows/compatibility-e2e-v2.yml @@ -33,12 +33,12 @@ jobs: image: manager image-tag: v2.2.1 chart-name: manager - skip: "Rate Limit | Preheat files in cache" + skip: "Rate Limit | preheat files in cache" - module: scheduler image: scheduler image-tag: v2.2.1 chart-name: scheduler - skip: "Rate Limit | Preheat files in cache" + skip: "Rate Limit | preheat files in cache" - module: client image: client image-tag: v0.2.18 diff --git a/test/e2e/v2/manager/preheat.go b/test/e2e/v2/manager/preheat.go index 65e97bddccb..f7fcef17329 100644 --- a/test/e2e/v2/manager/preheat.go +++ b/test/e2e/v2/manager/preheat.go @@ -224,7 +224,7 @@ var _ = Describe("Preheat with Manager", func() { Expect(err).NotTo(HaveOccurred()) }) - It("Preheat files in cache should be ok", Label("preheat", "file", "cache"), func() { + It("preheat files in cache should be ok", Label("preheat", "file", "cache"), func() { managerPod, err := util.ManagerExec(0) fmt.Println(err) Expect(err).NotTo(HaveOccurred())