Skip to content

Commit 8027f60

Browse files
committed
fix
1 parent a6e5569 commit 8027f60

File tree

7 files changed

+24
-22
lines changed

7 files changed

+24
-22
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"object_kind":"pipeline","object_attributes":{"id":31,"iid":3,"name":"Pipeline for branch: master","ref":"master","tag":false,"sha":"bcbb5ec396a2c0f828686f14fac9b80b780504f2","before_sha":"bcbb5ec396a2c0f828686f14fac9b80b780504f2","source":"merge_request_event","status":"success","stages":["build","test","deploy"],"created_at":"2016-08-12 15:23:28 UTC","finished_at":"2016-08-12 15:26:29 UTC","duration":63,"variables":[{"key":"NESTOR_PROD_ENVIRONMENT","value":"us-west-1"}],"url":"http://example.com/gitlab-org/gitlab-test/-/pipelines/31"},"merge_request":{"id":1,"iid":1,"title":"Test","source_branch":"test","source_project_id":1,"target_branch":"master","target_project_id":1,"state":"opened","merge_status":"can_be_merged","detailed_merge_status":"mergeable","url":"http://192.168.64.1:3005/gitlab-org/gitlab-test/merge_requests/1"},"user":{"id":1,"name":"Administrator","username":"root","avatar_url":"http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon","email":"[email protected]"},"project":{"id":1,"name":"Gitlab Test","description":"Atque in sunt eos similique dolores voluptatem.","web_url":"http://192.168.64.1:3005/gitlab-org/gitlab-test","avatar_url":null,"git_ssh_url":"[email protected]:gitlab-org/gitlab-test.git","git_http_url":"http://192.168.64.1:3005/gitlab-org/gitlab-test.git","namespace":"Gitlab Org","visibility_level":20,"path_with_namespace":"gitlab-org/gitlab-test","default_branch":"master"},"commit":{"id":"bcbb5ec396a2c0f828686f14fac9b80b780504f2","message":"test\n","timestamp":"2016-08-12T17:23:21+02:00","url":"http://example.com/gitlab-org/gitlab-test/commit/bcbb5ec396a2c0f828686f14fac9b80b780504f2","author":{"name":"User","email":"[email protected]"}},"source_pipeline":{"project":{"id":41,"web_url":"https://gitlab.example.com/gitlab-org/upstream-project","path_with_namespace":"gitlab-org/upstream-project"},"pipeline_id":30,"job_id":3401},"builds":[{"id":380,"stage":"deploy","name":"production","status":"skipped","created_at":"2016-08-12 15:23:28 UTC","started_at":null,"finished_at":null,"duration":null,"queued_duration":null,"failure_reason":null,"when":"manual","manual":true,"allow_failure":false,"user":{"id":1,"name":"Administrator","username":"root","avatar_url":"http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon","email":"[email protected]"},"runner":null,"artifacts_file":{"filename":null,"size":null},"environment":{"name":"production","action":"start","deployment_tier":"production"}},{"id":377,"stage":"test","name":"test-image","status":"success","created_at":"2016-08-12 15:23:28 UTC","started_at":"2016-08-12 15:26:12 UTC","finished_at":"2016-08-12 15:26:29 UTC","duration":17.0,"queued_duration":196.0,"failure_reason":null,"when":"on_success","manual":false,"allow_failure":false,"user":{"id":1,"name":"Administrator","username":"root","avatar_url":"http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon","email":"[email protected]"},"runner":{"id":380987,"description":"shared-runners-manager-6.gitlab.com","active":true,"runner_type":"instance_type","is_shared":true,"tags":["linux","docker","shared-runner"]},"artifacts_file":{"filename":null,"size":null},"environment":null},{"id":378,"stage":"test","name":"test-build","status":"failed","created_at":"2016-08-12 15:23:28 UTC","started_at":"2016-08-12 15:26:12 UTC","finished_at":"2016-08-12 15:26:29 UTC","duration":17.0,"queued_duration":196.0,"failure_reason":"script_failure","when":"on_success","manual":false,"allow_failure":false,"user":{"id":1,"name":"Administrator","username":"root","avatar_url":"http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon","email":"[email protected]"},"runner":{"id":380987,"description":"shared-runners-manager-6.gitlab.com","active":true,"runner_type":"instance_type","is_shared":true,"tags":["linux","docker"]},"artifacts_file":{"filename":null,"size":null},"environment":null},{"id":376,"stage":"build","name":"build-image","status":"success","created_at":"2016-08-12 15:23:28 UTC","started_at":"2016-08-12 15:24:56 UTC","finished_at":"2016-08-12 15:25:26 UTC","duration":17.0,"queued_duration":196.0,"failure_reason":null,"when":"on_success","manual":false,"allow_failure":false,"user":{"id":1,"name":"Administrator","username":"root","avatar_url":"http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon","email":"[email protected]"},"runner":{"id":380987,"description":"shared-runners-manager-6.gitlab.com","active":true,"runner_type":"instance_type","is_shared":true,"tags":["linux","docker"]},"artifacts_file":{"filename":null,"size":null},"environment":null},{"id":379,"stage":"deploy","name":"staging","status":"created","created_at":"2016-08-12 15:23:28 UTC","started_at":null,"finished_at":null,"duration":null,"queued_duration":null,"failure_reason":null,"when":"on_success","manual":false,"allow_failure":false,"user":{"id":1,"name":"Administrator","username":"root","avatar_url":"http://www.gravatar.com/avatar/e32bd13e2add097461cb96824b7a829c?s=80&d=identicon","email":"[email protected]"},"runner":null,"artifacts_file":{"filename":null,"size":null},"environment":{"name":"staging","action":"start","deployment_tier":"staging"}}]}

