Skip to content
This repository was archived by the owner on Nov 29, 2021. It is now read-only.

Show progress as int - #269

Merged
jjnicola merged 6 commits into
greenbone:masterfrom
jjnicola:int-progress
May 13, 2020
Merged

Show progress as int#269
jjnicola merged 6 commits into
greenbone:masterfrom
jjnicola:int-progress

Conversation

@jjnicola

Copy link
Copy Markdown
Member

No description provided.

@jjnicola
jjnicola requested a review from bjoernricks as a code owner May 13, 2020 08:57
@codecov

codecov Bot commented May 13, 2020

Copy link
Copy Markdown

Codecov Report

Merging #269 into master will increase coverage by 0.05%.
The diff coverage is 69.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #269      +/-   ##
==========================================
+ Coverage   74.51%   74.56%   +0.05%     
==========================================
  Files          21       21              
  Lines        2315     2320       +5     
==========================================
+ Hits         1725     1730       +5     
  Misses        590      590              
Impacted Files Coverage Δ
ospd/ospd.py 76.97% <60.00%> (+0.20%) ⬆️
ospd/scan.py 90.90% <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 6786774...562300f. Read the comment docs.

Comment thread ospd/ospd.py Outdated
self,
scan_id: str,
host: str = None,
progress: Union[float, int] = None,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why should be a float still allowed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This comes from the wrapper. It depends on the wrapper implementation. Currently ospd-openvas sends a float value

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we fix that?

Comment thread ospd/scan.py Outdated
hosts = self.scans_table[scan_id]['target_progress']
if hosts:
for host, progress in hosts.items():
hosts[host] = int(progress)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't we ensure that progress is already an int in the scans table?

@jjnicola
jjnicola merged commit 4bfffd0 into greenbone:master May 13, 2020
@jjnicola
jjnicola deleted the int-progress branch May 13, 2020 13:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants