-
Notifications
You must be signed in to change notification settings - Fork 456
Include skiplist file in the analysis info #4798
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
Open
barnabasdomozi
wants to merge
1
commit into
Ericsson:master
Choose a base branch
from
barnabasdomozi:extend_analysis_info
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...dechecker_server/migrations/report/versions/baa4ab435da6_add_analysis_info_files_table.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| """ | ||
| Add analysis_info_files table | ||
|
|
||
| Revision ID: baa4ab435da6 | ||
| Revises: 24c9660f82b1 | ||
| Create Date: 2026-04-15 15:48:18.762625 | ||
| """ | ||
|
|
||
| from logging import getLogger | ||
|
|
||
| from alembic import op | ||
| import sqlalchemy as sa | ||
|
|
||
|
|
||
| # Revision identifiers, used by Alembic. | ||
| revision = 'baa4ab435da6' | ||
| down_revision = '24c9660f82b1' | ||
| branch_labels = None | ||
| depends_on = None | ||
|
|
||
|
|
||
| def upgrade(): | ||
| LOG = getLogger("migration/report") | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.create_table( | ||
| 'analysis_info_files', | ||
| sa.Column('analysis_info_id', sa.Integer(), nullable=False), | ||
| sa.Column('filename', sa.String(), nullable=False), | ||
| sa.Column('content_hash', sa.String(), nullable=False), | ||
| sa.ForeignKeyConstraint( | ||
| ['analysis_info_id'], ['analysis_info.id'], | ||
| name=op.f( | ||
| 'fk_analysis_info_files_analysis_info_id_analysis_info'), | ||
| ondelete='CASCADE', initially='DEFERRED', deferrable=True), | ||
| sa.ForeignKeyConstraint( | ||
| ['content_hash'], ['file_contents.content_hash'], | ||
| name=op.f( | ||
| 'fk_analysis_info_files_content_hash_file_contents'), | ||
| ondelete='CASCADE', initially='DEFERRED', deferrable=True), | ||
| sa.PrimaryKeyConstraint( | ||
| 'analysis_info_id', 'content_hash', | ||
| name=op.f('pk_analysis_info_files')) | ||
| ) | ||
| # ### end Alembic commands ### | ||
|
|
||
|
|
||
| def downgrade(): | ||
| LOG = getLogger("migration/report") | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.drop_table('analysis_info_files') | ||
| # ### end Alembic commands ### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| -*.txt |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, the
ifcheck 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
ifcheck, 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
ifcheck 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.
There was a problem hiding this comment.
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
AnalysisInfotable. We have current issues with the size ofAnalysisInfoCheckertable. We should consider keeping the deduplication ofAnalysisInfoand connecting the skipfiles toRunHistorytable.