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] Prevent overlapping report groups #4215

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

bruntib
Copy link
Contributor

@bruntib bruntib commented Apr 14, 2024

When getRunResults() API function queries the reports, the query uses LIMIT and OFFSET for returning the given page of the results due to their huge number. However, it is possible that different pages have overlapping reports. This way the resulting report list may contain duplicate reports.
In this commit we apply an ordering on report id in order to prevent this.

When getRunResults() API function queries the reports, the query uses
LIMIT and OFFSET for returning the given page of the results due to
their huge number. However, it is possible that different pages have
overlapping reports. This way the resulting report list may contain
duplicate reports.
In this commit we apply an ordering on report id in order to prevent this.
@bruntib bruntib added this to the release 6.24.0 milestone Apr 14, 2024
@bruntib bruntib requested a review from vodorok as a code owner April 14, 2024 23:15
@whisperity
Copy link
Contributor

Does this change still work if there is something in the "sort types" in the API? Which sorting takes priority in that case?

@cservakt
Copy link
Collaborator

Does this change still work if there is something in the "sort types" in the API? Which sorting takes priority in that case?

In SQL Alchemy .order_by(col1, col2) is equal to .order_by(col1).order_by(col2). The generated raw SQL query would be "SELECT col1, col2, ... FROM <table_name> ORDER BY col1, col2;" In both cases.

@cservakt cservakt merged commit 6e06e62 into Ericsson:master Apr 15, 2024
8 checks passed
@bruntib bruntib deleted the report_order branch April 15, 2024 12:15
vodorok pushed a commit to vodorok/codechecker that referenced this pull request Apr 15, 2024
[fix] Prevent overlapping report groups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants