Skip to content

Commit

Permalink
Cleanup plans
Browse files Browse the repository at this point in the history
- Manage cleanup plans (create, edit, remove, close, reopen).
- Assign reports to cleanup plans.
- Filter reports by cleanup plans.
- Add functional and e2e test cases.
  • Loading branch information
csordasmarton committed Sep 7, 2021
1 parent 892e75e commit ec66c39
Show file tree
Hide file tree
Showing 43 changed files with 2,143 additions and 23 deletions.
Binary file not shown.
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.42.0",
"version": "6.43.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.42.0'
api_version = '6.43.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.42.0'
api_version = '6.43.0'

setup(
name='codechecker_api_shared',
Expand Down
74 changes: 73 additions & 1 deletion web/api/report_server.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ struct ReportFilter {
16: optional ReportDate date, // Dates of the report.
17: optional list<string> analyzerNames, // Names of the code analyzers.
18: optional i64 openReportsDate, // Open reports date in unix time format.
19: optional list<string> cleanupPlanNames, // Cleanup plan names.
}

struct RunReportCount {
Expand Down Expand Up @@ -405,6 +406,22 @@ struct BlameInfo {
2: list<BlameData> blame,
}

struct CleanupPlan {
1: i64 id,
2: string name,
3: i64 dueDate, // Unix (epoch) time.
4: string description,
5: i64 closedAt, // Unix (epoch) time.
6: list<string> reportHashes,
}
typedef list<CleanupPlan> CleanupPlans

struct CleanupPlanFilter {
1: list<i64> ids,
2: list<string> names,
3: bool isOpen,
}

service codeCheckerDBAccess {

// Gives back all analyzed runs.
Expand Down Expand Up @@ -790,5 +807,60 @@ service codeCheckerDBAccess {
// Import data from the server.
// PERMISSION: PRODUCT_ADMIN
bool importData(1: ExportData exportData)
throws (1: codechecker_api_shared.RequestFailed requestError),
throws (1: codechecker_api_shared.RequestFailed requestError),

// Add a new cleanup plan.
// Returns the cleanup plan id if the cleanup plan was successfully created.
// PERMISSION: PRODUCT_ADMIN
i64 addCleanupPlan(1: string name,
2: string description,
3: i64 dueDate)
throws (1: codechecker_api_shared.RequestFailed requestError),

// Update a cleanup plan.
// Returns 'true' if cleanup plan was successfully updated.
// PERMISSION: PRODUCT_ADMIN
bool updateCleanupPlan(1: i64 id,
2: string name,
3: string description,
4: i64 dueDate)
throws (1: codechecker_api_shared.RequestFailed requestError),

// Get cleanup plans.
// Returns a list of cleanup plans.
// PERMISSION: PRODUCT_VIEW
CleanupPlans getCleanupPlans(1: CleanupPlanFilter filter)
throws (1: codechecker_api_shared.RequestFailed requestError),

// Remove a cleanup plan.
// Returns 'true' if cleanup plan was successfully removed.
// PERMISSION: PRODUCT_ADMIN
bool removeCleanupPlan(1: i64 cleanupPlanId)
throws (1: codechecker_api_shared.RequestFailed requestError),

// Close a cleanup plan.
// Returns 'true' if cleanup plan was successfully closed.
// PERMISSION: PRODUCT_ADMIN
bool closeCleanupPlan(1: i64 cleanupPlanId)
throws (1: codechecker_api_shared.RequestFailed requestError),

// Reopen a cleanup plan.
// Returns 'true' if cleanup plan was successfully reopened.
// PERMISSION: PRODUCT_ADMIN
bool reopenCleanupPlan(1: i64 cleanupPlanId)
throws (1: codechecker_api_shared.RequestFailed requestError),

// Add report hashes to the given cleanup plan.
// Returns 'true' if report hashes are set for the given cleanup plan.
// PERMISSION: PRODUCT_ADMIN
bool setCleanupPlan(1: i64 cleanupPlanId,
2: list<string> reportHashes)
throws (1: codechecker_api_shared.RequestFailed requestError),

// Remove report hashes from the given cleanup plan.
// Returns 'true' if report hashes are removed from the given cleanup plan.
// PERMISSION: PRODUCT_ADMIN
bool unsetCleanupPlan(1: i64 cleanupPlanId,
2: list<string> reportHashes)
throws (1: codechecker_api_shared.RequestFailed requestError),
}
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: 42
6: 43
}

# Used by the client to automatically identify the latest major and minor
Expand Down
Loading

0 comments on commit ec66c39

Please sign in to comment.