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

verdi process list: fix logging bug in check_worker_load #5147

Merged

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Sep 22, 2021

Fixes #5144

The check_worker_load utility, called in verdi process list, caused
an exception in the logging because it logged a message including a
literal percentage sign. However, percentage signs carry special meaning
as they are placeholders for argument substitution and literal
percentage signs need to be escaped by doubling the character.

@sphuber sphuber force-pushed the fix/5144/logging-check-worker-load branch from 3c65979 to ab64234 Compare September 22, 2021 13:20
@codecov
Copy link

codecov bot commented Sep 22, 2021

Codecov Report

Merging #5147 (eb97d25) into develop (b7e37ce) will increase coverage by 0.01%.
The diff coverage is 80.00%.

❗ Current head eb97d25 differs from pull request most recent head 1071ae6. Consider uploading reports for the commit 1071ae6 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5147      +/-   ##
===========================================
+ Coverage    80.89%   80.90%   +0.01%     
===========================================
  Files          536      536              
  Lines        37019    37019              
===========================================
+ Hits         29943    29945       +2     
+ Misses        7076     7074       -2     
Flag Coverage Δ
django 75.74% <80.00%> (ø)
sqlalchemy 74.87% <80.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
aiida/cmdline/utils/common.py 68.14% <80.00%> (+0.37%) ⬆️
aiida/cmdline/utils/log.py 89.75% <0.00%> (-5.12%) ⬇️
aiida/transports/plugins/local.py 81.66% <0.00%> (+0.26%) ⬆️
aiida/engine/daemon/client.py 76.27% <0.00%> (+1.02%) ⬆️

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 b7e37ce...1071ae6. Read the comment docs.

@sphuber sphuber force-pushed the fix/5144/logging-check-worker-load branch from ab64234 to b77a3b7 Compare September 23, 2021 11:18
@sphuber sphuber force-pushed the fix/5144/logging-check-worker-load branch from b77a3b7 to 8a66038 Compare September 23, 2021 19:01
The `check_worker_load` utility, called in `verdi process list`, caused
an exception in the logging because it logged a message including a
literal percentage sign. However, percentage signs carry special meaning
as they are placeholders for argument substitution and literal
percentage signs need to be escaped by doubling the character.
@sphuber sphuber force-pushed the fix/5144/logging-check-worker-load branch from eb97d25 to 1071ae6 Compare September 24, 2021 09:43
Copy link
Member

@ramirezfranciscof ramirezfranciscof left a comment

Choose a reason for hiding this comment

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

Yeap looks good to me thanks!

@sphuber sphuber merged commit 97c3229 into aiidateam:develop Sep 24, 2021
@sphuber sphuber deleted the fix/5144/logging-check-worker-load branch September 24, 2021 10:57
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.

CLI: logging exception in verdi process list through aiida.common.utils.check_worker_load
2 participants