diff --git a/.github/workflows/compatibility-e2e-v2.yml b/.github/workflows/compatibility-e2e-v2.yml index 5ecd5e80da6..1ce6980c464 100644 --- a/.github/workflows/compatibility-e2e-v2.yml +++ b/.github/workflows/compatibility-e2e-v2.yml @@ -39,11 +39,11 @@ jobs: chart-name: scheduler - module: client image: client - image-tag: v0.1.113 + image-tag: v0.1.115 chart-name: client - module: seed-client image: client - image-tag: v0.1.113 + image-tag: v0.1.115 chart-name: seed-client steps: diff --git a/client-rs b/client-rs index 1a85ccc7a66..7ecdb71642e 160000 --- a/client-rs +++ b/client-rs @@ -1 +1 @@ -Subproject commit 1a85ccc7a665be82a677c67185a28a1def99c834 +Subproject commit 7ecdb71642eeac15e5dfb0ed3ae13385b5f767f9 diff --git a/internal/job/types.go b/internal/job/types.go index a0382a964ad..d54f9a20eb5 100644 --- a/internal/job/types.go +++ b/internal/job/types.go @@ -24,7 +24,6 @@ import ( type PreheatRequest struct { URL string `json:"url" validate:"required,url"` Tag string `json:"tag" validate:"omitempty"` - Digest string `json:"digest" validate:"omitempty"` FilteredQueryParams string `json:"filtered_query_params" validate:"omitempty"` Headers map[string]string `json:"headers" validate:"omitempty"` Application string `json:"application" validate:"omitempty"` diff --git a/manager/handlers/job.go b/manager/handlers/job.go index 9ba338b9e40..f7f17ae582a 100644 --- a/manager/handlers/job.go +++ b/manager/handlers/job.go @@ -70,6 +70,11 @@ func (h *Handlers) CreateJob(ctx *gin.Context) { return } + if json.Args.TaskID == "" && json.Args.URL == "" { + ctx.JSON(http.StatusUnprocessableEntity, gin.H{"errors": "invalid params: task_id or url is required"}) + return + } + job, err := h.service.CreateGetTaskJob(ctx.Request.Context(), json) if err != nil { ctx.Error(err) // nolint: errcheck @@ -84,6 +89,11 @@ func (h *Handlers) CreateJob(ctx *gin.Context) { return } + if json.Args.TaskID == "" && json.Args.URL == "" { + ctx.JSON(http.StatusUnprocessableEntity, gin.H{"errors": "invalid params: task_id or url is required"}) + return + } + job, err := h.service.CreateDeleteTaskJob(ctx.Request.Context(), json) if err != nil { ctx.Error(err) // nolint: errcheck diff --git a/manager/handlers/job_test.go b/manager/handlers/job_test.go index 37d288b0dad..5bcde5f72e6 100644 --- a/manager/handlers/job_test.go +++ b/manager/handlers/job_test.go @@ -43,13 +43,19 @@ var ( { "type": "get_task", "user_id": 4, - "bio": "bio" + "bio": "bio", + "args": { + "task_id": "7575d21d69495905a4709bf4e10d0e5cffcf7fd1e76e93171e0ef6e0abcf07a8" + } }` mockDeleteTaskJobReqBody = ` { "type": "delete_task", "user_id": 4, - "bio": "bio" + "bio": "bio", + "args": { + "task_id": "04a29122b0c4d0affde2d577fb36bb956caa3da10e9130375623c24a5f865a49" + } }` mockOtherJobReqBody = ` { @@ -66,11 +72,15 @@ var ( UserID: 4, Type: "get_task", BIO: "bio", + Args: types.GetTaskArgs{TaskID: "7575d21d69495905a4709bf4e10d0e5cffcf7fd1e76e93171e0ef6e0abcf07a8"}, } mockCreateDeleteTaskJobRequest = types.CreateDeleteTaskJobRequest{ UserID: 4, Type: "delete_task", BIO: "bio", + Args: types.DeleteTaskArgs{ + TaskID: "04a29122b0c4d0affde2d577fb36bb956caa3da10e9130375623c24a5f865a49", + }, } mockUpdateJobRequest = types.UpdateJobRequest{ UserID: 4, diff --git a/manager/job/task.go b/manager/job/task.go index 9ac70036163..de078f50511 100644 --- a/manager/job/task.go +++ b/manager/job/task.go @@ -32,6 +32,7 @@ import ( "d7y.io/dragonfly/v2/manager/config" "d7y.io/dragonfly/v2/manager/models" "d7y.io/dragonfly/v2/manager/types" + "d7y.io/dragonfly/v2/pkg/idgen" ) // Task is an interface for manager tasks. @@ -60,7 +61,14 @@ func (t *task) CreateGetTask(ctx context.Context, schedulers []models.Scheduler, span.SetAttributes(config.AttributeGetTaskID.String(json.TaskID)) defer span.End() - args, err := internaljob.MarshalRequest(json) + taskID := json.TaskID + if json.URL != "" { + taskID = idgen.TaskIDV2(json.URL, json.Tag, json.Application, idgen.ParseFilteredQueryParams(json.FilteredQueryParams)) + } + + args, err := internaljob.MarshalRequest(internaljob.GetTaskRequest{ + TaskID: taskID, + }) if err != nil { logger.Errorf("get tasks marshal request: %v, error: %v", args, err) return nil, err @@ -111,7 +119,15 @@ func (t *task) CreateDeleteTask(ctx context.Context, schedulers []models.Schedul span.SetAttributes(config.AttributeDeleteTaskID.String(json.TaskID)) defer span.End() - args, err := internaljob.MarshalRequest(json) + taskID := json.TaskID + if json.URL != "" { + taskID = idgen.TaskIDV2(json.URL, json.Tag, json.Application, idgen.ParseFilteredQueryParams(json.FilteredQueryParams)) + } + + args, err := internaljob.MarshalRequest(internaljob.DeleteTaskRequest{ + TaskID: taskID, + Timeout: json.Timeout, + }) if err != nil { logger.Errorf("delete task marshal request: %v, error: %v", args, err) return nil, err diff --git a/manager/types/job.go b/manager/types/job.go index 6b7bb53b12c..3036e5981f9 100644 --- a/manager/types/job.go +++ b/manager/types/job.go @@ -112,7 +112,20 @@ type CreateGetTaskJobRequest struct { } type GetTaskArgs struct { - TaskID string `json:"task_id" binding:"required"` + // TaskID is the task id for getting. + TaskID string `json:"task_id" binding:"omitempty"` + + // URL is the download url of the task. + URL string `json:"url" binding:"omitempty"` + + // Tag is the tag of the task. + Tag string `json:"tag" binding:"omitempty"` + + // Application is the application of the task. + Application string `json:"application" binding:"omitempty"` + + // FilteredQueryParams is the filtered query params of the task. + FilteredQueryParams string `json:"filtered_query_params" binding:"omitempty"` } type CreateDeleteTaskJobRequest struct { @@ -125,7 +138,19 @@ type CreateDeleteTaskJobRequest struct { type DeleteTaskArgs struct { // TaskID is the task id for deleting. - TaskID string `json:"task_id" binding:"required"` + TaskID string `json:"task_id" binding:"omitempty"` + + // URL is the download url of the task. + URL string `json:"url" binding:"omitempty"` + + // Tag is the tag of the task. + Tag string `json:"tag" binding:"omitempty"` + + // Application is the application of the task. + Application string `json:"application" binding:"omitempty"` + + // FilteredQueryParams is the filtered query params of the task. + FilteredQueryParams string `json:"filtered_query_params" binding:"omitempty"` // Timeout is the timeout for deleting, default is 30 minutes. Timeout time.Duration `json:"timeout" binding:"omitempty"` diff --git a/pkg/idgen/task_id.go b/pkg/idgen/task_id.go index 993e6fe3969..44f82847296 100644 --- a/pkg/idgen/task_id.go +++ b/pkg/idgen/task_id.go @@ -50,7 +50,7 @@ func taskIDV1(url string, meta *commonv1.UrlMeta, ignoreRange bool) string { return pkgdigest.SHA256FromStrings(url) } - filteredQueryParams := parseFilteredQueryParams(meta.Filter) + filteredQueryParams := ParseFilteredQueryParams(meta.Filter) var ( u string @@ -81,8 +81,8 @@ func taskIDV1(url string, meta *commonv1.UrlMeta, ignoreRange bool) string { return pkgdigest.SHA256FromStrings(data...) } -// parseFilteredQueryParams parses filtered query params. -func parseFilteredQueryParams(rawFilteredQueryParams string) []string { +// ParseFilteredQueryParams parses filtered query params. +func ParseFilteredQueryParams(rawFilteredQueryParams string) []string { if pkgstrings.IsBlank(rawFilteredQueryParams) { return nil } @@ -91,11 +91,11 @@ func parseFilteredQueryParams(rawFilteredQueryParams string) []string { } // TaskIDV2 generates v2 version of task id. -func TaskIDV2(url, digest, tag, application string, filteredQueryParams []string) string { +func TaskIDV2(url, tag, application string, filteredQueryParams []string) string { url, err := neturl.FilterQueryParams(url, filteredQueryParams) if err != nil { url = "" } - return pkgdigest.SHA256FromStrings(url, digest, tag, application) + return pkgdigest.SHA256FromStrings(url, tag, application) } diff --git a/pkg/idgen/task_id_test.go b/pkg/idgen/task_id_test.go index 11cf4d003e5..6b7e95f9a26 100644 --- a/pkg/idgen/task_id_test.go +++ b/pkg/idgen/task_id_test.go @@ -110,7 +110,6 @@ func TestTaskIDV2(t *testing.T) { tests := []struct { name string url string - digest string tag string application string filters []string @@ -119,22 +118,12 @@ func TestTaskIDV2(t *testing.T) { { name: "generate taskID", url: "https://example.com", - digest: "sha256:c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", tag: "foo", application: "bar", filters: []string{}, expect: func(t *testing.T, d any) { assert := assert.New(t) - assert.Equal(d, "c8659b8372599cf22c7a2de260dd6e148fca6d4e1c2940703022867f739d071d") - }, - }, - { - name: "generate taskID with digest", - url: "https://example.com", - digest: "sha256:c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", - expect: func(t *testing.T, d any) { - assert := assert.New(t) - assert.Equal(d, "60469c583429af631a45540f05e08805b31ca4f84e7974cad35cfc84c197bcf8") + assert.Equal(d, "160fa7f001d9d2e893130894fbb60a5fb006e1d61bff82955f2946582bc9de1d") }, }, { @@ -168,7 +157,7 @@ func TestTaskIDV2(t *testing.T) { for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - tc.expect(t, TaskIDV2(tc.url, tc.digest, tc.tag, tc.application, tc.filters)) + tc.expect(t, TaskIDV2(tc.url, tc.tag, tc.application, tc.filters)) }) } } diff --git a/scheduler/job/job.go b/scheduler/job/job.go index 007c5c95391..a2392643d1f 100644 --- a/scheduler/job/job.go +++ b/scheduler/job/job.go @@ -170,7 +170,7 @@ func (j *job) preheat(ctx context.Context, data string) (string, error) { return "", err } - taskID := idgen.TaskIDV2(req.URL, req.Digest, req.Tag, req.Application, strings.Split(req.FilteredQueryParams, idgen.FilteredQueryParamsSeparator)) + taskID := idgen.TaskIDV2(req.URL, req.Tag, req.Application, strings.Split(req.FilteredQueryParams, idgen.FilteredQueryParamsSeparator)) log := logger.WithTask(taskID, req.URL) log.Infof("preheat %s request: %#v", req.URL, req) @@ -279,7 +279,6 @@ func (j *job) preheatAllPeers(ctx context.Context, taskID string, req *internalj taskID, &dfdaemonv2.DownloadTaskRequest{Download: &commonv2.Download{ Url: req.URL, - Digest: &req.Digest, Type: commonv2.TaskType_STANDARD, Tag: &req.Tag, Application: &req.Application, @@ -376,7 +375,6 @@ func (j *job) preheatAllPeers(ctx context.Context, taskID string, req *internalj // preheatV1 preheats job by v1 grpc protocol. func (j *job) preheatV1(ctx context.Context, taskID string, req *internaljob.PreheatRequest, log *logger.SugaredLoggerOnWith) (*internaljob.PreheatResponse, error) { urlMeta := &commonv1.UrlMeta{ - Digest: req.Digest, Tag: req.Tag, Filter: req.FilteredQueryParams, Header: req.Headers, @@ -424,7 +422,6 @@ func (j *job) preheatV2(ctx context.Context, taskID string, req *internaljob.Pre stream, err := j.resource.SeedPeer().Client().DownloadTask(ctx, taskID, &dfdaemonv2.DownloadTaskRequest{ Download: &commonv2.Download{ Url: req.URL, - Digest: &req.Digest, Type: commonv2.TaskType_STANDARD, Tag: &req.Tag, Application: &req.Application, diff --git a/scheduler/resource/standard/task_test.go b/scheduler/resource/standard/task_test.go index 63e0dd2b946..0547d5c435a 100644 --- a/scheduler/resource/standard/task_test.go +++ b/scheduler/resource/standard/task_test.go @@ -49,7 +49,7 @@ var ( mockTaskBackToSourceLimit int32 = 200 mockTaskURL = "http://example.com/foo" - mockTaskID = idgen.TaskIDV2(mockTaskURL, mockTaskDigest.String(), mockTaskTag, mockTaskApplication, mockTaskFilteredQueryParams) + mockTaskID = idgen.TaskIDV2(mockTaskURL, mockTaskTag, mockTaskApplication, mockTaskFilteredQueryParams) mockTaskDigest = digest.New(digest.AlgorithmSHA256, "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4") mockTaskTag = "d7y" mockTaskApplication = "foo" diff --git a/scheduler/scheduling/evaluator/evaluator_base_test.go b/scheduler/scheduling/evaluator/evaluator_base_test.go index 7d7264d74b7..376be64fc0e 100644 --- a/scheduler/scheduling/evaluator/evaluator_base_test.go +++ b/scheduler/scheduling/evaluator/evaluator_base_test.go @@ -134,7 +134,7 @@ var ( mockTaskBackToSourceLimit int32 = 200 mockTaskURL = "http://example.com/foo" - mockTaskID = idgen.TaskIDV2(mockTaskURL, mockTaskDigest.String(), mockTaskTag, mockTaskApplication, mockTaskFilteredQueryParams) + mockTaskID = idgen.TaskIDV2(mockTaskURL, mockTaskTag, mockTaskApplication, mockTaskFilteredQueryParams) mockTaskDigest = digest.New(digest.AlgorithmSHA256, "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4") mockTaskTag = "d7y" mockTaskApplication = "foo" diff --git a/scheduler/scheduling/scheduling_test.go b/scheduler/scheduling/scheduling_test.go index 01668709bb0..47b44d5f182 100644 --- a/scheduler/scheduling/scheduling_test.go +++ b/scheduler/scheduling/scheduling_test.go @@ -163,7 +163,7 @@ var ( mockTaskBackToSourceLimit int32 = 200 mockTaskURL = "http://example.com/foo" - mockTaskID = idgen.TaskIDV2(mockTaskURL, mockTaskDigest.String(), mockTaskTag, mockTaskApplication, mockTaskFilteredQueryParams) + mockTaskID = idgen.TaskIDV2(mockTaskURL, mockTaskTag, mockTaskApplication, mockTaskFilteredQueryParams) mockTaskDigest = digest.New(digest.AlgorithmSHA256, "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4") mockTaskTag = "d7y" mockTaskApplication = "foo" diff --git a/scheduler/service/service_v1_test.go b/scheduler/service/service_v1_test.go index 3d3884aa63a..8628aad6886 100644 --- a/scheduler/service/service_v1_test.go +++ b/scheduler/service/service_v1_test.go @@ -185,7 +185,7 @@ var ( mockTaskBackToSourceLimit int32 = 200 mockTaskURL = "http://example.com/foo" - mockTaskID = idgen.TaskIDV2(mockTaskURL, mockTaskDigest.String(), mockTaskTag, mockTaskApplication, mockTaskFilteredQueryParams) + mockTaskID = idgen.TaskIDV2(mockTaskURL, mockTaskTag, mockTaskApplication, mockTaskFilteredQueryParams) mockTaskDigest = digest.New(digest.AlgorithmSHA256, "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4") mockTaskTag = "d7y" mockTaskApplication = "foo" diff --git a/test/e2e/v2/concurrency_test.go b/test/e2e/v2/concurrency_test.go index e5707cbcfae..4a5cbd6e2c1 100644 --- a/test/e2e/v2/concurrency_test.go +++ b/test/e2e/v2/concurrency_test.go @@ -37,7 +37,7 @@ var _ = Describe("Download Concurrency", func() { Expect(err).NotTo(HaveOccurred()) fileMetadata := util.FileMetadata{ - ID: "de7d72a4f865bb1b1d3a9b7288bfd369a500277f5565736b2ba67aa205958df7", + ID: "14b31801ea6990788057b965fbc51e44bf73800462915fdfa0fda8182acca4d6", Sha256: "fc44bbbba20490450c73530db3d1b935f893f38d7d8084ca132952a765ff5ff6", } @@ -67,7 +67,7 @@ var _ = Describe("Download Concurrency", func() { Expect(err).NotTo(HaveOccurred()) fileMetadata := util.FileMetadata{ - ID: "510f018dc34c7e6ced07db2e88654a4e565e7982d5c73994e48e901f633c8113", + ID: "958e177b56be708c9d7ec193ae8cef399b39faff8234af33efa4cbe097d1fc5f", Sha256: "dc102987a36be20846821ac74648534863ff0fe8897d4250273a6ffc80481d91", } @@ -97,7 +97,7 @@ var _ = Describe("Download Concurrency", func() { Expect(err).NotTo(HaveOccurred()) fileMetadata := util.FileMetadata{ - ID: "381ee3f1dd0b55d151997e107e5517e4ac315677a4ed67c3cd814fe7b86481d1", + ID: "dd573cf9c3e1a79402b8423abcd1ba987c1b1ee9c49069d139d71106a260b055", Sha256: "54e54b7ff54ef70d4db2adcd24a27e3b9af3cd99fc0213983bac1e8035429be6", } @@ -127,7 +127,7 @@ var _ = Describe("Download Concurrency", func() { Expect(err).NotTo(HaveOccurred()) fileMetadata := util.FileMetadata{ - ID: "0068ce9e9beaca3ec33911d537be56de2d12e1b201bf3230aefe803919c373a5", + ID: "f1957adc26ec326800ced850d72e583a03be0999ba80d9aa2e3ba57ef4ddaf17", Sha256: "87c09b7c338f258809ca2d436bbe06ac94a3166b3f3e1125a86f35d9a9aa1d2f", } diff --git a/test/e2e/v2/containerd_test.go b/test/e2e/v2/containerd_test.go index 08e1e4d30ba..6245a4c2444 100644 --- a/test/e2e/v2/containerd_test.go +++ b/test/e2e/v2/containerd_test.go @@ -35,27 +35,27 @@ var _ = Describe("Containerd with CRI support", func() { taskMetadatas := []util.TaskMetadata{ { - ID: "c6c9f8b1ded96e4355f46c56c858cc52906ece01df55ad2c9600bd3635af2b74", + ID: "dda3df5ddf512a650e3bd465647f93a52f7f636012ca12bd7ab33906245076e7", Sha256: "ca51217de9012bffe54390f1a91365af22a06279a3f2b3e57d4d2dc99b989588", }, { - ID: "389a7dd948c14ecaa3b36d0c3697a41b2547ea556ca0f1b427860b4b11e80815", + ID: "384bd63e76fb2af034f44de7c2b1377eb3ad161ab75b0af1de73189b6c274035", Sha256: "0d816dfc0753b877a04e3df93557bd3597fc7d0e308726655b14401c22a3b92a", }, { - ID: "d16441e8c63799b5148a46edb0af535dd017f43f684510bd5ddd358e901c36ad", + ID: "d72baec2558ad1cdc53e00de5d98e2ed403d24d5ced55244e2ac6dec6db9b6e9", Sha256: "b5941d5a445040d3a792e5be361ca42989d97fc30ff53031f3004ccea8e44520", }, { - ID: "221de8465d2047153514e30cd586b9a6398bc8860ad5ea7c5853a3ca09b423c2", + ID: "848a2731dce0f7e89255b95a4aee74431c0e306eb6ce968a5a70be5d3a707a8b", Sha256: "c1d6d1b2d5a367259e6e51a7f4d1ccd66a28cc9940d6599d8a8ea9544dd4b4a8", }, { - ID: "71f89a34789a43c3ad7f55842890d0caf5a45a833bf4c8b72874b174f0358127", + ID: "f89ed6841a98697e6e6379f27f5b43abb9546a7200ca908d0d085e3a1d9593f9", Sha256: "2a1bc4e0f20bb5ed9a2197ecffde7eace4a9b9179048614205d025df73ba97c7", }, { - ID: "166359883b2334eb1ee9a9d49209a4286328c5e28605367e2d073fbdac6f5d0d", + ID: "02061e017949a88360a3ba2794c4e95198f80c737cc35ec105f1f0a4da67fa8c", Sha256: "078ea4eebc352a499d7bb6ff65fab1325226e524acac89a9db922ad91cab88f1", }, } @@ -98,19 +98,19 @@ var _ = Describe("Containerd with CRI support", func() { taskMetadatas := []util.TaskMetadata{ { - ID: "b01e905eb9803c65ade52d10b56cd024d5437377a477a53488cbbd346e895918", + ID: "bd2e2f7cbe2c6649214d62dc53b30f8ed1251366e0dc6422e25ef5c6a6a2bd60", Sha256: "0f4277a6444fbaf4eb5a7f39103e281dd57969953c7425edc7c8d4aa419347eb", }, { - ID: "f318e52bbbd81e2ba2afc697379118445ea32df733c92b20bfab6ba5183257a4", + ID: "23f48255ac61646aed5bbecc706ca539a7964e2128ff01911e492de654a63863", Sha256: "e55b67c1d5660c34dcb0d8e6923d0a50695a4f0d94f858353069bae17d0bfdea", }, { - ID: "5276a8a1dc433233d58c36a16a795511c946cf1f27b36ec60efeaae43a615b23", + ID: "0d5a5e975c20d654e79c468e6ffd94d647baabf62df73b594adcfeee3161c10f", Sha256: "8572bc8fb8a32061648dd183b2c0451c82be1bd053a4ea8fae991436b92faebb", }, { - ID: "83f9961825895cb4890a15db88980832adf825070c148d4260dfeb703652cd7f", + ID: "45003cfb0ebaa79c19e5d8cf5950aace1b7595e10fae0ee2b71c5481f7fbbd2d", Sha256: "88bfc12bad0cc91b2d47de4c7a755f6547b750256cc4c8b284e07aae13e4e041", }, } @@ -154,27 +154,27 @@ var _ = Describe("Containerd with CRI support", func() { taskMetadatas := []util.TaskMetadata{ { - ID: "157855128cf9d03cf9d5dcc53ec5d13a1dd26b252c6eda628fec21ccf9a8c349", + ID: "e7eb414a034771e5347c75d6414e87263a823fdcff9d125a06c357b19411d615", Sha256: "c8071d0de0f5bb17fde217dafdc9d2813ce9db77e60f6233bcd32f1c8888b121", }, { - ID: "76773bad88ce3fded570cc165fe9c11b946622a07172727e18f64fb4316efc5a", + ID: "999ea8db23bd6a89ace9e423b5780196a1856212edce12eb44d56a5573ce2ff5", Sha256: "e964513726885fa2f977425fc889eabbe25c9fa47e7a4b0ec5e2baef96290f47", }, { - ID: "c65a3d75938ab15d2520c6ed8a8680ae41921172f0c9359b6ed7e67573f7989d", + ID: "62e9b2b958f28f12f3ac8710dc4fab576268008e6115759e5dbd263e7a4afba3", Sha256: "0e304933d7eae4674e05b3bc409f236c65077e2b7055119bbd66ff613fe5e1ad", }, { - ID: "d96e650ebf7ec07618a8629880ca0da62fd9e36a9fe59eb309636c6c66410489", + ID: "a96b36f50370a5dbed258f13fd84b216b99992f49520643017b2845adca784ea", Sha256: "53b01ef3d5d676a8514ded6b469932e33d84738e5e00932ca124382a8567c44b", }, { - ID: "666b5bdb2a3c0498dfb3b73b95bc85b2679d0c65ef5d8e80ae9038b92631bfec", + ID: "f314d50106ab72ca9f3d1ebbbf4a71bcb0efb861a1efc70cb707a4204df52250", Sha256: "c9d959fc168ad8bdc9a021066eb9c1dd4de8e860c03619a88d8ba0ff5479d9ea", }, { - ID: "886aaa587415010d418ce8d3848fda6c3c0d2c8ae733960d28e2bc9149e5ed07", + ID: "9df82cfbd39d9956071967f8ef4b04f50674d01cc835bcc8e9f572c484ab3c39", Sha256: "b6acfae843b58bf14369ebbeafa96af5352cde9a89f8255ca51f92b233a6e405", }, } @@ -218,15 +218,15 @@ var _ = Describe("Containerd with CRI support", func() { taskMetadatas := []util.TaskMetadata{ { - ID: "3a909585362079e870dd1f2286433b24fe1f2007599dadc6eaf5f73d8ba2b209", + ID: "b08c8967e69896dda94b814d56c4154d8599c4660349e3722de01b214cbb122e", Sha256: "c58d97dd21c3b3121f262a1fbb5a278f77ab85dba7a02b819e710f34683cf746", }, { - ID: "843ad9a841e99d9e8c18e5cccc200ed81e825bcecbeb749f6956bb7e43db0bfc", + ID: "48f0dc8525c8652c6b9910c617367ca35d796880626c4044534ca35724f11a53", Sha256: "2ff0ae26fa61a2b0f88f470a8e50f7623ea48b224eb072a5878a20d663d5307d", }, { - ID: "89d8de8f4cabeba625ffe416425a4c821e327b8e687096351bbf072b34018a19", + ID: "c652a1dd59249ca4f7eff3a61f4fdd5cb7c17215fe721a9ed6e105acf34bc6d9", Sha256: "b1826117441e607acd3b98c93cdb16759c2cc2240852055b8a2b5860f3204f1e", }, } diff --git a/test/e2e/v2/dfget_test.go b/test/e2e/v2/dfget_test.go index a4a1de2b35a..c6241d1a013 100644 --- a/test/e2e/v2/dfget_test.go +++ b/test/e2e/v2/dfget_test.go @@ -38,7 +38,7 @@ var _ = Describe("Download Using Dfget", func() { Expect(err).NotTo(HaveOccurred()) fileMetadata := util.FileMetadata{ - ID: "bca2831966564d5afc95ee720836e22ce064f28ab7afc3e8ad2374565bcf3873", + ID: "f82afbc76aa4d6472a982a8b8383a98d22c18c9ab06d24e989d9d4d30a49dfee", Sha256: "6288d2a89e2a9611191c25a45de20e94d8d058c75f274a39970d41f60f367e6f", } @@ -75,7 +75,7 @@ var _ = Describe("Download Using Dfget", func() { Expect(err).NotTo(HaveOccurred()) fileMetadata := util.FileMetadata{ - ID: "cc2a62a71cb3555a67e54ab905ff311a1f74a1cb82137a1af3eaa5c38219bd0d", + ID: "144eb7b6f67b8423c9999b9b864a35562aeff3e7d153eed2bb7f917977796bdf", Sha256: "327b4022d0bfd1d5e9c0701d4a3f989a536f7e6e865e102dcd77c7e7adb31f9a", } @@ -112,7 +112,7 @@ var _ = Describe("Download Using Dfget", func() { Expect(err).NotTo(HaveOccurred()) fileMetadata := util.FileMetadata{ - ID: "fd60786a0e11228d949f1ca0e4c82e301c5daab3638159e3bb7202e3dffe12ea", + ID: "7327d3aa45f16e60396d687d8c81a9d5ec9c6ca662ad9c6dad77f830c499d5e3", Sha256: "a1cbf1bf2d66757121677fd7fefafacd4f843a2cb44a451131002803bae56a65", } @@ -149,7 +149,7 @@ var _ = Describe("Download Using Dfget", func() { Expect(err).NotTo(HaveOccurred()) fileMetadata := util.FileMetadata{ - ID: "9cd2ae0296e11b8e9a300deb8c13f1edba54e90356716c6a29fbc405e6cdfd45", + ID: "92709a5ce8a45db2563081b843403eec5d72f8a78fe2be85ce23e0edf8b2d207", Sha256: "b0cfe211f851049a78f5812cf5b1d7cb4f3fbb101c02c1865c940d5797f4b73b", } @@ -186,7 +186,7 @@ var _ = Describe("Download Using Dfget", func() { Expect(err).NotTo(HaveOccurred()) fileMetadata := util.FileMetadata{ - ID: "c288f941340197c0611b5c50e6682f367d087a3b5289cf75ac5048f8774cb7c1", + ID: "56ac4873dda3db55ed78c6b26b24d51343803882714a54802bfddbb1097eb06d", Sha256: "c37f93c73cf2f303f874c094f6f76e47b2421a3da9f0e7e0b98bea8a3d685322", } @@ -223,7 +223,7 @@ var _ = Describe("Download Using Dfget", func() { Expect(err).NotTo(HaveOccurred()) fileMetadata := util.FileMetadata{ - ID: "27e00689dfe0410b5b34758452f95d063d916c62ffdd28b1ab35995107696a48", + ID: "fbf82ee8c8fb2f234c46947e95b4b51fc9a01b9306e52c6b717f5323b6e7c5e4", Sha256: "6288d2a89e2a9611191c25a45de20e94d8d058c75f274a39970d41f60f367e6f", } @@ -260,7 +260,7 @@ var _ = Describe("Download Using Dfget", func() { Expect(err).NotTo(HaveOccurred()) fileMetadata := util.FileMetadata{ - ID: "27e00689dfe0410b5b34758452f95d063d916c62ffdd28b1ab35995107696a48", + ID: "fbf82ee8c8fb2f234c46947e95b4b51fc9a01b9306e52c6b717f5323b6e7c5e4", Sha256: "6288d2a89e2a9611191c25a45de20e94d8d058c75f274a39970d41f60f367e6f", } diff --git a/test/e2e/v2/manager/preheat.go b/test/e2e/v2/manager/preheat.go index 855c33d080d..dd4cc0fed85 100644 --- a/test/e2e/v2/manager/preheat.go +++ b/test/e2e/v2/manager/preheat.go @@ -61,7 +61,7 @@ var _ = Describe("Preheat with Manager", func() { Expect(done).Should(BeTrue()) fileMetadata := util.FileMetadata{ - ID: "6ba5a8781902368d2b07eb8b6d6044a96f49d5008feace1ea8e3ebfc0b96d0a1", + ID: "b0a5cfd4ccf5310803675f742dedc435a64e9a5f539f48fedbef6c30aac18b7c", Sha256: "80f1d8cd843a98b23b30e90e7e43a14e05935351f354d678bc465f7be66ef3dd", } @@ -108,7 +108,7 @@ var _ = Describe("Preheat with Manager", func() { Expect(done).Should(BeTrue()) fileMetadata := util.FileMetadata{ - ID: "f4d85d5d6db12bdcdee48a1f3ace8420756399bdfcbddd430b6b2330ad4c00df", + ID: "802e3df5384438deaed066ca445489f6e314ebb6a2d4728d020e75a08d281942", Sha256: "4c7f0f298ab3350859f90664d706b8ccaa95072f1f1f3dd74f559642e5483cd5", } @@ -125,53 +125,6 @@ var _ = Describe("Preheat with Manager", func() { }) }) - Context("/bin/i386 file", func() { - It("preheat files should be ok", Label("preheat", "file"), 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: util.GetFileURL("/bin/i386"), - }, - }) - 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()) - - fileMetadata := util.FileMetadata{ - ID: "bd2024e044b8b29dcfd930ae1eae9594c8d94f89cc6403303cf07c892c00db7d", - Sha256: "a1cbf1bf2d66757121677fd7fefafacd4f843a2cb44a451131002803bae56a65", - } - - seedClientPods := make([]*util.PodExec, 3) - for i := 0; i < 3; i++ { - seedClientPods[i], err = util.SeedClientExec(i) - fmt.Println(err) - Expect(err).NotTo(HaveOccurred()) - } - - sha256sum, err := util.CalculateSha256ByTaskID(seedClientPods, fileMetadata.ID) - Expect(err).NotTo(HaveOccurred()) - Expect(fileMetadata.Sha256).To(Equal(sha256sum)) - }) - }) - Context("/bin/jq file", func() { It("preheat files should be ok", Label("preheat", "file"), func() { managerPod, err := util.ManagerExec(0) @@ -202,7 +155,7 @@ var _ = Describe("Preheat with Manager", func() { Expect(done).Should(BeTrue()) fileMetadata := util.FileMetadata{ - ID: "039d6a3441cc8e47bf83d6bb504be958f6b08511d8c23afcb0dd8c266b23fa93", + ID: "4f1de4716ec6d1ca56daf1f5dd2520a8f6a826d90474f596cdf99a5c88fef982", Sha256: "5a963cbdd08df27651e9c9d006567267ebb3c80f7b8fc0f218ade5771df2998b", } @@ -248,11 +201,11 @@ var _ = Describe("Preheat with Manager", func() { taskMetadatas := []util.TaskMetadata{ { - ID: "b32d9d9ab534cd803ae7ecf6655fe2e397edb6bc6e160d462d3d762ca4281150", + ID: "b6922209dc9616f8736a860e93c3cd7288a4e801517f88eec3df514606d18cdf", Sha256: "a711f05d33845e2e9deffcfcc5adf082d7c6e97e3e3a881d193d9aae38f092a8", }, { - ID: "21213381947bc939549355f00318f22c2f35fb3a907b79a145aab45f0a18aff7", + ID: "c0dfae864ae65c285676063eb148d0a0064d5c6c39367fee0bcc1f3700c39c31", Sha256: "f643e116a03d9604c344edb345d7592c48cc00f2a4848aaf773411f4fb30d2f5", }, } @@ -302,23 +255,23 @@ var _ = Describe("Preheat with Manager", func() { taskMetadatas := []util.TaskMetadata{ { - ID: "f3d195d2de9da87385bd381258f436e163efaed266b3ff56eac7b89d40cacfb3", + ID: "c8ca6a17354d3a79397eef26803e5af84d00a3fd64b0f823922086a31ebdee18", Sha256: "f1f1039835051ecc04909f939530e86a20f02d2ce5ad7a81c0fa3616f7303944", }, { - ID: "d5f00b6bdba48fdd8920ae419ca0a007b3e15ff93d0c10495da981aaea657ef0", + ID: "b8de5865e2ebf537279683adfbdb5f858b0c7212e5744a1df233086496c245d7", Sha256: "c1d6d1b2d5a367259e6e51a7f4d1ccd66a28cc9940d6599d8a8ea9544dd4b4a8", }, { - ID: "5ae39f96a141d56d403f5098bcbefc13882ae3eeb1926d3c1fcfe8644f0ba7eb", + ID: "e4bf0d4b551afda56f9627c81ee02ab4360865d37c7dd43586e37f26f4386806", Sha256: "871ab018db94b4ae7b137764837bc4504393a60656ba187189e985cd809064f7", }, { - ID: "11b4932bf84ca19d80ef974d02f62b9d82bd42c1a7b9c2e5112097dbafcec601", + ID: "7da0721fd078dd46a63298747ffde8fcbe12b53378f282c9def693615ac7993e", Sha256: "f1a1d290795d904815786e41d39a41dc1af5de68a9e9020baba8bd83b32d8f95", }, { - ID: "0d15761559736d2e40678c72f7df9f330328c13abdbc5e3aa4c027c17f42b1c6", + ID: "3639c8c5712e77acd3751142c83150c0a12284a54fa41224a1c7acc0e343020d", Sha256: "f1ffc4b5459e82dc8e7ddd1d1a2ec469e85a1f076090c22851a1f2ce6f71e1a6", }, } @@ -337,7 +290,7 @@ var _ = Describe("Preheat with Manager", func() { } }) - It("preheat image for linux/arm64 platform should be ok", Label("preheat", "image"), func() { + It("preheat image for linux/arm64 platform should be ok", Label("preheat", "image"), func() { managerPod, err := util.ManagerExec(0) fmt.Println(err) Expect(err).NotTo(HaveOccurred()) @@ -366,23 +319,23 @@ var _ = Describe("Preheat with Manager", func() { taskMetadatas := []util.TaskMetadata{ { - ID: "b742ff16c917a4559f1909a1f1bb1a8cf66d242344d33a8ef8ca4b5bfc588b6a", + ID: "9869dbb01ac214e90e4ae667e42d50210c2ff1e63292d73b14f0a7a2226c0320", Sha256: "a0d7a8f11f7e25ca59f0bf470187dd9aa27e7ca951cf67a53c750deea5d3b076", }, { - ID: "3ed59c2363a552a8b3e9b1d4aed8efef18c7861678db52afd71db57ee238f317", + ID: "ab049caee13f77d91568d954a5d32f5d2354497cab098887a8a663656daa9840", Sha256: "a880266d3b77f75696023df2da1ef66c3c565e0f70596242395c9e68de955c7c", }, { - ID: "5ae39f96a141d56d403f5098bcbefc13882ae3eeb1926d3c1fcfe8644f0ba7eb", + ID: "e4bf0d4b551afda56f9627c81ee02ab4360865d37c7dd43586e37f26f4386806", Sha256: "871ab018db94b4ae7b137764837bc4504393a60656ba187189e985cd809064f7", }, { - ID: "7f83153778995fabe52d43913bc70cfe6e1f858e9450d93750903b9cbcd1007b", + ID: "a26e1ac8b70926f45766fcf886f23a833793c39c62237bcda9ffeb158131c0d6", Sha256: "9b5952218d7711195c6c6fbddbef2780507d20851ca68845d180397d1348f0d8", }, { - ID: "9368993adbbee8e4eeedfbd9279c88c7ea8f6dfe9b6ff035eac5dc2bf351b706", + ID: "7376f665077e91cd0dc410c00242ab88775e3eae19eca4b7b3a29ded14fc3754", Sha256: "889f4c960ac4ff70774e9c4cfa64efc4823ade0702d0f96c20ff0054ffbbe504", }, } diff --git a/test/e2e/v2/manager/task.go b/test/e2e/v2/manager/task.go index 88062e9dd6c..035d32b4b2b 100644 --- a/test/e2e/v2/manager/task.go +++ b/test/e2e/v2/manager/task.go @@ -62,7 +62,7 @@ var _ = Describe("GetTask and DeleteTask with Manager", func() { Expect(done).Should(BeTrue()) fileMetadata := util.FileMetadata{ - ID: "6f1e003b51a34df01dd80e3498dbaad584584d97888464b33b3e2c8442a3d485", + ID: "5588094e5a40f0d324052e044884a0910de8467428deebccb8c6fb560b131c28", Sha256: "df954abca766aceddd79dd20429e4f222019018667446626d3a641d3c47c50fc", } @@ -157,7 +157,7 @@ var _ = Describe("GetTask and DeleteTask with Manager", func() { Expect(done).Should(BeTrue()) fileMetadata := util.FileMetadata{ - ID: "ddc397119488e07671cdeec0bf54c31b544ce2fbff14441c7444f1dddda2bd91", + ID: "feab7bc71cfa2618a2fe4cf593b562d59b4e8cb87e8ec249a1b951f44c78f2b6", Sha256: "5286873505a9671e077f346cdfb89d5a6c99985fe3f11a972f30fedf9029bae0", } diff --git a/test/e2e/v2/proxy_test.go b/test/e2e/v2/proxy_test.go index bf2d2df240e..482402934a3 100644 --- a/test/e2e/v2/proxy_test.go +++ b/test/e2e/v2/proxy_test.go @@ -39,7 +39,7 @@ var _ = Describe("Download Using Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "090278fc27871e8bb93c4546a0f44dd16126ed476a23bee7c4b0812357e2042b", + ID: "2203d73a8d0162a86745eb25095a655e2ab866c56c3ebcc3f0bf7d6a4e329317", Sha256: "6288d2a89e2a9611191c25a45de20e94d8d058c75f274a39970d41f60f367e6f", } @@ -77,7 +77,7 @@ var _ = Describe("Download Using Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "80c17d9f21dcfd8b6f4526d131e65cd70dd0ad644033ea1900ea9a7deeed6dc3", + ID: "6b94aa169d11ba67c1852f14c4df39e5ebf84d1c0d7a6f6ad0ba2f3547883f4f", Sha256: "327b4022d0bfd1d5e9c0701d4a3f989a536f7e6e865e102dcd77c7e7adb31f9a", } @@ -115,7 +115,7 @@ var _ = Describe("Download Using Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "559fb82754b3cd804f75d4e9e58ae6cd9aba5c49e24e7f52891bee5c815ed2b8", + ID: "d6636c250217d958ef2377ca9278811cc3c538f3d29a65729ec7e73bbabf5bb6", Sha256: "a1cbf1bf2d66757121677fd7fefafacd4f843a2cb44a451131002803bae56a65", } @@ -153,7 +153,7 @@ var _ = Describe("Download Using Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "c8e05b7c9ebae46268691292fd2905c2cb4250af12ce91e53750e16eec69ce5a", + ID: "9c9754927a9b3be5b6a0524c3c6f930a292370d0c29f0617a4b54e94622b330b", Sha256: "b0cfe211f851049a78f5812cf5b1d7cb4f3fbb101c02c1865c940d5797f4b73b", } @@ -191,7 +191,7 @@ var _ = Describe("Download Using Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "8a541eb07998f3980807ec1d183d74516bf6e2afe76d674e813ddca99938e02e", + ID: "91623b36b06c8fe3c87af420b92df060884a1fda1b11951349a0f1d02f9cc2e3", Sha256: "c37f93c73cf2f303f874c094f6f76e47b2421a3da9f0e7e0b98bea8a3d685322", } @@ -217,7 +217,7 @@ var _ = Describe("Download Using Proxy", func() { }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=-100", func() { It("download should be ok", Label("proxy", "download", "range: bytes=-100"), func() { clientPod, err := util.ClientExec() fmt.Println(err) @@ -229,7 +229,7 @@ var _ = Describe("Download Using Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "ef524d1361ee2c0f0b0a457f1d5e605b3fe4f3dd2fd131950004bb20fa83d6fa", + ID: "5a7a62911a30fbcdf602b3b37ce3ecb56f4c47ab65283219c5d2342223ee53cb", Sha256: "cd00e292c5970d3c5e2f0ffa5171e555bc46bfc4faddfb4a418b6840b86e79a3", } @@ -255,7 +255,7 @@ var _ = Describe("Download Using Proxy", func() { }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=0-100", func() { It("download should be ok", Label("proxy", "download", "range: bytes=0-100"), func() { clientPod, err := util.ClientExec() fmt.Println(err) @@ -267,7 +267,7 @@ var _ = Describe("Download Using Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "d22bb2076dc27f0f0be5d3ecc1e95a63ea516ce5dff49d235cf2266e98625474", + ID: "41d7764fb682932aac4e1591ff01739493539e6af9072773624b3e20fe5465f4", Sha256: "7bbfcb694f6acc69483751d3b48d5bdbdcb284f9e04c7b7caa04b5977cffddc8", } @@ -293,7 +293,7 @@ var _ = Describe("Download Using Proxy", func() { }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=100-", func() { It("download should be ok", Label("proxy", "download", "range: bytes=100-"), func() { clientPod, err := util.ClientExec() fmt.Println(err) @@ -305,7 +305,7 @@ var _ = Describe("Download Using Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "f58775d042d37c406dbe03a294446e994f183e5872e93477025ad049f62a0a85", + ID: "c29e8ee77bf3a0f177269fd1a216a4c404a4fb3778a483c41c8735aadffcbe66", Sha256: "ba9a10ceceb80562fc124dc9bc94ea2a38e3a71e3e746e2140e6381ac791cdeb", } @@ -331,7 +331,7 @@ var _ = Describe("Download Using Proxy", func() { }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=100-46026751", func() { It("download should be ok", Label("proxy", "download", "range: bytes=100-46026751"), func() { clientPod, err := util.ClientExec() fmt.Println(err) @@ -343,7 +343,7 @@ var _ = Describe("Download Using Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "6353c7c65066bf24acdfe62601ba17a1636d217169e79f7ea3f2ebf7f0940e06", + ID: "29fe25686d520e3aedd1743fc95dc008e6102e917b33d17b75b2db204718f132", Sha256: "ba9a10ceceb80562fc124dc9bc94ea2a38e3a71e3e746e2140e6381ac791cdeb", } @@ -369,7 +369,7 @@ var _ = Describe("Download Using Proxy", func() { }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=0-46026751", func() { It("download should be ok", Label("proxy", "download", "range: bytes=0-46026751"), func() { clientPod, err := util.ClientExec() fmt.Println(err) @@ -381,7 +381,7 @@ var _ = Describe("Download Using Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "1ff704a22e421b2f9b99f7f8e2228e6f71d9c987ef242348acc031d003d3e941", + ID: "09f0107339e32f9405b15fb093b25db9652104d96d3a8797afffa47f5c4c988b", Sha256: "327b4022d0bfd1d5e9c0701d4a3f989a536f7e6e865e102dcd77c7e7adb31f9a", } @@ -407,7 +407,7 @@ var _ = Describe("Download Using Proxy", func() { }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=100-10240", func() { It("download should be ok", Label("proxy", "download", "range: bytes=100-10240"), func() { clientPod, err := util.ClientExec() fmt.Println(err) @@ -419,7 +419,7 @@ var _ = Describe("Download Using Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "dba445f5310c2a63fabeaad075511357e411b74f68a47bc579ed36f78a380013", + ID: "7a916912f2182f749d2779ad9c557947d7ee2a2b213705038d2441bf5089f5d0", Sha256: "8732360b941ad09a5e0e5d5f9891118bc068f6d0d5a56e3c6d483e4600fbc43f", } @@ -445,7 +445,7 @@ var _ = Describe("Download Using Proxy", func() { }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=100-1024", func() { It("download should be ok", Label("proxy", "download", "range: bytes=100-1024"), func() { clientPod, err := util.ClientExec() fmt.Println(err) @@ -457,7 +457,7 @@ var _ = Describe("Download Using Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "ae82ec86b58e7a91853ce6a3d52a59a1d590365a91b30db57df922bd8a6bc952", + ID: "7a916912f2182f749d2779ad9c557947d7ee2a2b213705038d2441bf5089f5d0", Sha256: "d6d17dca18b8de59e38da525dc24c47b74fec1a790a9f64afdd6538f4f8fa90e", } @@ -497,7 +497,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "4a4df08f3aa3311e29556582de4269294a6805f81b7d8d38b83e8a91bc461d4e", + ID: "09d0b6f7a9d6825d4d703b85ec706a87334ba437310301e4a0110af8cc562648", Sha256: "6288d2a89e2a9611191c25a45de20e94d8d058c75f274a39970d41f60f367e6f", } @@ -523,7 +523,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "3496028e92e0e35651f92e86ffde1dfa3c03a66265d248f8d3254ac78d30ef83", + ID: "0812fe2767598f19d2430be8153522d916f6e6c3179bd8914941eb2c0e8568e5", Sha256: "327b4022d0bfd1d5e9c0701d4a3f989a536f7e6e865e102dcd77c7e7adb31f9a", } @@ -549,7 +549,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "91ae78d5302e267bd245bae82c6ab90e18a8a4234bb87642f108901e801a1e2a", + ID: "d93cf0cd379fbd59194c3038837a551a1151a3aedd1c931fc7324ea0b0edc289", Sha256: "a1cbf1bf2d66757121677fd7fefafacd4f843a2cb44a451131002803bae56a65", } @@ -575,7 +575,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "d2ccf9401074d729a88359394f1d9b4888ee6b7d9e4045e49bf1fa8d7caaf1d7", + ID: "ba68b1b385b2441fef06fb79a64b79367fabf4c31e2d7f21cd37b202d2e02e44", Sha256: "b0cfe211f851049a78f5812cf5b1d7cb4f3fbb101c02c1865c940d5797f4b73b", } @@ -601,7 +601,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "a8a7a947d233ce5298c937c7e3cb52321810533d89c526c751b71a2dd91bc908", + ID: "661e488117503f6c46192e86f587a5b615129cadb6f25b51b9683257a1d70b55", Sha256: "c37f93c73cf2f303f874c094f6f76e47b2421a3da9f0e7e0b98bea8a3d685322", } @@ -615,7 +615,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=-100", func() { It("download should be ok", Label("prefetch-proxy", "download", "range: bytes=-100"), func() { seedClientPod, err := util.SeedClientExec(0) fmt.Println(err) @@ -627,7 +627,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "cbc6213119267fb7437947a971673a6a3eb65d3b972eac55b227104a4069f32c", + ID: "43a914f8b0f3ab0be61ee007b4246de0043612a691eb39e07efbcbb2b11be8e5", Sha256: "cd00e292c5970d3c5e2f0ffa5171e555bc46bfc4faddfb4a418b6840b86e79a3", } @@ -639,11 +639,10 @@ var _ = Describe("Download Using Prefetch Proxy", func() { sha256sum, err = util.CalculateSha256ByTaskID([]*util.PodExec{seedClientPod}, fileMetadata.ID) Expect(err).NotTo(HaveOccurred()) Expect("327b4022d0bfd1d5e9c0701d4a3f989a536f7e6e865e102dcd77c7e7adb31f9a").To(Equal(sha256sum)) - }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=0-100", func() { It("download should be ok", Label("prefetch-proxy", "download", "range: bytes=0-100"), func() { seedClientPod, err := util.SeedClientExec(0) fmt.Println(err) @@ -655,7 +654,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "ab59a8e67be5672729f97ecd6c9824561ab6e77652d59ea4e7b6eaf18a5a443e", + ID: "eb46a424abb2151d4d1337d030f3d15b510cf7827a45a0e033e81ed3d15d8743", Sha256: "7bbfcb694f6acc69483751d3b48d5bdbdcb284f9e04c7b7caa04b5977cffddc8", } @@ -670,7 +669,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=100-", func() { It("download should be ok", Label("prefetch-proxy", "download", "range: bytes=100-"), func() { seedClientPod, err := util.SeedClientExec(0) fmt.Println(err) @@ -682,7 +681,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "235c7f0377f3cea69659756c883243fd071ffb527c38d6abb407bf428ecc6489", + ID: "148e03a3ba5c45269de90465cff82d003e52a7ec7e3a2ea6fe08e45f4fb6fbdd", Sha256: "ba9a10ceceb80562fc124dc9bc94ea2a38e3a71e3e746e2140e6381ac791cdeb", } @@ -697,7 +696,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=100-46026751", func() { It("download should be ok", Label("prefetch-proxy", "download", "range: bytes=100-46026751"), func() { seedClientPod, err := util.SeedClientExec(0) fmt.Println(err) @@ -709,7 +708,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "5135a54f35215fcbdfcea61313bc746ee4d2112781e7b346967aa53e3d266377", + ID: "daf131380b88dd60a81140f87d36767cbfadc314324b71e0ee2a35679cf864b5", Sha256: "ba9a10ceceb80562fc124dc9bc94ea2a38e3a71e3e746e2140e6381ac791cdeb", } @@ -724,7 +723,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=0-46026751", func() { It("download should be ok", Label("prefetch-proxy", "download", "range: bytes=0-46026751"), func() { seedClientPod, err := util.SeedClientExec(0) fmt.Println(err) @@ -736,7 +735,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "c573851cdcabc1d5f7344c576ff67bdfe3f63f65b49e08942f24c15a1808a027", + ID: "90f143ba29e0174095ca2e59a76d86f3acaa4072aec3263c2bacf51259eaece0", Sha256: "327b4022d0bfd1d5e9c0701d4a3f989a536f7e6e865e102dcd77c7e7adb31f9a", } @@ -751,7 +750,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=100-10240", func() { It("download should be ok", Label("prefetch-proxy", "download", "range: bytes=100-10240"), func() { seedClientPod, err := util.SeedClientExec(0) fmt.Println(err) @@ -763,7 +762,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "cc826acc16c2ab33525874eb66baddb180709b33380983d489e510d6674ef6bb", + ID: "52c748b962167e66421259a7834363b3956b1a3c5f8cea5575a1f96dae4be47d", Sha256: "8732360b941ad09a5e0e5d5f9891118bc068f6d0d5a56e3c6d483e4600fbc43f", } @@ -778,7 +777,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { }) }) - Context("/bin/kubectl file and set range header", func() { + Context("/bin/kubectl file and set range header bytes=100-1024", func() { It("download should be ok", Label("prefetch-proxy", "download", "range: bytes=100-1024"), func() { seedClientPod, err := util.SeedClientExec(0) fmt.Println(err) @@ -790,7 +789,7 @@ var _ = Describe("Download Using Prefetch Proxy", func() { fmt.Println(string(out)) fileMetadata := util.FileMetadata{ - ID: "60645e89632f754c704450108e2d188f7496cb63bb6055a5b1bf5c71f29d0b3a", + ID: "52c748b962167e66421259a7834363b3956b1a3c5f8cea5575a1f96dae4be47d", Sha256: "d6d17dca18b8de59e38da525dc24c47b74fec1a790a9f64afdd6538f4f8fa90e", } diff --git a/test/testdata/charts/config-v2.yaml b/test/testdata/charts/config-v2.yaml index 4b54a62492e..8eedff64d5a 100644 --- a/test/testdata/charts/config-v2.yaml +++ b/test/testdata/charts/config-v2.yaml @@ -24,6 +24,7 @@ manager: metrics: enable: true config: + console: false verbose: true job: rateLimit: @@ -61,6 +62,7 @@ scheduler: enable: true enableHost: true config: + console: false verbose: true scheduler: gc: