Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix redundant requests to /api/v1/component when loading project page #726

Merged

Conversation

nscuro
Copy link
Member

@nscuro nscuro commented Feb 3, 2024

Description

Fixes redundant requests to /api/v1/component when loading project page.

Addressed Issue

Fixes #696

Additional Details

onlyOutdated and onlyDirect were initialized with non-boolean values. Both variables have a watch on them, triggering a refresh of the components table upon change. Both variables are used as model for c-switch components, causing their value to transition to false immediately, triggering the watches and consequently table refreshes.

This behavior could cause requests to be abandoned before their content was fully consumed, resulting in EofExceptions in the API server.

Abandoned requests are also visible in the Network tab of the browser:

image

Checklist

`onlyOutdated` and `onlyDirect` were initialized with non-boolean values. Both variables have a watch on them, triggering a refresh of the components table upon change. Both variables are used as model for `c-switch` components, causing their value to transition to `false` immediately, triggering the watches and consequently table refreshes.

This behavior could cause requests to be abandoned before their content was fully consumed, resulting in `EofException`s in the API server.

Signed-off-by: nscuro <[email protected]>
@nscuro nscuro added the defect Something isn't working label Feb 3, 2024
@nscuro nscuro added this to the 4.11 milestone Feb 3, 2024
@nscuro nscuro merged commit 883b651 into DependencyTrack:master Feb 3, 2024
9 checks passed
@nscuro nscuro deleted the fix-redundant-requests-on-pageload branch February 3, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicated form field id in the UI forces network connection abort by the browser, leading to http status 499
1 participant