Search Unity

Bug Duplicated Badge when putting it using Management API

Discussion in 'Unity Cloud Content Delivery' started by halvaren_nugadog, Jul 19, 2022.

  1. halvaren_nugadog

    halvaren_nugadog

    Joined:
    Feb 16, 2022
    Posts:
    31
    Hi there,

    I'm working on an app that has to assign a "Production" badge to a release when its scheduled day arrives. I have a database where I store all these schedule dates and when it is the day for assigning that badge to one of the releases, it calls the corresponding endpoint from the Management API. The issue comes when I've already created and assigned that Production badge to one release through the Dashboard, and then, I try to assign that same badge (with the exact name) to another release, using the Management API endpoint. The result is the next one:

    upload_2022-7-19_15-10-35.png

    Also, when I check the "Assign Badges" option from dashboard, release 102 doesn't have any assigned badge, and it tells that Production badge is currently at release 97.

    upload_2022-7-19_15-12-34.png

    I assume that the Production badge at release 102 doesn't actually exist. In fact, if I use the "Get badges" endpoint, it is not listed.

    Is it a bug or am I doing something wrong?
     
  2. Unity_JonathanCl

    Unity_JonathanCl

    Unity Technologies

    Joined:
    Feb 24, 2022
    Posts:
    15
    Hi halvaren_nugadog,

    Thank you for reporting this issue, I am trying to reproduce it.
    Could you confirm that those are the steps to reproduce the issue:
    1. You have a bucket with multiple releases (1, 2, 3)
    2. From the dashboard, you create a badge “Production” and assign it to release 1.
    3. Through the management API, you perform a put request to update the badge "Production" from release 1 to release 3.
      using this PUT request:https://services.docs.unity.com/content-delivery-management/v1#operation/UpdateBadgeEnv
    4. The result is that the "Production" badge now appears to be assigned to two different releases in the dashboard and was actually not updated properly via the API?
    Best,
    JC
     
  3. halvaren_nugadog

    halvaren_nugadog

    Joined:
    Feb 16, 2022
    Posts:
    31
    yes, those are the steps
     
  4. Unity_JonathanCl

    Unity_JonathanCl

    Unity Technologies

    Joined:
    Feb 24, 2022
    Posts:
    15
    Hi halvaren_nugadog,

    I don't see anything wrong with the step you are doing and assume this is a bug.
    I cannot reproduce it on my machine but will investigate to find the cause. Could you provide the bucket id where the error happened? Also, are you experiencing this issue every time or it only happens occasionally, and when you refresh the release page do you still see the two "Production" badges in your dashboard, or does the release 102 "Production" badge disappear?

    Best,
    JC
     
  5. halvaren_nugadog

    halvaren_nugadog

    Joined:
    Feb 16, 2022
    Posts:
    31
    here is the bucket ID 70aea486-6d57-4d90-8f32-205fd29f43e2

    I haven't tested much, but the release 102 Production badge is still there.

    Thank you in advance!
     
  6. Unity_JonathanCl

    Unity_JonathanCl

    Unity Technologies

    Joined:
    Feb 24, 2022
    Posts:
    15
    Hi halvaren_nugadog,

    Thank you for reporting the issue.
    We are now able to replicate the problem and will provide a bug fix soon.

    Best,
    JC
     
    SebT_Unity likes this.