Skip to content

Fix typos and improve javadocs on ByteScaleUtils - #6877

Merged
DaanHoogland merged 2 commits into
apache:mainfrom
scclouds:fix-typos-in-ByteScaleUtils
Nov 10, 2022
Merged

Fix typos and improve javadocs on ByteScaleUtils#6877
DaanHoogland merged 2 commits into
apache:mainfrom
scclouds:fix-typos-in-ByteScaleUtils

Conversation

@GutoVeronezi

Copy link
Copy Markdown
Contributor

Description

PR #5909 introduced a class to convert bytes through the scales (B, KiB, KB, MiB, MB...); however, there are some typos in the javadocs and method names. This PR intends to fix those typos and improve the javadocs.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

@GutoVeronezi

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@GutoVeronezi a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. LL-JID 225

@GutoVeroneziGutoVeronezi changed the title Fix typos and improve javadocsFix typos and improve javadocs on ByteScaleUtilsNov 8, 2022
@codecov

codecovBot commented Nov 8, 2022

Copy link
Copy Markdown

Codecov Report

Merging #6877 (b4eb76b) into main (4c5a2ba) will increase coverage by 0.02%.
The diff coverage is 75.00%.

@@ Coverage Diff @@## main #6877 +/- ##
============================================
+ Coverage 10.84% 10.87% +0.02% - Complexity 7105 7117 +12 
============================================
Files 2485 2485 Lines 245417 245499 +82 Branches 38326 38334 +8 ============================================
+ Hits 26622 26699 +77 - Misses 215526 215530 +4 - Partials 3269 3270 +1 
Impacted FilesCoverage Δ
...ervisor/kvm/resource/LibvirtComputingResource.java17.03% <0.00%> (+1.34%)⬆️
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java6.72% <0.00%> (ø)
...tionrule/presetvariables/PresetVariableHelper.java98.56% <100.00%> (ø)
...resource/wrapper/LibvirtScaleVmCommandWrapper.java94.11% <100.00%> (ø)
...er/src/main/java/com/cloud/hypervisor/KVMGuru.java73.22% <100.00%> (ø)
...om/cloud/hypervisor/kvm/resource/LibvirtVMDef.java67.65% <0.00%> (+0.61%)⬆️
...ypervisor/kvm/resource/LibvirtDomainXMLParser.java50.61% <0.00%> (+2.11%)⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

* @return The parameter multiplied by 1048576 (1024 * 1024, 1 MiB).
* @return The parameter multiplied by 2²⁰ (1048576 | 1024 * 1024 | 1 MiB | ).
*/
public static long mibToBytes(long mib) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@GutoVeronezi
do we need to change this to miBToBytes as well ? looks a bit strange

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@GutoVeronezi
thanks for fixing btw

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@weizhouapache, what do you think about not using the symbols (e.g.: mebibytesToBytes) ? This way it would leave no doubt and would be consistent, as it is written ...ToBytes, and not ...toB.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@GutoVeronezi looks good to me.
@DaanHoogland what is your opinion?

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.

I like @GutoVeronezi 's last proposal here, reading will actually be quicker as you don´t need to translate in your head.

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. LL-JID 232

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@weizhouapacheweizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

code lgtm

thanks @GutoVeronezi

@weizhouapache

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. LL-JID 237

@sonarqubecloud

Copy link
Copy Markdown

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-54)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 42489 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6877-t54-kvm-centos7.zip
Smoke tests completed. 102 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File
test_08_upgrade_kubernetes_ha_clusterFailure553.92test_kubernetes_clusters.py
test_01_redundant_vpc_site2site_vpnFailure752.15test_vpc_vpn.py
test_01_vpc_site2site_vpn_multiple_optionsError1274.51test_vpc_vpn.py
test_01_vpc_site2site_vpnError545.05test_vpc_vpn.py

@DaanHoogland

Copy link
Copy Markdown
Contributor

the kubernetes error is intermittent and the vpc_vpn errors are due to a template download failure at the backend; merging

@DaanHoogland
DaanHoogland merged commit b8b66b7 into apache:mainNov 10, 2022
Sign up for freeto 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.

4 participants

@GutoVeronezi@blueorangutan@DaanHoogland@weizhouapache