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

feat: make newfiles part of files behaviour #573

Merged
merged 3 commits into from
Jul 30, 2024
Merged

Conversation

joseph-sentry
Copy link
Contributor

@joseph-sentry joseph-sentry commented Jul 23, 2024

If a user specifies the files formatting in their comment layout config, we want it to show the newfiles formatting as well.
Closes: codecov/engineering-team#1129

@joseph-sentry joseph-sentry requested a review from a team July 23, 2024 19:32
@joseph-sentry joseph-sentry marked this pull request as ready for review July 23, 2024 19:32
@codecov-qa
Copy link

codecov-qa bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.50%. Comparing base (2a6cb28) to head (69639d9).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #573   +/-   ##
=======================================
  Coverage   97.49%   97.50%           
=======================================
  Files         414      414           
  Lines       34986    35002   +16     
=======================================
+ Hits        34109    34127   +18     
+ Misses        877      875    -2     
Flag Coverage Δ
integration 97.50% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 97.50% <100.00%> (+<0.01%) ⬆️
unit 97.50% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 94.55% <100.00%> (+0.01%) ⬆️
OutsideTasks 97.72% <100.00%> (+0.01%) ⬆️
Files Coverage Δ
.../notification/notifiers/mixins/message/__init__.py 100.00% <100.00%> (ø)
...s/notification/notifiers/tests/unit/test_checks.py 100.00% <ø> (ø)
.../notification/notifiers/tests/unit/test_comment.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

@codecov-notifications
Copy link

codecov-notifications bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #573   +/-   ##
=======================================
  Coverage   97.49%   97.50%           
=======================================
  Files         414      414           
  Lines       34986    35002   +16     
=======================================
+ Hits        34109    34127   +18     
+ Misses        877      875    -2     
Flag Coverage Δ
integration 97.50% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 97.50% <100.00%> (+<0.01%) ⬆️
unit 97.50% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 94.55% <100.00%> (+0.01%) ⬆️
OutsideTasks 97.72% <100.00%> (+0.01%) ⬆️
Files Coverage Δ
.../notification/notifiers/mixins/message/__init__.py 100.00% <100.00%> (ø)
...s/notification/notifiers/tests/unit/test_checks.py 100.00% <ø> (ø)
.../notification/notifiers/tests/unit/test_comment.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

Copy link

codecov-public-qa bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.50%. Comparing base (2a6cb28) to head (69639d9).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #573   +/-   ##
=======================================
  Coverage   97.49%   97.50%           
=======================================
  Files         414      414           
  Lines       34986    35002   +16     
=======================================
+ Hits        34109    34127   +18     
+ Misses        877      875    -2     
Flag Coverage Δ
integration 97.50% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 97.50% <100.00%> (+<0.01%) ⬆️
unit 97.50% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 94.55% <100.00%> (+0.01%) ⬆️
OutsideTasks 97.72% <100.00%> (+0.01%) ⬆️
Files Coverage Δ
.../notification/notifiers/mixins/message/__init__.py 100.00% <100.00%> (ø)
...s/notification/notifiers/tests/unit/test_checks.py 100.00% <ø> (ø)
.../notification/notifiers/tests/unit/test_comment.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.55%. Comparing base (2a6cb28) to head (69639d9).

Changes have been made to critical files, which contain lines commonly executed in production. Learn more

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #573   +/-   ##
=======================================
  Coverage   97.54%   97.55%           
=======================================
  Files         449      449           
  Lines       36192    36208   +16     
=======================================
+ Hits        35303    35321   +18     
+ Misses        889      887    -2     
Flag Coverage Δ
integration 97.50% <100.00%> (+<0.01%) ⬆️
latest-uploader-overall 97.50% <100.00%> (+<0.01%) ⬆️
unit 97.50% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 94.65% <100.00%> (+0.01%) ⬆️
OutsideTasks 97.72% <100.00%> (+0.01%) ⬆️
Files Coverage Δ
.../notification/notifiers/mixins/message/__init__.py 100.00% <100.00%> (ø)
...s/notification/notifiers/tests/unit/test_checks.py 100.00% <ø> (ø)
.../notification/notifiers/tests/unit/test_comment.py 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

This change has been scanned for critical changes. Learn more

@@ -275,6 +275,14 @@ def get_upper_section_names(self, settings):
if all(x not in sections for x in headers):
sections.insert(0, "condensed_header")

print(sections)
Copy link
Contributor

Choose a reason for hiding this comment

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

print

and "newfiles" not in sections
and "condensed_files" not in sections
):
sections.insert(0, "newfiles")
Copy link
Contributor

Choose a reason for hiding this comment

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

so we're gonna show "files" AND "newfiles" ?...

The question is: do we pop the "files" entry anywhere?
Like instead of this if can we do sections.replace("files", "condensed_files") ?

Also let's prefer condensed_files instead of new_files cause that's not new anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We indeed want to show both if files has been selected.

If a user specifies the files formatting in their comment layout
config, we want it to show the newfiles formatting as well.
this commit fixes a previously erroneous commit that attempted to
make it so if "files" or "tree" are mentioned in the comment layout
config then the condensed_files section is also included.

We want the behaviour if "files" is selected in the config to be:
1. always show the files section
2 if there are missing lines in the path then also show the
condensed_files section
Copy link
Contributor

@adrian-codecov adrian-codecov left a comment

Choose a reason for hiding this comment

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

Left a suggestion, otherwise lgtm

@joseph-sentry joseph-sentry added this pull request to the merge queue Jul 30, 2024
Merged via the queue into main with commit ef76fe0 Jul 30, 2024
29 of 30 checks passed
@joseph-sentry joseph-sentry deleted the joseph/newfiles branch July 30, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing lines table not showing
3 participants