Skip to content

Include skiplist file in the analysis info - #4798

Merged
bruntib merged 2 commits into
Ericsson:masterfrom
barnabasdomozi:extend_analysis_info
Sep 1, 2026
Merged

Include skiplist file in the analysis info#4798
bruntib merged 2 commits into
Ericsson:masterfrom
barnabasdomozi:extend_analysis_info

Conversation

@barnabasdomozi

@barnabasdomozi barnabasdomozi commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

This patch introduces a new table called AnalysisInfoFile,
which is intended to store files related to analysis information.
The actual file contents are stored separately in the FileContent
table.

During CodeChecker analyze, we create a new directory called
conf/ in the report directory.
The entire conf/ directory will be added to the massStoreRun
ZIP file.

With this PR, only the skipfile is copied to the conf directory,
but this could be extended later.

@barnabasdomozi barnabasdomozi added database 🗄️ Issues related to the database schema. server 🖥️ new feature 👍 New feature request labels Mar 6, 2026
@barnabasdomozi
barnabasdomozi force-pushed the extend_analysis_info branch 3 times, most recently from 8586d7c to c1b9b9a Compare March 6, 2026 08:35
@barnabasdomozi
barnabasdomozi marked this pull request as draft March 6, 2026 08:40
@barnabasdomozi barnabasdomozi added the WIP 💣 Work In Progress label Mar 6, 2026
@barnabasdomozi
barnabasdomozi force-pushed the extend_analysis_info branch 5 times, most recently from 3661f49 to 39a5e15 Compare March 8, 2026 23:03
@barnabasdomozi
barnabasdomozi marked this pull request as ready for review March 8, 2026 23:03
@barnabasdomozi barnabasdomozi removed the WIP 💣 Work In Progress label Mar 8, 2026
dkrupp
dkrupp previously requested changes Mar 11, 2026

@dkrupp dkrupp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the original config file name.
Otherwise looks good.

Comment thread web/server/codechecker_server/api/mass_store_run.py Outdated
@barnabasdomozi
barnabasdomozi force-pushed the extend_analysis_info branch 3 times, most recently from fef4592 to ee296ef Compare March 13, 2026 22:46
@barnabasdomozi

Copy link
Copy Markdown
Collaborator Author

@dkrupp
Implemented in commit ee296ef.

The analysis info page now correctly uses the actual file name instead of the generic name "skip_file".

@barnabasdomozi
barnabasdomozi requested a review from dkrupp March 16, 2026 08:43
.filter(AnalysisInfo.analyzer_command == cmd) \
.all()

if analysis_info_rows:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this "if" statement been removed? In the new version, a new analysis info is added. What happens if it already exists in the database?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, the if check was used to determine whether a given analyzer command had already been inserted into the "AnalysisInfo" table, and if so, no new row was created.

However, with the introduction of the AnalysisInfoFile table, the design now includes a mapping between an AnalysisInfo ID and the corresponding FileContent rows that should be displayed on the analysis info page. If we keep the old if check, this leads to incorrect behavior.

Consider a scenario where 2 runs use the same analyzer command (for example, CodeChecker analyze -i ./skipfile ...), but the skipfile content differs between them.

When storing the first run, a new row is inserted into the AnalysisInfo table (e.g., ID 1), and the associated file content is linked through the AnalysisInfoFile table. For the second run, the if check detects that the analyzer command already exists and reuses AnalysisInfo ID 1 instead of creating a new row, while still inserting a new entry into AnalysisInfoFile linked to that same ID. As a result, both runs share the same AnalysisInfo entry, and we will display both skipfile contents for both run 1 and run 2.

To avoid this issue, a new AnalysisInfo entry must be created for every stored run, even if the analyzer command itself is identical.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm worried about growing the AnalysisInfo table. We have current issues with the size of AnalysisInfoChecker table. We should consider keeping the deduplication of AnalysisInfo and connecting the skipfiles to RunHistory table.

@barnabasdomozi

Copy link
Copy Markdown
Collaborator Author

@bruntib Updated alembic schema file.

@barnabasdomozi

Copy link
Copy Markdown
Collaborator Author

Before this change, the analysis_info_checkers table needs to be optimized

@barnabasdomozi
barnabasdomozi marked this pull request as draft April 23, 2026 12:23
@dkrupp dkrupp added this to the release 6.29.0 milestone Aug 19, 2026
@barnabasdomozi
barnabasdomozi force-pushed the extend_analysis_info branch 4 times, most recently from e83c789 to adbb090 Compare August 19, 2026 14:02
@barnabasdomozi
barnabasdomozi force-pushed the extend_analysis_info branch 10 times, most recently from 061d749 to 71cfa86 Compare August 27, 2026 14:25
This patch introduces a new table called AnalysisInfoFile,
which is intended to store files related to analysis information.
The actual file contents are stored separately in the FileContent
table.
@barnabasdomozi
barnabasdomozi marked this pull request as ready for review August 27, 2026 14:54
@barnabasdomozi
barnabasdomozi requested a review from bruntib August 27, 2026 14:54
content_hash: Optional[str]
):
content_hash: Optional[str],
commit: bool

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could commit at the places where it's necessary after calling this function. This way an extra parameter wouldn't be needed.

Comment thread web/server/codechecker_server/api/mass_store_run.py Outdated
@barnabasdomozi
barnabasdomozi force-pushed the extend_analysis_info branch 2 times, most recently from f012021 to 0c105d6 Compare August 31, 2026 12:18
Co-authored-by: bruntib <12861163+bruntib@users.noreply.github.com>
@barnabasdomozi

Copy link
Copy Markdown
Collaborator Author

@dkrupp Can you please review this PR again?

@bruntib
bruntib dismissed dkrupp’s stale review September 1, 2026 13:10

The GUI now shows the original filename as requested.

@bruntib
bruntib merged commit fe950f7 into Ericsson:master Sep 1, 2026
10 checks passed
@barnabasdomozi
barnabasdomozi deleted the extend_analysis_info branch September 1, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

database 🗄️ Issues related to the database schema. new feature 👍 New feature request server 🖥️

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants