You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/11/09 17:22:03 UTC
[GitHub] [incubator-devlake] warren830 opened a new pull request, #3707: 3699 feature cicd add cicd scope id for taskspipelines
warren830 opened a new pull request, #3707:
URL: https://github.com/apache/incubator-devlake/pull/3707
# Summary
<!--
Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes.
Please fill out as many sections below as possible.
-->
### Does this close any open issues?
Closes xx
### Screenshots
Include any relevant screenshots here.
### Other Information
Any other information that is important to this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] warren830 merged pull request #3707: feat(jenkins): add cicd_scope_id to cicd_tasks and cicd_pipelines
Posted by GitBox <gi...@apache.org>.
warren830 merged PR #3707:
URL: https://github.com/apache/incubator-devlake/pull/3707
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] warren830 commented on a diff in pull request #3707: feat(jenkins): add cicd_scope_id to cicd_tasks and cicd_pipelines
Posted by GitBox <gi...@apache.org>.
warren830 commented on code in PR #3707:
URL: https://github.com/apache/incubator-devlake/pull/3707#discussion_r1018979348
##########
plugins/dora/e2e/snapshot_tables/lake_cicd_tasks.csv:
##########
@@ -1,25 +1,25 @@
-id,name,pipeline_id,result,status,type,environment,duration_sec,started_date,finished_date
-github:GithubJob:1:7773010057,build_deploy,github:GithubRun:1:3022300997,SUCCESS,DONE,,PRODUCTION,57,2022-09-09T12:12:52.000+00:00,2022-09-09T12:13:49.000+00:00
-github:GithubJob:1:7773010060,deployment,github:GithubRun:1:3022301033,SUCCESS,DONE,,PRODUCTION,991,2022-09-09T12:13:58.000+00:00,2022-09-09T12:30:29.000+00:00
-github:GithubJob:1:7773010062,deploy,github:GithubRun:1:3022348786,SUCCESS,DONE,,PRODUCTION,1006,2022-09-09T12:21:30.000+00:00,2022-09-09T12:38:16.000+00:00
-github:GithubJob:1:8269045794,deploy,github:GithubRun:1:3022052551,FAILURE,DONE,DEPLOYMENT,PRODUCTION,72,2022-09-09T11:27:13.000+00:00,2022-09-09T11:28:25.000+00:00
-github:GithubJob:1:8269045795,test (ubuntu-latest),github:GithubRun:1:3022052557,SUCCESS,DONE,DEPLOYMENT,,191,2022-09-09T11:27:42.000+00:00,2022-09-09T11:30:53.000+00:00
-github:GithubJob:1:8269045819,commit-msg,github:GithubRun:1:3022052555,SUCCESS,DONE,DEPLOYMENT,,8,2022-09-09T11:26:38.000+00:00,2022-09-09T11:26:46.000+00:00
-github:GithubJob:1:8269045928,e2e-mysql,github:GithubRun:1:3022052558,SUCCESS,DONE,,,200,2022-09-09T11:28:00.000+00:00,2022-09-09T11:31:20.000+00:00
-github:GithubJob:1:8269046116,check Apache license header,github:GithubRun:1:3022052589,SUCCESS,DONE,,,57,2022-09-09T11:28:34.000+00:00,2022-09-09T11:29:31.000+00:00
-github:GithubJob:1:8269415129,deploy,github:GithubRun:1:3022190519,FAILURE,DONE,,PRODUCTION,84,2022-09-09T11:51:21.000+00:00,2022-09-09T11:52:45.000+00:00
-github:GithubJob:1:8269415130,test (ubuntu-latest),github:GithubRun:1:3022190524,SUCCESS,DONE,,,182,2022-09-09T11:50:31.000+00:00,2022-09-09T11:53:33.000+00:00
-github:GithubJob:1:8269415142,check Apache license header,github:GithubRun:1:3022190525,SUCCESS,DONE,,,63,2022-09-09T11:52:06.000+00:00,2022-09-09T11:53:09.000+00:00
-github:GithubJob:1:8269415165,commit-msg,github:GithubRun:1:3022190521,SUCCESS,DONE,,,10,2022-09-09T11:52:46.000+00:00,2022-09-09T11:52:56.000+00:00
-github:GithubJob:1:8269415315,deployment,github:GithubRun:1:3022190520,SUCCESS,DONE,,PRODUCTION,242,2022-09-09T11:53:45.000+00:00,2022-09-09T11:57:47.000+00:00
-github:GithubJob:1:8269598312,e2e-mysql,github:GithubRun:1:3022255519,SUCCESS,DONE,,,828,2022-09-09T12:05:04.000+00:00,2022-09-09T12:18:52.000+00:00
-github:GithubJob:1:8269598316,test (ubuntu-latest),github:GithubRun:1:3022255511,SUCCESS,DONE,,,1016,2022-09-09T12:05:49.000+00:00,2022-09-09T12:22:45.000+00:00
-github:GithubJob:1:8269598318,lint,github:GithubRun:1:3022255516,FAILURE,DONE,,,62,2022-09-09T12:02:28.000+00:00,2022-09-09T12:03:30.000+00:00
-github:GithubJob:1:8269598325,check Apache license header,github:GithubRun:1:3022255517,SUCCESS,DONE,,,52,2022-09-09T12:03:51.000+00:00,2022-09-09T12:04:43.000+00:00
-github:GithubJob:1:8269598469,commit-msg,github:GithubRun:1:3022255524,FAILURE,DONE,,,41,2022-09-09T12:06:55.000+00:00,2022-09-09T12:07:36.000+00:00
-github:GithubJob:1:8269729324,e2e-mysql,github:GithubRun:1:3022300995,SUCCESS,DONE,,,1007,2022-09-09T12:10:08.000+00:00,2022-09-09T12:26:55.000+00:00
-github:GithubJob:1:8269729327,xx_deploy_xx,github:GithubRun:1:3022301001,FAILURE,DONE,,PRODUCTION,82,2022-09-09T12:11:22.000+00:00,2022-09-09T12:12:44.000+00:00
-github:GithubJob:1:8269729550,build_deployment,github:GithubRun:1:3022301007,SUCCESS,DONE,,PRODUCTION,6,2022-09-09T12:12:02.000+00:00,2022-09-09T12:12:08.000+00:00
-github:GithubJob:1:8269729553,build_deploy,github:GithubRun:1:3022300997,SUCCESS,DONE,,PRODUCTION,57,2022-09-09T12:12:52.000+00:00,2022-09-09T12:13:49.000+00:00
-github:GithubJob:1:8269729821,deployment,github:GithubRun:1:3022301033,SUCCESS,DONE,,PRODUCTION,991,2022-09-09T12:13:58.000+00:00,2022-09-09T12:30:29.000+00:00
-github:GithubJob:1:8269872730,deploy,github:GithubRun:1:3022348786,SUCCESS,DONE,,PRODUCTION,1006,2022-09-09T12:21:30.000+00:00,2022-09-09T12:38:16.000+00:00
+id,name,pipeline_id,result,status,type,environment,duration_sec,started_date,finished_date,cicd_scope_id
+github:GithubJob:1:7773010057,build_deploy,github:GithubRun:1:3022300997,SUCCESS,DONE,,PRODUCTION,57,2022-09-09T12:12:52.000+00:00,2022-09-09T12:13:49.000+00:00,
Review Comment:
because we haven't changed dora yet
##########
plugins/jenkins/e2e/jobs_test.go:
##########
@@ -62,4 +64,24 @@ func TestJenkinsJobsDataFlow(t *testing.T) {
"primary_view",
),
)
+
+ // verify extraction
+ dataflowTester.FlushTabler(&devops.CicdScope{})
+ dataflowTester.Subtask(tasks.ExtractApiJobsMeta, taskData)
Review Comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] warren830 commented on a diff in pull request #3707: feat(jenkins): add cicd_scope_id to cicd_tasks and cicd_pipelines
Posted by GitBox <gi...@apache.org>.
warren830 commented on code in PR #3707:
URL: https://github.com/apache/incubator-devlake/pull/3707#discussion_r1018979599
##########
plugins/jenkins/models/migrationscripts/20221110_change_index_of_job_path.go:
##########
@@ -0,0 +1,105 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package migrationscripts
+
+import (
+ "github.com/apache/incubator-devlake/errors"
+ "github.com/apache/incubator-devlake/helpers/migrationhelper"
+ "github.com/apache/incubator-devlake/models/migrationscripts/archived"
+ "github.com/apache/incubator-devlake/plugins/core"
+)
+
+type changeIndexOfJobPath struct{}
+
+type jenkinsJob20221110Before struct {
+ ConnectionId uint64 `gorm:"primaryKey"`
+ FullName string `gorm:"primaryKey;type:varchar(255)"`
+ Name string `gorm:"index;type:varchar(255)"`
+ Path string `gorm:"primaryKey;type:varchar(511)"`
+ Class string `gorm:"type:varchar(255)"`
+ Color string `gorm:"type:varchar(255)"`
+ Base string `gorm:"type:varchar(255)"`
+ Url string
+ Description string
+ PrimaryView string `gorm:"type:varchar(255)"`
+ archived.NoPKModel
+}
+
+func (jenkinsJob20221110Before) TableName() string {
+ return "_tool_jenkins_jobs"
+}
+
+type jenkinsJob20221110After struct {
+ ConnectionId uint64 `gorm:"primaryKey"`
+ FullName string `gorm:"primaryKey;type:varchar(255)"`
+ Name string `gorm:"index;type:varchar(255)"`
+ Path string `gorm:"index;type:varchar(511)"`
+ Class string `gorm:"type:varchar(255)"`
+ Color string `gorm:"type:varchar(255)"`
+ Base string `gorm:"type:varchar(255)"`
+ Url string
+ Description string
+ PrimaryView string `gorm:"type:varchar(255)"`
+ archived.NoPKModel
+}
+
+func (jenkinsJob20221110After) TableName() string {
+ return "_tool_jenkins_jobs"
+}
+
+func (script *changeIndexOfJobPath) Up(basicRes core.BasicRes) errors.Error {
+ db := basicRes.GetDal()
+ err := db.RenameTable("_tool_jenkins_jobs", "tmp_tool_jenkins_jobs")
+ if err != nil {
+ return err
+ }
+ err = db.AutoMigrate(&jenkinsJob20221108{})
Review Comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] likyh commented on a diff in pull request #3707: feat(jenkins): add cicd_scope_id to cicd_tasks and cicd_pipelines
Posted by GitBox <gi...@apache.org>.
likyh commented on code in PR #3707:
URL: https://github.com/apache/incubator-devlake/pull/3707#discussion_r1018978800
##########
plugins/dora/e2e/snapshot_tables/lake_cicd_tasks.csv:
##########
@@ -1,25 +1,25 @@
-id,name,pipeline_id,result,status,type,environment,duration_sec,started_date,finished_date
-github:GithubJob:1:7773010057,build_deploy,github:GithubRun:1:3022300997,SUCCESS,DONE,,PRODUCTION,57,2022-09-09T12:12:52.000+00:00,2022-09-09T12:13:49.000+00:00
-github:GithubJob:1:7773010060,deployment,github:GithubRun:1:3022301033,SUCCESS,DONE,,PRODUCTION,991,2022-09-09T12:13:58.000+00:00,2022-09-09T12:30:29.000+00:00
-github:GithubJob:1:7773010062,deploy,github:GithubRun:1:3022348786,SUCCESS,DONE,,PRODUCTION,1006,2022-09-09T12:21:30.000+00:00,2022-09-09T12:38:16.000+00:00
-github:GithubJob:1:8269045794,deploy,github:GithubRun:1:3022052551,FAILURE,DONE,DEPLOYMENT,PRODUCTION,72,2022-09-09T11:27:13.000+00:00,2022-09-09T11:28:25.000+00:00
-github:GithubJob:1:8269045795,test (ubuntu-latest),github:GithubRun:1:3022052557,SUCCESS,DONE,DEPLOYMENT,,191,2022-09-09T11:27:42.000+00:00,2022-09-09T11:30:53.000+00:00
-github:GithubJob:1:8269045819,commit-msg,github:GithubRun:1:3022052555,SUCCESS,DONE,DEPLOYMENT,,8,2022-09-09T11:26:38.000+00:00,2022-09-09T11:26:46.000+00:00
-github:GithubJob:1:8269045928,e2e-mysql,github:GithubRun:1:3022052558,SUCCESS,DONE,,,200,2022-09-09T11:28:00.000+00:00,2022-09-09T11:31:20.000+00:00
-github:GithubJob:1:8269046116,check Apache license header,github:GithubRun:1:3022052589,SUCCESS,DONE,,,57,2022-09-09T11:28:34.000+00:00,2022-09-09T11:29:31.000+00:00
-github:GithubJob:1:8269415129,deploy,github:GithubRun:1:3022190519,FAILURE,DONE,,PRODUCTION,84,2022-09-09T11:51:21.000+00:00,2022-09-09T11:52:45.000+00:00
-github:GithubJob:1:8269415130,test (ubuntu-latest),github:GithubRun:1:3022190524,SUCCESS,DONE,,,182,2022-09-09T11:50:31.000+00:00,2022-09-09T11:53:33.000+00:00
-github:GithubJob:1:8269415142,check Apache license header,github:GithubRun:1:3022190525,SUCCESS,DONE,,,63,2022-09-09T11:52:06.000+00:00,2022-09-09T11:53:09.000+00:00
-github:GithubJob:1:8269415165,commit-msg,github:GithubRun:1:3022190521,SUCCESS,DONE,,,10,2022-09-09T11:52:46.000+00:00,2022-09-09T11:52:56.000+00:00
-github:GithubJob:1:8269415315,deployment,github:GithubRun:1:3022190520,SUCCESS,DONE,,PRODUCTION,242,2022-09-09T11:53:45.000+00:00,2022-09-09T11:57:47.000+00:00
-github:GithubJob:1:8269598312,e2e-mysql,github:GithubRun:1:3022255519,SUCCESS,DONE,,,828,2022-09-09T12:05:04.000+00:00,2022-09-09T12:18:52.000+00:00
-github:GithubJob:1:8269598316,test (ubuntu-latest),github:GithubRun:1:3022255511,SUCCESS,DONE,,,1016,2022-09-09T12:05:49.000+00:00,2022-09-09T12:22:45.000+00:00
-github:GithubJob:1:8269598318,lint,github:GithubRun:1:3022255516,FAILURE,DONE,,,62,2022-09-09T12:02:28.000+00:00,2022-09-09T12:03:30.000+00:00
-github:GithubJob:1:8269598325,check Apache license header,github:GithubRun:1:3022255517,SUCCESS,DONE,,,52,2022-09-09T12:03:51.000+00:00,2022-09-09T12:04:43.000+00:00
-github:GithubJob:1:8269598469,commit-msg,github:GithubRun:1:3022255524,FAILURE,DONE,,,41,2022-09-09T12:06:55.000+00:00,2022-09-09T12:07:36.000+00:00
-github:GithubJob:1:8269729324,e2e-mysql,github:GithubRun:1:3022300995,SUCCESS,DONE,,,1007,2022-09-09T12:10:08.000+00:00,2022-09-09T12:26:55.000+00:00
-github:GithubJob:1:8269729327,xx_deploy_xx,github:GithubRun:1:3022301001,FAILURE,DONE,,PRODUCTION,82,2022-09-09T12:11:22.000+00:00,2022-09-09T12:12:44.000+00:00
-github:GithubJob:1:8269729550,build_deployment,github:GithubRun:1:3022301007,SUCCESS,DONE,,PRODUCTION,6,2022-09-09T12:12:02.000+00:00,2022-09-09T12:12:08.000+00:00
-github:GithubJob:1:8269729553,build_deploy,github:GithubRun:1:3022300997,SUCCESS,DONE,,PRODUCTION,57,2022-09-09T12:12:52.000+00:00,2022-09-09T12:13:49.000+00:00
-github:GithubJob:1:8269729821,deployment,github:GithubRun:1:3022301033,SUCCESS,DONE,,PRODUCTION,991,2022-09-09T12:13:58.000+00:00,2022-09-09T12:30:29.000+00:00
-github:GithubJob:1:8269872730,deploy,github:GithubRun:1:3022348786,SUCCESS,DONE,,PRODUCTION,1006,2022-09-09T12:21:30.000+00:00,2022-09-09T12:38:16.000+00:00
+id,name,pipeline_id,result,status,type,environment,duration_sec,started_date,finished_date,cicd_scope_id
+github:GithubJob:1:7773010057,build_deploy,github:GithubRun:1:3022300997,SUCCESS,DONE,,PRODUCTION,57,2022-09-09T12:12:52.000+00:00,2022-09-09T12:13:49.000+00:00,
Review Comment:
Does Dora need filter by cicd_scope_id ?
##########
plugins/dora/e2e/snapshot_tables/lake_cicd_tasks.csv:
##########
@@ -1,25 +1,25 @@
-id,name,pipeline_id,result,status,type,environment,duration_sec,started_date,finished_date
-github:GithubJob:1:7773010057,build_deploy,github:GithubRun:1:3022300997,SUCCESS,DONE,,PRODUCTION,57,2022-09-09T12:12:52.000+00:00,2022-09-09T12:13:49.000+00:00
-github:GithubJob:1:7773010060,deployment,github:GithubRun:1:3022301033,SUCCESS,DONE,,PRODUCTION,991,2022-09-09T12:13:58.000+00:00,2022-09-09T12:30:29.000+00:00
-github:GithubJob:1:7773010062,deploy,github:GithubRun:1:3022348786,SUCCESS,DONE,,PRODUCTION,1006,2022-09-09T12:21:30.000+00:00,2022-09-09T12:38:16.000+00:00
-github:GithubJob:1:8269045794,deploy,github:GithubRun:1:3022052551,FAILURE,DONE,DEPLOYMENT,PRODUCTION,72,2022-09-09T11:27:13.000+00:00,2022-09-09T11:28:25.000+00:00
-github:GithubJob:1:8269045795,test (ubuntu-latest),github:GithubRun:1:3022052557,SUCCESS,DONE,DEPLOYMENT,,191,2022-09-09T11:27:42.000+00:00,2022-09-09T11:30:53.000+00:00
-github:GithubJob:1:8269045819,commit-msg,github:GithubRun:1:3022052555,SUCCESS,DONE,DEPLOYMENT,,8,2022-09-09T11:26:38.000+00:00,2022-09-09T11:26:46.000+00:00
-github:GithubJob:1:8269045928,e2e-mysql,github:GithubRun:1:3022052558,SUCCESS,DONE,,,200,2022-09-09T11:28:00.000+00:00,2022-09-09T11:31:20.000+00:00
-github:GithubJob:1:8269046116,check Apache license header,github:GithubRun:1:3022052589,SUCCESS,DONE,,,57,2022-09-09T11:28:34.000+00:00,2022-09-09T11:29:31.000+00:00
-github:GithubJob:1:8269415129,deploy,github:GithubRun:1:3022190519,FAILURE,DONE,,PRODUCTION,84,2022-09-09T11:51:21.000+00:00,2022-09-09T11:52:45.000+00:00
-github:GithubJob:1:8269415130,test (ubuntu-latest),github:GithubRun:1:3022190524,SUCCESS,DONE,,,182,2022-09-09T11:50:31.000+00:00,2022-09-09T11:53:33.000+00:00
-github:GithubJob:1:8269415142,check Apache license header,github:GithubRun:1:3022190525,SUCCESS,DONE,,,63,2022-09-09T11:52:06.000+00:00,2022-09-09T11:53:09.000+00:00
-github:GithubJob:1:8269415165,commit-msg,github:GithubRun:1:3022190521,SUCCESS,DONE,,,10,2022-09-09T11:52:46.000+00:00,2022-09-09T11:52:56.000+00:00
-github:GithubJob:1:8269415315,deployment,github:GithubRun:1:3022190520,SUCCESS,DONE,,PRODUCTION,242,2022-09-09T11:53:45.000+00:00,2022-09-09T11:57:47.000+00:00
-github:GithubJob:1:8269598312,e2e-mysql,github:GithubRun:1:3022255519,SUCCESS,DONE,,,828,2022-09-09T12:05:04.000+00:00,2022-09-09T12:18:52.000+00:00
-github:GithubJob:1:8269598316,test (ubuntu-latest),github:GithubRun:1:3022255511,SUCCESS,DONE,,,1016,2022-09-09T12:05:49.000+00:00,2022-09-09T12:22:45.000+00:00
-github:GithubJob:1:8269598318,lint,github:GithubRun:1:3022255516,FAILURE,DONE,,,62,2022-09-09T12:02:28.000+00:00,2022-09-09T12:03:30.000+00:00
-github:GithubJob:1:8269598325,check Apache license header,github:GithubRun:1:3022255517,SUCCESS,DONE,,,52,2022-09-09T12:03:51.000+00:00,2022-09-09T12:04:43.000+00:00
-github:GithubJob:1:8269598469,commit-msg,github:GithubRun:1:3022255524,FAILURE,DONE,,,41,2022-09-09T12:06:55.000+00:00,2022-09-09T12:07:36.000+00:00
-github:GithubJob:1:8269729324,e2e-mysql,github:GithubRun:1:3022300995,SUCCESS,DONE,,,1007,2022-09-09T12:10:08.000+00:00,2022-09-09T12:26:55.000+00:00
-github:GithubJob:1:8269729327,xx_deploy_xx,github:GithubRun:1:3022301001,FAILURE,DONE,,PRODUCTION,82,2022-09-09T12:11:22.000+00:00,2022-09-09T12:12:44.000+00:00
-github:GithubJob:1:8269729550,build_deployment,github:GithubRun:1:3022301007,SUCCESS,DONE,,PRODUCTION,6,2022-09-09T12:12:02.000+00:00,2022-09-09T12:12:08.000+00:00
-github:GithubJob:1:8269729553,build_deploy,github:GithubRun:1:3022300997,SUCCESS,DONE,,PRODUCTION,57,2022-09-09T12:12:52.000+00:00,2022-09-09T12:13:49.000+00:00
-github:GithubJob:1:8269729821,deployment,github:GithubRun:1:3022301033,SUCCESS,DONE,,PRODUCTION,991,2022-09-09T12:13:58.000+00:00,2022-09-09T12:30:29.000+00:00
-github:GithubJob:1:8269872730,deploy,github:GithubRun:1:3022348786,SUCCESS,DONE,,PRODUCTION,1006,2022-09-09T12:21:30.000+00:00,2022-09-09T12:38:16.000+00:00
+id,name,pipeline_id,result,status,type,environment,duration_sec,started_date,finished_date,cicd_scope_id
+github:GithubJob:1:7773010057,build_deploy,github:GithubRun:1:3022300997,SUCCESS,DONE,,PRODUCTION,57,2022-09-09T12:12:52.000+00:00,2022-09-09T12:13:49.000+00:00,
Review Comment:
Does Dora need to filter data by cicd_scope_id?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] likyh commented on a diff in pull request #3707: feat(jenkins): add cicd_scope_id to cicd_tasks and cicd_pipelines
Posted by GitBox <gi...@apache.org>.
likyh commented on code in PR #3707:
URL: https://github.com/apache/incubator-devlake/pull/3707#discussion_r1018969828
##########
plugins/jenkins/e2e/jobs_test.go:
##########
@@ -62,4 +64,24 @@ func TestJenkinsJobsDataFlow(t *testing.T) {
"primary_view",
),
)
+
+ // verify extraction
+ dataflowTester.FlushTabler(&devops.CicdScope{})
+ dataflowTester.Subtask(tasks.ExtractApiJobsMeta, taskData)
Review Comment:
why duplicate this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] likyh commented on a diff in pull request #3707: feat(jenkins): add cicd_scope_id to cicd_tasks and cicd_pipelines
Posted by GitBox <gi...@apache.org>.
likyh commented on code in PR #3707:
URL: https://github.com/apache/incubator-devlake/pull/3707#discussion_r1018974356
##########
plugins/dora/e2e/snapshot_tables/lake_cicd_tasks.csv:
##########
@@ -1,25 +1,25 @@
-id,name,pipeline_id,result,status,type,environment,duration_sec,started_date,finished_date
-github:GithubJob:1:7773010057,build_deploy,github:GithubRun:1:3022300997,SUCCESS,DONE,,PRODUCTION,57,2022-09-09T12:12:52.000+00:00,2022-09-09T12:13:49.000+00:00
-github:GithubJob:1:7773010060,deployment,github:GithubRun:1:3022301033,SUCCESS,DONE,,PRODUCTION,991,2022-09-09T12:13:58.000+00:00,2022-09-09T12:30:29.000+00:00
-github:GithubJob:1:7773010062,deploy,github:GithubRun:1:3022348786,SUCCESS,DONE,,PRODUCTION,1006,2022-09-09T12:21:30.000+00:00,2022-09-09T12:38:16.000+00:00
-github:GithubJob:1:8269045794,deploy,github:GithubRun:1:3022052551,FAILURE,DONE,DEPLOYMENT,PRODUCTION,72,2022-09-09T11:27:13.000+00:00,2022-09-09T11:28:25.000+00:00
-github:GithubJob:1:8269045795,test (ubuntu-latest),github:GithubRun:1:3022052557,SUCCESS,DONE,DEPLOYMENT,,191,2022-09-09T11:27:42.000+00:00,2022-09-09T11:30:53.000+00:00
-github:GithubJob:1:8269045819,commit-msg,github:GithubRun:1:3022052555,SUCCESS,DONE,DEPLOYMENT,,8,2022-09-09T11:26:38.000+00:00,2022-09-09T11:26:46.000+00:00
-github:GithubJob:1:8269045928,e2e-mysql,github:GithubRun:1:3022052558,SUCCESS,DONE,,,200,2022-09-09T11:28:00.000+00:00,2022-09-09T11:31:20.000+00:00
-github:GithubJob:1:8269046116,check Apache license header,github:GithubRun:1:3022052589,SUCCESS,DONE,,,57,2022-09-09T11:28:34.000+00:00,2022-09-09T11:29:31.000+00:00
-github:GithubJob:1:8269415129,deploy,github:GithubRun:1:3022190519,FAILURE,DONE,,PRODUCTION,84,2022-09-09T11:51:21.000+00:00,2022-09-09T11:52:45.000+00:00
-github:GithubJob:1:8269415130,test (ubuntu-latest),github:GithubRun:1:3022190524,SUCCESS,DONE,,,182,2022-09-09T11:50:31.000+00:00,2022-09-09T11:53:33.000+00:00
-github:GithubJob:1:8269415142,check Apache license header,github:GithubRun:1:3022190525,SUCCESS,DONE,,,63,2022-09-09T11:52:06.000+00:00,2022-09-09T11:53:09.000+00:00
-github:GithubJob:1:8269415165,commit-msg,github:GithubRun:1:3022190521,SUCCESS,DONE,,,10,2022-09-09T11:52:46.000+00:00,2022-09-09T11:52:56.000+00:00
-github:GithubJob:1:8269415315,deployment,github:GithubRun:1:3022190520,SUCCESS,DONE,,PRODUCTION,242,2022-09-09T11:53:45.000+00:00,2022-09-09T11:57:47.000+00:00
-github:GithubJob:1:8269598312,e2e-mysql,github:GithubRun:1:3022255519,SUCCESS,DONE,,,828,2022-09-09T12:05:04.000+00:00,2022-09-09T12:18:52.000+00:00
-github:GithubJob:1:8269598316,test (ubuntu-latest),github:GithubRun:1:3022255511,SUCCESS,DONE,,,1016,2022-09-09T12:05:49.000+00:00,2022-09-09T12:22:45.000+00:00
-github:GithubJob:1:8269598318,lint,github:GithubRun:1:3022255516,FAILURE,DONE,,,62,2022-09-09T12:02:28.000+00:00,2022-09-09T12:03:30.000+00:00
-github:GithubJob:1:8269598325,check Apache license header,github:GithubRun:1:3022255517,SUCCESS,DONE,,,52,2022-09-09T12:03:51.000+00:00,2022-09-09T12:04:43.000+00:00
-github:GithubJob:1:8269598469,commit-msg,github:GithubRun:1:3022255524,FAILURE,DONE,,,41,2022-09-09T12:06:55.000+00:00,2022-09-09T12:07:36.000+00:00
-github:GithubJob:1:8269729324,e2e-mysql,github:GithubRun:1:3022300995,SUCCESS,DONE,,,1007,2022-09-09T12:10:08.000+00:00,2022-09-09T12:26:55.000+00:00
-github:GithubJob:1:8269729327,xx_deploy_xx,github:GithubRun:1:3022301001,FAILURE,DONE,,PRODUCTION,82,2022-09-09T12:11:22.000+00:00,2022-09-09T12:12:44.000+00:00
-github:GithubJob:1:8269729550,build_deployment,github:GithubRun:1:3022301007,SUCCESS,DONE,,PRODUCTION,6,2022-09-09T12:12:02.000+00:00,2022-09-09T12:12:08.000+00:00
-github:GithubJob:1:8269729553,build_deploy,github:GithubRun:1:3022300997,SUCCESS,DONE,,PRODUCTION,57,2022-09-09T12:12:52.000+00:00,2022-09-09T12:13:49.000+00:00
-github:GithubJob:1:8269729821,deployment,github:GithubRun:1:3022301033,SUCCESS,DONE,,PRODUCTION,991,2022-09-09T12:13:58.000+00:00,2022-09-09T12:30:29.000+00:00
-github:GithubJob:1:8269872730,deploy,github:GithubRun:1:3022348786,SUCCESS,DONE,,PRODUCTION,1006,2022-09-09T12:21:30.000+00:00,2022-09-09T12:38:16.000+00:00
+id,name,pipeline_id,result,status,type,environment,duration_sec,started_date,finished_date,cicd_scope_id
+github:GithubJob:1:7773010057,build_deploy,github:GithubRun:1:3022300997,SUCCESS,DONE,,PRODUCTION,57,2022-09-09T12:12:52.000+00:00,2022-09-09T12:13:49.000+00:00,
Review Comment:
why `cicd_scope_id` is empty here? not extract this column?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-devlake] likyh commented on a diff in pull request #3707: feat(jenkins): add cicd_scope_id to cicd_tasks and cicd_pipelines
Posted by GitBox <gi...@apache.org>.
likyh commented on code in PR #3707:
URL: https://github.com/apache/incubator-devlake/pull/3707#discussion_r1018972851
##########
plugins/jenkins/models/migrationscripts/20221110_change_index_of_job_path.go:
##########
@@ -0,0 +1,105 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package migrationscripts
+
+import (
+ "github.com/apache/incubator-devlake/errors"
+ "github.com/apache/incubator-devlake/helpers/migrationhelper"
+ "github.com/apache/incubator-devlake/models/migrationscripts/archived"
+ "github.com/apache/incubator-devlake/plugins/core"
+)
+
+type changeIndexOfJobPath struct{}
+
+type jenkinsJob20221110Before struct {
+ ConnectionId uint64 `gorm:"primaryKey"`
+ FullName string `gorm:"primaryKey;type:varchar(255)"`
+ Name string `gorm:"index;type:varchar(255)"`
+ Path string `gorm:"primaryKey;type:varchar(511)"`
+ Class string `gorm:"type:varchar(255)"`
+ Color string `gorm:"type:varchar(255)"`
+ Base string `gorm:"type:varchar(255)"`
+ Url string
+ Description string
+ PrimaryView string `gorm:"type:varchar(255)"`
+ archived.NoPKModel
+}
+
+func (jenkinsJob20221110Before) TableName() string {
+ return "_tool_jenkins_jobs"
+}
+
+type jenkinsJob20221110After struct {
+ ConnectionId uint64 `gorm:"primaryKey"`
+ FullName string `gorm:"primaryKey;type:varchar(255)"`
+ Name string `gorm:"index;type:varchar(255)"`
+ Path string `gorm:"index;type:varchar(511)"`
+ Class string `gorm:"type:varchar(255)"`
+ Color string `gorm:"type:varchar(255)"`
+ Base string `gorm:"type:varchar(255)"`
+ Url string
+ Description string
+ PrimaryView string `gorm:"type:varchar(255)"`
+ archived.NoPKModel
+}
+
+func (jenkinsJob20221110After) TableName() string {
+ return "_tool_jenkins_jobs"
+}
+
+func (script *changeIndexOfJobPath) Up(basicRes core.BasicRes) errors.Error {
+ db := basicRes.GetDal()
+ err := db.RenameTable("_tool_jenkins_jobs", "tmp_tool_jenkins_jobs")
+ if err != nil {
+ return err
+ }
+ err = db.AutoMigrate(&jenkinsJob20221108{})
Review Comment:
why migrate model not in this file?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org