tinybird/datasources/gitlab_emoji.datasource

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ TAGS "gitlab"
77
SCHEMA >
88
`object_kind` String `json:$.object_kind`,
99
`event_type` String `json:$.event_type`,
10-
`user_id` String `json:$.user.id`,
10+
`user_id` UInt32 `json:$.user.id`,
1111
`user` JSON `json:$.user`,
12-
`project_id` String `json:$.project.id`,
12+
`project_id` UInt32 `json:$.project.id`,
1313
`project` JSON `json:$.project`,
1414
`object_attributes` JSON `json:$.object_attributes`,
1515
`note` JSON `json:$.note` DEFAULT '{}',

tinybird/datasources/gitlab_job.datasource

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ SCHEMA >
2222
`build_allow_failure` Boolean `json:$.build_allow_failure` DEFAULT false,
2323
`build_failure_reason` String `json:$.build_failure_reason` DEFAULT '',
2424
`retries_count` Int32 `json:$.retries_count` DEFAULT 0,
25-
`pipeline_id` String `json:$.pipeline_id` DEFAULT '',
26-
`project_id` String `json:$.project_id`,
25+
`pipeline_id` UInt32 `json:$.pipeline_id` DEFAULT 0,
26+
`project_id` UInt32 `json:$.project_id`,
2727
`project_name` String `json:$.project_name`,
28-
`user_id` String `json:$.user.id`,
28+
`user_id` UInt32 `json:$.user.id`,
2929
`user` JSON `json:$.user`,
3030
`commit` JSON `json:$.commit` DEFAULT '{}',
3131
`repository_name` String `json:$.repository.name`,

tinybird/datasources/gitlab_merge_request.datasource

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ TAGS "gitlab"
77
SCHEMA >
88
`object_kind` String `json:$.object_kind`,
99
`event_type` String `json:$.event_type`,
10-
`user_id` String `json:$.user.id`,
10+
`user_id` UInt32 `json:$.user.id`,
1111
`user` JSON `json:$.user`,
12-
`project_id` String `json:$.project.id`,
12+
`project_id` UInt32 `json:$.project.id`,
1313
`project` JSON `json:$.project`,
1414
`object_attributes` JSON `json:$.object_attributes`,
1515
`repository_name` String `json:$.repository.name`,
1616
`repository` JSON `json:$.repository`,
17-
`assignees` Array(JSON) `json:$.assignees` DEFAULT '[]',
17+
`assignees` Array(JSON) `json:$.assignees[:]` DEFAULT '[]',
1818
`assignee` JSON `json:$.assignee` DEFAULT '{}',
19-
`labels` Array(JSON) `json:$.labels` DEFAULT '[]',
19+
`labels` Array(JSON) `json:$.labels[:]` DEFAULT '[]',
2020
`changes` JSON `json:$.changes` DEFAULT '{}',
21-
`reviewers` Array(JSON) `json:$.reviewers` DEFAULT '[]'
21+
`reviewers` Array(JSON) `json:$.reviewers[:]` DEFAULT '[]'
2222

