You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ly...@apache.org on 2023/11/24 09:33:55 UTC

(incubator-devlake) branch main updated: fix: panic during github_graphql task when grabbing deployments (#6513)

This is an automated email from the ASF dual-hosted git repository.

lynwee pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 2cb0321e2 fix: panic during github_graphql task when grabbing deployments (#6513)
2cb0321e2 is described below

commit 2cb0321e2fc1ed7306a90da3bf2652ae55f7c57e
Author: abeizn <zi...@merico.dev>
AuthorDate: Fri Nov 24 17:33:46 2023 +0800

    fix: panic during github_graphql task when grabbing deployments (#6513)
---
 .../plugins/github_graphql/tasks/deployment_collector_extractor.go   | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/backend/plugins/github_graphql/tasks/deployment_collector_extractor.go b/backend/plugins/github_graphql/tasks/deployment_collector_extractor.go
index 8d7e03e38..fa8db34e4 100644
--- a/backend/plugins/github_graphql/tasks/deployment_collector_extractor.go
+++ b/backend/plugins/github_graphql/tasks/deployment_collector_extractor.go
@@ -104,15 +104,11 @@ func CollectAndExtractDeployments(taskCtx plugin.SubTaskContext) errors.Error {
 	if collectorWithState.Since != nil {
 		since = helper.DateTime{Time: *collectorWithState.Since}
 	}
-	enableSince := false
 
 	err = collectorWithState.InitGraphQLCollector(helper.GraphqlCollectorArgs{
 		GraphqlClient: data.GraphqlClient,
 		PageSize:      100,
 		BuildQuery: func(reqData *helper.GraphqlRequestData) (interface{}, map[string]interface{}, error) {
-			if enableSince {
-				return nil, nil, nil
-			}
 			query := &GraphqlQueryDeploymentWrapper{}
 			variables := make(map[string]interface{})
 			if reqData == nil {
@@ -138,7 +134,6 @@ func CollectAndExtractDeployments(taskCtx plugin.SubTaskContext) errors.Error {
 			for _, deployment := range deployments {
 				//Skip deployments with createdAt earlier than 'since'
 				if deployment.CreatedAt.Before(since.Time) {
-					enableSince = true
 					continue
 				}
 				githubDeployment, err := convertGithubDeployment(deployment, data.Options.ConnectionId, data.Options.GithubId)