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

Issue #1608: use double for docker.cpus property #1609

Merged
merged 1 commit into from
Oct 14, 2022

Conversation

vjuranek
Copy link
Contributor

Docker config option --cpus assumes float number, while current DMP docker.cpus assumes integer number, which is actually NanoCpus.

Change this property to double and convert it to NanoCpus before passing to Docker.

Signed-off-by: Vojtech Juranek vojtech.juranek@gmail.com

Fixes #1608

@codecov
Copy link

codecov bot commented Sep 27, 2022

Codecov Report

Merging #1609 (cabcac4) into master (79a4a33) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #1609      +/-   ##
============================================
+ Coverage     63.62%   63.65%   +0.02%     
- Complexity     2172     2173       +1     
============================================
  Files           170      170              
  Lines          9924     9923       -1     
  Branches       1359     1359              
============================================
+ Hits           6314     6316       +2     
+ Misses         3081     3078       -3     
  Partials        529      529              
Impacted Files Coverage Δ
...ic8/maven/docker/config/RunImageConfiguration.java 90.90% <ø> (ø)
...bric8/maven/docker/access/ContainerHostConfig.java 92.66% <100.00%> (+0.20%) ⬆️
...g/handler/compose/DockerComposeServiceWrapper.java 61.19% <100.00%> (-0.76%) ⬇️
...config/handler/property/PropertyConfigHandler.java 85.90% <100.00%> (ø)
.../docker/config/handler/property/ValueProvider.java 86.40% <0.00%> (+2.40%) ⬆️

@vjuranek
Copy link
Contributor Author

I don't think test failures are related to this PR.

@rohanKanojia
Copy link
Member

@vjuranek : Could you please add a line to doc/changelog regarding this change?

Docker config option `--cpus` assumes float number, while current DMP
`docker.cpus` assumes integer number, which is actually `NanoCpus`.

Change this property to `double` and convert it to `NanoCpus` before
passing to Docker.

Signed-off-by: Vojtech Juranek <vojtech.juranek@gmail.com>
@vjuranek
Copy link
Contributor Author

Done @rohanKanojia

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@rohanKanojia rohanKanojia merged commit 2156a48 into fabric8io:master Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker.cpus expects integer instead of float number
2 participants