You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2021/08/16 14:13:52 UTC

[servicecomb-service-center] branch bug2 updated (ba281cc -> e2ad769)

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

littlecui pushed a change to branch bug2
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git.


 discard ba281cc  Fix: list gov failed when kie has no data
    omit 9a55210  Fix: show no consumers
     add a749fba  Fix: show no consumers (#1137)
     new e2ad769  Fix: list gov failed when kie has no data

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (ba281cc)
            \
             N -- N -- N   refs/heads/bug2 (e2ad769)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:

[servicecomb-service-center] 01/01: Fix: list gov failed when kie has no data

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

littlecui pushed a commit to branch bug2
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git

commit e2ad769720cf3e6ecf4b49a1a982afa8f174de90
Author: little-cui <su...@qq.com>
AuthorDate: Mon Aug 16 22:11:07 2021 +0800

    Fix: list gov failed when kie has no data
---
 server/service/gov/kie/kie_distributor.go | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/server/service/gov/kie/kie_distributor.go b/server/service/gov/kie/kie_distributor.go
index 88e5a43..d1184ec 100644
--- a/server/service/gov/kie/kie_distributor.go
+++ b/server/service/gov/kie/kie_distributor.go
@@ -329,7 +329,12 @@ func (d *Distributor) listDataByKind(ctx context.Context, kind, project, app, en
 	if len(labels) > 0 {
 		ops = append(ops, kie.WithLabels(labels))
 	}
-	return d.client.List(ctx, ops...)
+	list, rev, err := d.client.List(ctx, ops...)
+	if err == kie.ErrNoChanges {
+		list = &kie.KVResponse{}
+		err = nil
+	}
+	return list, rev, err
 }
 
 func (d *Distributor) generateID(ctx context.Context, project string, p *gov.Policy) error {