Skip to content

Commit

Permalink
Add api for querying missing reports from the server
Browse files Browse the repository at this point in the history
  • Loading branch information
vodorok committed Oct 30, 2024
1 parent bad1802 commit 8537269
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 11 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion web/api/js/codechecker-api-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codechecker-api",
"version": "6.58.0",
"version": "6.59.0",
"description": "Generated node.js compatible API stubs for CodeChecker server.",
"main": "lib",
"homepage": "https://github.com/Ericsson/codechecker",
Expand Down
Binary file modified web/api/py/codechecker_api/dist/codechecker_api.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion web/api/py/codechecker_api/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
with open('README.md', encoding='utf-8', errors="ignore") as f:
long_description = f.read()

api_version = '6.58.0'
api_version = '6.59.0'

setup(
name='codechecker_api',
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion web/api/py/codechecker_api_shared/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
with open('README.md', encoding='utf-8', errors="ignore") as f:
long_description = f.read()

api_version = '6.58.0'
api_version = '6.59.0'

setup(
name='codechecker_api_shared',
Expand Down
8 changes: 8 additions & 0 deletions web/api/report_server.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,14 @@ service codeCheckerDBAccess {
// Analysis result storage related API calls.
//============================================

// The client can ask the server whether a report is already stored in the
// database. If it is, then it is not necessary to send it in the ZIP file
// with massStoreRun() function. This function requires a list of report super hashes
// and returns the ones which are not present in the database.
// PERMISSION: PRODUCT_STORE
list<string> getMissingReportSuperHashes(1: list<string> reportSuperHashes)
throws (1: codechecker_api_shared.RequestFailed requestError),

// The client can ask the server whether a file is already stored in the
// database. If it is, then it is not necessary to send it in the ZIP file
// with massStoreRun() function. This function requires a list of file hashes
Expand Down
3 changes: 3 additions & 0 deletions web/client/codechecker_client/helpers/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ def removeSourceComponent(self, name):
pass

# STORAGE RELATED API CALLS
@thrift_client_call
def getMissingReportSuperHashes(self, report_super_hashes):
pass

@thrift_client_call
def getMissingContentHashes(self, file_hashes):
Expand Down
2 changes: 1 addition & 1 deletion web/codechecker_web/shared/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# The newest supported minor version (value) for each supported major version
# (key) in this particular build.
SUPPORTED_VERSIONS = {
6: 58
6: 59
}

# Used by the client to automatically identify the latest major and minor
Expand Down
11 changes: 11 additions & 0 deletions web/server/codechecker_server/api/report_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3890,6 +3890,17 @@ def removeSourceComponent(self, name):
codechecker_api_shared.ttypes.ErrorCode.DATABASE,
f'Source component {name} was not found in the database.')

@exc_to_thrift_reqfail
@timeit
def getMissingReportSuperHashes(self, report_super_hashes):
"""
Gets the list of reports the client want to store.
Returns the list of reports that the server does not have.
"""
self.__require_store()
# TODO implemet proper filtering based on the input hashes
return [report_super_hashes[0]]

@exc_to_thrift_reqfail
@timeit
def getMissingContentHashes(self, file_hashes):
Expand Down
12 changes: 6 additions & 6 deletions web/server/vue-cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/server/vue-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"dependencies": {
"@mdi/font": "^6.5.95",
"codechecker-api": "file:../../api/js/codechecker-api-node/dist/codechecker-api-6.58.0.tgz",
"codechecker-api": "file:../../api/js/codechecker-api-node/dist/codechecker-api-6.59.0.tgz",
"chart.js": "^2.9.4",
"chartjs-plugin-datalabels": "^0.7.0",
"codemirror": "^5.65.0",
Expand Down

0 comments on commit 8537269

Please sign in to comment.