2323

2424
ENGINE "MergeTree"

tinybird/datasources/gitlab_pipeline.datasource

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ SCHEMA >
88
`object_kind` String `json:$.object_kind`,
99
`object_attributes` JSON `json:$.object_attributes`,
1010
`merge_request` JSON `json:$.merge_request` DEFAULT '{}',
11-
`user_id` String `json:$.user.id`,
11+
`user_id` UInt32 `json:$.user.id`,
1212
`user` JSON `json:$.user`,
13-
`project_id` String `json:$.project.id`,
13+
`project_id` UInt32 `json:$.project.id`,
1414
`project` JSON `json:$.project`,
1515
`commit` JSON `json:$.commit` DEFAULT '{}',
16+
`pipeline_id` UInt32 `json:$.source_pipeline.pipeline_id`,
1617
`source_pipeline` JSON `json:$.source_pipeline` DEFAULT '{}',
17-
`builds` Array(JSON) `json:$.builds` DEFAULT '[]'
18+
`builds` Array(JSON) `json:$.builds[:]` DEFAULT '[]'
1819

1920
ENGINE "MergeTree"
20-
ENGINE_SORTING_KEY "project_id, user_id, source_pipeline"
21+
ENGINE_SORTING_KEY "project_id, pipeline_id, user_id"

tinybird/datasources/gitlab_push.datasource

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ SCHEMA >
1212
`ref` String `json:$.ref`,
1313
`ref_protected` Boolean `json:$.ref_protected`,
1414
`checkout_sha` String `json:$.checkout_sha`,
15-
`user_id` String `json:$.user_id`,
15+
`user_id` UInt32 `json:$.user_id`,
1616
`user_name` String `json:$.user_name`,
1717
`user_username` String `json:$.user_username`,
1818
`user_email` String `json:$.user_email`,
1919
`user_avatar` String `json:$.user_avatar`,
20-
`project_id` String `json:$.project_id`,
20+
`project_id` UInt32 `json:$.project_id`,
2121
`project` JSON `json:$.project` DEFAULT '{}',
2222
`repository_name` String `json:$.repository.name`,
2323
`repository` JSON `json:$.repository` DEFAULT '{}',
24-
`commits` Array(JSON) `json:$.commits` DEFAULT '[]',
24+
`commits` Array(JSON) `json:$.commits[:]` DEFAULT '[]',
2525
`total_commits_count` Int64 `json:$.total_commits_count`
2626

2727
ENGINE "MergeTree"

tinybird/datasources/gitlab_work_item.datasource

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ TAGS "gitlab"
77
SCHEMA >
88
`object_kind` String `json:$.object_kind`,
99
`event_type` String `json:$.event_type`,
10-
`user_id` String `json:$.user.id`,
10+
`user_id` UInt32 `json:$.user.id`,
1111
`user` JSON `json:$.user`,
12-
`project_id` String `json:$.project.id`,
12+
`project_id` UInt32 `json:$.project.id`,
1313
`project` JSON `json:$.project`,
1414
`object_attributes` JSON `json:$.object_attributes`,
1515
`repository_name` String `json:$.repository.name`,
1616
`repository` JSON `json:$.repository`,
17-
`assignees` Array(JSON) `json:$.assignees` DEFAULT '[]',
17+
`assignees` Array(JSON) `json:$.assignees[:]` DEFAULT '[]',
1818
`assignee` JSON `json:$.assignee` DEFAULT '{}',
19-
`labels` Array(JSON) `json:$.labels` DEFAULT '[]',
20-
`changes` JSON `json:$.changes` DEFAULT '{}',
19+
`labels` Array(JSON) `json:$.labels[:]` DEFAULT '[]',
20+
`changes` JSON `json:$.changes` DEFAULT '{}'
2121

2222
ENGINE "MergeTree"
2323
ENGINE_SORTING_KEY "project_id, repository_name, user_id"

0 commit comments

Comments
 (0)