diff --git a/cmd/server/docs/docs.go b/cmd/server/docs/docs.go index 2b8437fd1..ac80d2883 100644 --- a/cmd/server/docs/docs.go +++ b/cmd/server/docs/docs.go @@ -5064,12 +5064,6 @@ const docTemplate = `{ "agent_id": { "type": "integer" }, - "data": { - "type": "array", - "items": { - "type": "integer" - } - }, "dep_status": { "type": "object", "additionalProperties": { diff --git a/server/model/task.go b/server/model/task.go index bd24ca665..3f73bebed 100644 --- a/server/model/task.go +++ b/server/model/task.go @@ -22,7 +22,7 @@ import ( // Task defines scheduled pipeline Task. type Task struct { ID string `json:"id" xorm:"PK UNIQUE 'id'"` - Data []byte `json:"data" xorm:"LONGBLOB 'data'"` + Data []byte `json:"-" xorm:"LONGBLOB 'data'"` Labels map[string]string `json:"labels" xorm:"json 'labels'"` Dependencies []string `json:"dependencies" xorm:"json 'dependencies'"` RunOn []string `json:"run_on" xorm:"json 'run_on'"` diff --git a/web/src/lib/api/types/queue.ts b/web/src/lib/api/types/queue.ts index e8752c71d..a6ff4edc7 100644 --- a/web/src/lib/api/types/queue.ts +++ b/web/src/lib/api/types/queue.ts @@ -1,6 +1,5 @@ export interface Task { id: number; - data: string; labels: { [key: string]: string }; dependencies: string[]; dep_status: { [key: string]: string }; diff --git a/woodpecker-go/woodpecker/agent_test.go b/woodpecker-go/woodpecker/agent_test.go index d424336d8..a10d756ee 100644 --- a/woodpecker-go/woodpecker/agent_test.go +++ b/woodpecker-go/woodpecker/agent_test.go @@ -431,16 +431,14 @@ func TestClient_AgentTasksList(t *testing.T) { agentID: 1, expected: []*Task{ { - ID: "4696", - Data: []byte{}, + ID: "4696", Labels: map[string]string{ "platform": "linux/amd64", "repo": "woodpecker-ci/woodpecker", }, }, { - ID: "4697", - Data: []byte{}, + ID: "4697", Labels: map[string]string{ "platform": "linux/arm64", "repo": "woodpecker-ci/woodpecker", diff --git a/woodpecker-go/woodpecker/queue_test.go b/woodpecker-go/woodpecker/queue_test.go index 099169d3a..11ab1b8a8 100644 --- a/woodpecker-go/woodpecker/queue_test.go +++ b/woodpecker-go/woodpecker/queue_test.go @@ -49,8 +49,7 @@ func TestClient_QueueInfo(t *testing.T) { expected: &Info{ Running: []Task{ { - ID: "4696", - Data: []byte{}, + ID: "4696", Labels: map[string]string{ "platform": "linux/amd64", "repo": "woodpecker-ci/woodpecker", diff --git a/woodpecker-go/woodpecker/types.go b/woodpecker-go/woodpecker/types.go index 09bf183ca..158f5e8a1 100644 --- a/woodpecker-go/woodpecker/types.go +++ b/woodpecker-go/woodpecker/types.go @@ -246,7 +246,6 @@ type ( // Task is the JSON data for a task. Task struct { ID string `json:"id"` - Data []byte `json:"data"` Labels map[string]string `json:"labels"` Dependencies []string `json:"dependencies"` RunOn []string `json:"run_on"`