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

[web] Update blame info #3488

Merged
merged 1 commit into from
Nov 12, 2021
Merged

Conversation

bruntib
Copy link
Contributor

@bruntib bruntib commented Nov 11, 2021

When a run is stured with an old CodeChecker version then blame info is
empty for the file contents. In a subsequent store we'd like to update
blame info for these files.

@bruntib bruntib added WIP 💣 Work In Progress bugfix 🔨 server 🖥️ web 🌍 Related to the web app labels Nov 11, 2021
@bruntib bruntib added this to the release 6.18.0 milestone Nov 11, 2021
web/api/report_server.thrift Outdated Show resolved Hide resolved
web/client/codechecker_client/cmd/store.py Outdated Show resolved Hide resolved
web/server/codechecker_server/api/mass_store_run.py Outdated Show resolved Hide resolved
for f in files:
blame_file = os.path.join(subdir, f)
file_path = blame_file[len(blame_root.rstrip("/")):]
blame_info, remote_url, tracking_branch = \
Copy link
Contributor

Choose a reason for hiding this comment

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

We already getting and storing blame information on this part:

blame_info, remote_url, tracking_branch = get_blame_file_data(
blame_file)

We have to process every git blame info file only once and not multiple times.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I chose not adding blame info when inserting new File and FileContent fields because the alternative solution (i.e. returning the list of newly inserted fields) was not convenient. For example gathering the information whether a File is newly inserted would require to add a second return value for add_file_record() function and this info should be transferred to __add_blame_info() through further return values and function parameters.

web/client/codechecker_client/cmd/store.py Outdated Show resolved Hide resolved
web/client/codechecker_client/cmd/store.py Show resolved Hide resolved
@vodorok
Copy link
Contributor

vodorok commented Nov 11, 2021

There is a typo in the commit message: stured -> stored.

@bruntib bruntib force-pushed the update_blame_info branch 2 times, most recently from 5d27c3b to 0657558 Compare November 11, 2021 22:38
When a run is stured with an old CodeChecker version then blame info is
empty for the file contents. In a subsequent store we'd like to update
blame info for these files.
@bruntib bruntib removed the WIP 💣 Work In Progress label Nov 12, 2021
Copy link
Contributor

@csordasmarton csordasmarton left a comment

Choose a reason for hiding this comment

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

LGTM!

@csordasmarton csordasmarton merged commit c600201 into Ericsson:master Nov 12, 2021
@bruntib bruntib deleted the update_blame_info branch November 12, 2021 10:09
@bruntib bruntib mentioned this pull request Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants