You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "Divyanshu-s13 (via GitHub)" <gi...@apache.org> on 2026/04/03 10:02:17 UTC

[I] E2E secret list cleanup fails because it parses secret id incorrectly [apisix-dashboard]

Divyanshu-s13 opened a new issue, #3367:
URL: https://github.com/apache/apisix-dashboard/issues/3367

   ### Issue description
   
   In [secrets.list.spec.ts:68](line 68)the test cleanup logic assumes the secret identifier contains both the manager and id in a single string separated by a slash. It does this by splitting d.value.id on / before calling delete.
   
   That assumption is incorrect. The secret response already exposes manager and id as separate fields, and the UI code also treats them separately. As a result, the cleanup can build an invalid delete request with an undefined id, which makes the test flaky and can leave test data behind.
   
   ### Expected behavior
   
   The cleanup should delete each secret using the manager and id fields directly.
   
   ### How to Reproduce
   
   1. Run the secrets list e2e test suite, especially [secrets.list.spec.ts:68].
   2. Let the test reach the beforeAll cleanup step.
   3. The cleanup code reads d.value.id and splits it by /.
   4. Because manager and id are separate fields, the delete request may be built with an undefined id.
   5. The cleanup can fail or leave stale test data behind.
   
   ### Screenshots
   
   _No response_
   
   ### Environment
   
   - apisix-dashboard version: latest on the current branch
   - OS: macOS
   - Browser: whatever browser is used for Playwright in your setup
   - APISIX version: whatever backend version your test environment uses
   - OpenResty / Nginx version: if applicable in your setup
   - etcd version: if applicable in your setup
   
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] E2E secret list cleanup fails because it parses secret id incorrectly [apisix-dashboard]

Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop commented on issue #3367:
URL: https://github.com/apache/apisix-dashboard/issues/3367#issuecomment-4205820590

   The `preParseSecretItem` function in the Dashboard (src/apis/secrets.ts:27-37) splits the `manager` and `realId` from the raw `id`, which is precisely the logic for converting the raw APISIX format to the format required by the front end.
   
   The `beforeAll` cleanup logic in the E2E test directly calls the APISIX API (`e2eReq.get(API_SECRETS)`), obtaining the raw APISIX response (without the `preParseSecretItem` conversion). Therefore, `d.value.id` is in the combined format "vault/secret_id_1".
   
   The logic of `d.value.id.split('/')` is completely consistent with the parsing method in `preParseSecretItem` and is correct.
   
   In the E2E test, `d.value.id.split('/')` is correct because it operates on the raw APISIX API response, where `id` is in the format "manager/id".


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] E2E secret list cleanup fails because it parses secret id incorrectly [apisix-dashboard]

Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop closed issue #3367: E2E secret list cleanup fails because it parses secret id incorrectly
URL: https://github.com/apache/apisix-dashboard/issues/3367


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] E2E secret list cleanup fails because it parses secret id incorrectly [apisix-dashboard]

Posted by "Divyanshu-s13 (via GitHub)" <gi...@apache.org>.
Divyanshu-s13 commented on issue #3367:
URL: https://github.com/apache/apisix-dashboard/issues/3367#issuecomment-4182833580

   @Baoyuantop   Hi, I'd like to work on this bug and submit a fix!
   Could you assign this issue to me? I'll have a PR ready shortly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org