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 binary diff #26

Merged
merged 8 commits into from
Nov 25, 2021
Merged

Fix binary diff #26

merged 8 commits into from
Nov 25, 2021

Conversation

ruffsl
Copy link
Owner

@ruffsl ruffsl commented Nov 24, 2021

Don't try to encode diff using utf-8 as diff could be from binary file

as diff could be from binary file
@codecov
Copy link

codecov bot commented Nov 24, 2021

Codecov Report

Merging #26 (1f7cca2) into master (6d8764a) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #26      +/-   ##
==========================================
+ Coverage   97.18%   97.20%   +0.01%     
==========================================
  Files          19       19              
  Lines         569      572       +3     
  Branches       79       82       +3     
==========================================
+ Hits          553      556       +3     
  Misses          9        9              
  Partials        7        7              
Impacted Files Coverage Δ
colcon_cache/task/lock/git.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6d8764a...1f7cca2. Read the comment docs.

@ruffsl ruffsl force-pushed the fix-binary-diff branch 4 times, most recently from e3ca95a to 02a9231 Compare November 25, 2021 00:43
@ruffsl
Copy link
Owner Author

ruffsl commented Nov 25, 2021

CC @SteveMacenski , This should fix the CI issue with changed binary files in git repos:

�]0;colcon cache [30/32 done] [0 ongoing]�Starting >>> nav2_bringup
--- stderr: nav2_bringup
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_core/executor/__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/colcon_core/task/__init__.py", line 93, in __call__
    return await task_method(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/colcon_cache/task/lock/git.py", line 96, in lock
    self.compute_current_checksums(args, lockfile)
  File "/usr/local/lib/python3.8/dist-packages/colcon_cache/task/lock/git.py", line 127, in compute_current_checksums
    h.update(diff.encode('utf-8'))
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 5484-56349: surrogates not allowed
---
Failed   <<< nav2_bringup [0.02s, exited with code 1]
�]0;colcon cache [30/32 done] [1 ongoing]��]0;colcon cache [31/32 done] [0 ongoing]�Starting >>> nav2_system_tests
--- stderr: nav2_system_tests
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/colcon_core/executor/__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/colcon_core/task/__init__.py", line 93, in __call__
    return await task_method(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/colcon_cache/task/lock/git.py", line 96, in lock
    self.compute_current_checksums(args, lockfile)
  File "/usr/local/lib/python3.8/dist-packages/colcon_cache/task/lock/git.py", line 127, in compute_current_checksums
    h.update(diff.encode('utf-8'))
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 788-72001: surrogates not allowed
---
Failed   <<< nav2_system_tests [0.27s, exited with code 1]
�]0;colcon cache [31/32 done] [1 ongoing]��]0;colcon cache [32/32 done] [0 ongoing]�
Summary: 30 packages finished [1.55s]
  2 packages failed: nav2_bringup nav2_system_tests
  2 packages had stderr output: nav2_bringup nav2_system_tests
'utf-8' codec can't encode characters in position 5484-56349: surrogates not allowed

Exited with code exit status 1

https://app.circleci.com/pipelines/github/ros-planning/navigation2/6441/workflows/a98ab0e8-0381-4a3c-a6c6-dacaff5a610d/jobs/23676/parallel-runs/0/steps/0-117

ros-navigation/navigation2#2649 (comment)

@ruffsl ruffsl merged commit 4a66548 into master Nov 25, 2021
@ruffsl ruffsl deleted the fix-binary-diff branch November 25, 2021 01:27
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.

1 participant