This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch release-v0.20
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v0.20 by this push:
new 19c6ec0a6 fix: github deployment status active and inactive should be
treated as success (#6875)
19c6ec0a6 is described below
commit 19c6ec0a6e213fa10cfe82ed744b3ad075cd2093
Author: Klesh Wong <[email protected]>
AuthorDate: Fri Jan 26 10:32:03 2024 +0800
fix: github deployment status active and inactive should be treated as
success (#6875)
---
.../github/e2e/snapshot_tables/cicd_deployment_commits.csv | 8 ++++----
backend/plugins/github/e2e/snapshot_tables/cicd_deployments.csv | 8 ++++----
backend/plugins/github/tasks/deployment_convertor.go | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git
a/backend/plugins/github/e2e/snapshot_tables/cicd_deployment_commits.csv
b/backend/plugins/github/e2e/snapshot_tables/cicd_deployment_commits.csv
index ea9c58465..3eda03ab8 100644
--- a/backend/plugins/github/e2e/snapshot_tables/cicd_deployment_commits.csv
+++ b/backend/plugins/github/e2e/snapshot_tables/cicd_deployment_commits.csv
@@ -1,12 +1,12 @@
id,commit_sha,cicd_scope_id,cicd_deployment_id,name,result,status,environment,created_date,started_date,finished_date,duration_sec,ref_name,repo_id,repo_url,prev_success_deployment_commit_id
-github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDcyNjE5N5==,f3f308ffaf23b98d2cf0ea34d7065a690a6560da,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDcyNjE5N5==,f3f308ffaf23b98d2cf0ea34d7065a690a6560da,,IN_PROGRESS,github-pages,2017-06-14T23:19:10.000+00:00,2017-06-14T23:19:10.000+00:00,2017-06-14T23:19:10.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDE4NjU5N1==,c22c398cec3f6a0e75a806c369dc6cc92addf598,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDE4NjU5N1==,c22c398cec3f6a0e75a806c369dc6cc92addf598,SUCCESS,DONE,github-pages,2017-06-09T23:06:33.000+00:00,2017-06-09T23:06:33.000+00:00,2017-06-09T23:06:33.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
-github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDgwMzcwN6==,b1e6227e675aae6e62b40803f06be690031cb145,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDgwMzcwN6==,b1e6227e675aae6e62b40803f06be690031cb145,,IN_PROGRESS,github-pages,2017-06-15T14:56:14.000+00:00,2017-06-15T14:56:14.000+00:00,2017-06-15T14:56:14.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDU0Mzg3N2==,e4a9af594f75c1077f8c0e7ff99b1841f5fcae65,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDU0Mzg3N2==,e4a9af594f75c1077f8c0e7ff99b1841f5fcae65,FAILURE,DONE,github-pages,2017-06-13T14:42:26.000+00:00,2017-06-13T14:42:26.000+00:00,2017-06-13T14:42:26.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDU2Mjg4M3==,dc204718f0e4596b6c13fe3de7cfdeaf3905a50d,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDU2Mjg4M3==,dc204718f0e4596b6c13fe3de7cfdeaf3905a50d,FAILURE,DONE,github-pages,2017-06-13T17:19:09.000+00:00,2017-06-13T17:19:09.000+00:00,2017-06-13T17:19:09.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDU5NTY0N4==,e7020c61065fb95b591bd06a3f79bf95d505e0d1,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDU5NTY0N4==,e7020c61065fb95b591bd06a3f79bf95d505e0d1,,IN_PROGRESS,github-pages,2017-06-13T23:05:35.000+00:00,2017-06-13T23:05:35.000+00:00,2017-06-13T23:05:35.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
+github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDcyNjE5N5==,f3f308ffaf23b98d2cf0ea34d7065a690a6560da,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDcyNjE5N5==,f3f308ffaf23b98d2cf0ea34d7065a690a6560da,,IN_PROGRESS,github-pages,2017-06-14T23:19:10.000+00:00,2017-06-14T23:19:10.000+00:00,2017-06-14T23:19:10.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
+github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDgwMzcwN6==,b1e6227e675aae6e62b40803f06be690031cb145,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDgwMzcwN6==,b1e6227e675aae6e62b40803f06be690031cb145,,IN_PROGRESS,github-pages,2017-06-15T14:56:14.000+00:00,2017-06-15T14:56:14.000+00:00,2017-06-15T14:56:14.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MjAwMzE5M7==,7bc32d9148e612b54c1909ecf56a62a08cb7b0e7,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MjAwMzE5M7==,7bc32d9148e612b54c1909ecf56a62a08cb7b0e7,,IN_PROGRESS,github-pages,2017-06-26T18:03:49.000+00:00,2017-06-26T18:03:49.000+00:00,2017-06-26T18:03:49.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MjM3NTU0M8==,6941c84de27d8a306510af3a03812b26ec421725,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MjM3NTU0M8==,6941c84de27d8a306510af3a03812b26ec421725,,OTHER,github-pages,2017-06-29T15:13:53.000+00:00,2017-06-29T15:13:53.000+00:00,2017-06-29T15:13:53.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
-github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MzY0MzQ1N9==,5f0258bc04265e1f46e5eb7f685d91a0a7075031,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MzY0MzQ1N9==,5f0258bc04265e1f46e5eb7f685d91a0a7075031,,OTHER,github-pages,2017-07-11T13:09:32.000+00:00,2017-07-11T13:09:32.000+00:00,2017-07-11T13:09:32.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
-github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0NTQ3OTQ4O0==,0be0c9ca727d106f85f126cf8beb10a6843af352,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0NTQ3OTQ4O0==,0be0c9ca727d106f85f126cf8beb10a6843af352,,OTHER,github-pages,2017-07-26T19:43:48.000+00:00,2017-07-26T19:43:48.000+00:00,2017-07-26T19:43:48.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
+github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MzY0MzQ1N9==,5f0258bc04265e1f46e5eb7f685d91a0a7075031,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MzY0MzQ1N9==,5f0258bc04265e1f46e5eb7f685d91a0a7075031,SUCCESS,DONE,github-pages,2017-07-11T13:09:32.000+00:00,2017-07-11T13:09:32.000+00:00,2017-07-11T13:09:32.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
+github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0NTQ3OTQ4O0==,0be0c9ca727d106f85f126cf8beb10a6843af352,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0NTQ3OTQ4O0==,0be0c9ca727d106f85f126cf8beb10a6843af352,SUCCESS,DONE,github-pages,2017-07-26T19:43:48.000+00:00,2017-07-26T19:43:48.000+00:00,2017-07-26T19:43:48.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0NTQ4MDI010==,8faba4cb2f03fa56ab6671d58f46d44622f36561,github:GithubRepo:1:134018330,github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0NTQ4MDI010==,8faba4cb2f03fa56ab6671d58f46d44622f36561,,OTHER,github-pages,2017-07-26T19:50:31.000+00:00,2017-07-26T19:50:31.000+00:00,2017-07-26T19:50:31.000+00:00,0,,github:GithubRepo:1:134018330,https://github.com/panjf2000/ants,
diff --git a/backend/plugins/github/e2e/snapshot_tables/cicd_deployments.csv
b/backend/plugins/github/e2e/snapshot_tables/cicd_deployments.csv
index 3b9d5ad30..809b956b7 100644
--- a/backend/plugins/github/e2e/snapshot_tables/cicd_deployments.csv
+++ b/backend/plugins/github/e2e/snapshot_tables/cicd_deployments.csv
@@ -1,12 +1,12 @@
id,cicd_scope_id,name,result,status,environment,created_date,started_date,finished_date,duration_sec
-github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDcyNjE5N5==,github:GithubRepo:1:134018330,f3f308ffaf23b98d2cf0ea34d7065a690a6560da,,IN_PROGRESS,github-pages,2017-06-14T23:19:10.000+00:00,2017-06-14T23:19:10.000+00:00,2017-06-14T23:19:10.000+00:00,0
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDE4NjU5N1==,github:GithubRepo:1:134018330,c22c398cec3f6a0e75a806c369dc6cc92addf598,SUCCESS,DONE,github-pages,2017-06-09T23:06:33.000+00:00,2017-06-09T23:06:33.000+00:00,2017-06-09T23:06:33.000+00:00,0
-github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDgwMzcwN6==,github:GithubRepo:1:134018330,b1e6227e675aae6e62b40803f06be690031cb145,,IN_PROGRESS,github-pages,2017-06-15T14:56:14.000+00:00,2017-06-15T14:56:14.000+00:00,2017-06-15T14:56:14.000+00:00,0
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDU0Mzg3N2==,github:GithubRepo:1:134018330,e4a9af594f75c1077f8c0e7ff99b1841f5fcae65,FAILURE,DONE,github-pages,2017-06-13T14:42:26.000+00:00,2017-06-13T14:42:26.000+00:00,2017-06-13T14:42:26.000+00:00,0
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDU2Mjg4M3==,github:GithubRepo:1:134018330,dc204718f0e4596b6c13fe3de7cfdeaf3905a50d,FAILURE,DONE,github-pages,2017-06-13T17:19:09.000+00:00,2017-06-13T17:19:09.000+00:00,2017-06-13T17:19:09.000+00:00,0
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDU5NTY0N4==,github:GithubRepo:1:134018330,e7020c61065fb95b591bd06a3f79bf95d505e0d1,,IN_PROGRESS,github-pages,2017-06-13T23:05:35.000+00:00,2017-06-13T23:05:35.000+00:00,2017-06-13T23:05:35.000+00:00,0
+github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDcyNjE5N5==,github:GithubRepo:1:134018330,f3f308ffaf23b98d2cf0ea34d7065a690a6560da,,IN_PROGRESS,github-pages,2017-06-14T23:19:10.000+00:00,2017-06-14T23:19:10.000+00:00,2017-06-14T23:19:10.000+00:00,0
+github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MDgwMzcwN6==,github:GithubRepo:1:134018330,b1e6227e675aae6e62b40803f06be690031cb145,,IN_PROGRESS,github-pages,2017-06-15T14:56:14.000+00:00,2017-06-15T14:56:14.000+00:00,2017-06-15T14:56:14.000+00:00,0
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MjAwMzE5M7==,github:GithubRepo:1:134018330,7bc32d9148e612b54c1909ecf56a62a08cb7b0e7,,IN_PROGRESS,github-pages,2017-06-26T18:03:49.000+00:00,2017-06-26T18:03:49.000+00:00,2017-06-26T18:03:49.000+00:00,0
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MjM3NTU0M8==,github:GithubRepo:1:134018330,6941c84de27d8a306510af3a03812b26ec421725,,OTHER,github-pages,2017-06-29T15:13:53.000+00:00,2017-06-29T15:13:53.000+00:00,2017-06-29T15:13:53.000+00:00,0
-github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MzY0MzQ1N9==,github:GithubRepo:1:134018330,5f0258bc04265e1f46e5eb7f685d91a0a7075031,,OTHER,github-pages,2017-07-11T13:09:32.000+00:00,2017-07-11T13:09:32.000+00:00,2017-07-11T13:09:32.000+00:00,0
-github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0NTQ3OTQ4O0==,github:GithubRepo:1:134018330,0be0c9ca727d106f85f126cf8beb10a6843af352,,OTHER,github-pages,2017-07-26T19:43:48.000+00:00,2017-07-26T19:43:48.000+00:00,2017-07-26T19:43:48.000+00:00,0
+github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0MzY0MzQ1N9==,github:GithubRepo:1:134018330,5f0258bc04265e1f46e5eb7f685d91a0a7075031,SUCCESS,DONE,github-pages,2017-07-11T13:09:32.000+00:00,2017-07-11T13:09:32.000+00:00,2017-07-11T13:09:32.000+00:00,0
+github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0NTQ3OTQ4O0==,github:GithubRepo:1:134018330,0be0c9ca727d106f85f126cf8beb10a6843af352,SUCCESS,DONE,github-pages,2017-07-26T19:43:48.000+00:00,2017-07-26T19:43:48.000+00:00,2017-07-26T19:43:48.000+00:00,0
github:GithubDeployment:1:MDEwOkRlcGxveW1lbnQ0NTQ4MDI010==,github:GithubRepo:1:134018330,8faba4cb2f03fa56ab6671d58f46d44622f36561,,OTHER,github-pages,2017-07-26T19:50:31.000+00:00,2017-07-26T19:50:31.000+00:00,2017-07-26T19:50:31.000+00:00,0
diff --git a/backend/plugins/github/tasks/deployment_convertor.go
b/backend/plugins/github/tasks/deployment_convertor.go
index 4904ca774..62adbe398 100644
--- a/backend/plugins/github/tasks/deployment_convertor.go
+++ b/backend/plugins/github/tasks/deployment_convertor.go
@@ -78,12 +78,12 @@ func ConvertDeployment(taskCtx plugin.SubTaskContext)
errors.Error {
CicdScopeId:
deploymentScopeIdGen.Generate(githubDeployment.ConnectionId,
githubDeployment.GithubId),
Name: githubDeployment.CommitOid,
Result: devops.GetResult(&devops.ResultRule{
- Success: []string{StatusSuccess},
+ Success: []string{StatusSuccess,
StatusInactive, StatusActive},
Failure: []string{StatusError,
StatusFailure},
Default: devops.RESULT_DEFAULT,
}, githubDeployment.State),
Status: devops.GetStatus(&devops.StatusRule{
- Done: []string{StatusSuccess,
StatusError, StatusFailure},
+ Done: []string{StatusSuccess,
StatusError, StatusFailure, StatusInactive, StatusActive},
InProgress: []string{StatusInProgress,
StatusQueued, StatusWaiting, StatusPending},
Default: devops.STATUS_OTHER,
}, githubDeployment.State),