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

Fix aggregation in Windows (fix #210) #211

Merged
merged 14 commits into from
Sep 4, 2023

Conversation

devdanzin
Copy link
Collaborator

In Windows, aggregation is broken in two ways:

  • Aggregated metrics on directories come only from files that changed in a given revision.
  • Only root directories get aggregated entries (so src/ and test/ in wily's repo, but not src/wily/).

This happens because revision.tracked_files and revision.tracked_dirs store paths with forward slashes, but the paths in result use backslashes in Windows. This PR fixes that by converting entries in those lists to Paths and back to str.

This fixes the root cause of #210, which initially had a wrong analysis but documents the issue.

@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2023

Codecov Report

Merging #211 (4149e8b) into master (b342a1c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #211   +/-   ##
=======================================
  Coverage   95.83%   95.84%           
=======================================
  Files          25       25           
  Lines        1346     1349    +3     
  Branches      287      289    +2     
=======================================
+ Hits         1290     1293    +3     
  Misses         32       32           
  Partials       24       24           
Files Changed Coverage Δ
src/wily/commands/build.py 92.78% <100.00%> (+1.29%) ⬆️

... and 1 file with indirect coverage changes

@devdanzin
Copy link
Collaborator Author

Sorry about the noise, I couldn't get codecov to pass without adding tests, and I couldn't make the tests fail locally the same way they did on CI.

src/wily/commands/build.py Outdated Show resolved Hide resolved
@tonybaloney tonybaloney merged commit 9181415 into tonybaloney:master Sep 4, 2023
18 checks passed
@devdanzin devdanzin deleted the fix_aggregate_in_windows branch September 5, 2023 11:50
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.

None yet

3 participants