Skip to content

Exception occurred when publish/rollback namespaces with gray release #4563

@nobodyiam

Description

@nobodyiam
  • I have checked the discussions
  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Describe the bug

When publish/rollback namespaces with gray release, the operation failed with the error message java.lang.IllegalStateException: Expected BEGIN_ARRAY but was NUMBER at line 1 column 20 path $..

The stacktrace in server log is as follows:

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was NUMBER at line 1 column 20 path $.
	at com.google.gson.Gson.fromJson(Gson.java:975)
	at com.google.gson.Gson.fromJson(Gson.java:928)
	at com.google.gson.Gson.fromJson(Gson.java:877)
	at com.ctrip.framework.apollo.biz.service.ReleaseService.getBranchReleaseKeys(ReleaseService.java:333)

To Reproduce
Steps to reproduce the behavior:

  1. Create a grayscale version for some namespace, e.g. application
  2. Change some value in the grayscale version and publish the grayscale version
  3. Change some value in the main version
  4. Publish or rollback the main version, then you will see the error

Expected behavior
The publish/rollback operations should work with no error.

Screenshots
image

Additional Details & Logs

  • Version: 2.1.0-SNAPSHOT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions