You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dlab.apache.org by GitBox <gi...@apache.org> on 2020/07/02 12:21:37 UTC

[GitHub] [incubator-dlab] ppapou opened a new pull request #806: [DLAB-1720] Exploratory Billing report fix

ppapou opened a new pull request #806:
URL: https://github.com/apache/incubator-dlab/pull/806


   The Scaling operation for each resource cost has been removed


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@dlab.apache.org
For additional commands, e-mail: dev-help@dlab.apache.org


[GitHub] [incubator-dlab] ofuks merged pull request #806: [DLAB-1720] Exploratory Billing report fix

Posted by GitBox <gi...@apache.org>.
ofuks merged pull request #806:
URL: https://github.com/apache/incubator-dlab/pull/806


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@dlab.apache.org
For additional commands, e-mail: dev-help@dlab.apache.org


[GitHub] [incubator-dlab] ofuks commented on a change in pull request #806: [DLAB-1720] Exploratory Billing report fix

Posted by GitBox <gi...@apache.org>.
ofuks commented on a change in pull request #806:
URL: https://github.com/apache/incubator-dlab/pull/806#discussion_r448962230



##########
File path: services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
##########
@@ -142,7 +142,7 @@ public BillingReport getExploratoryBillingData(String project, String endpoint,
         resourceNames.add(exploratoryName);
         List<BillingReportLine> billingData = billingDAO.findBillingData(project, endpoint, resourceNames)
                 .stream()
-                .peek(bd -> bd.setCost(BigDecimal.valueOf(bd.getCost()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()))
+                .peek(bd -> bd.setCost(BigDecimal.valueOf(bd.getCost()).doubleValue()))
                 .collect(Collectors.toList());

Review comment:
       Do we need to start stream() then?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@dlab.apache.org
For additional commands, e-mail: dev-help@dlab.apache.org


[GitHub] [incubator-dlab] ppapou commented on a change in pull request #806: [DLAB-1720] Exploratory Billing report fix

Posted by GitBox <gi...@apache.org>.
ppapou commented on a change in pull request #806:
URL: https://github.com/apache/incubator-dlab/pull/806#discussion_r448965867



##########
File path: services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
##########
@@ -142,7 +142,7 @@ public BillingReport getExploratoryBillingData(String project, String endpoint,
         resourceNames.add(exploratoryName);
         List<BillingReportLine> billingData = billingDAO.findBillingData(project, endpoint, resourceNames)
                 .stream()
-                .peek(bd -> bd.setCost(BigDecimal.valueOf(bd.getCost()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()))
+                .peek(bd -> bd.setCost(BigDecimal.valueOf(bd.getCost()).doubleValue()))
                 .collect(Collectors.toList());

Review comment:
       Later billingData object is used for cost calculation and getting currency value




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@dlab.apache.org
For additional commands, e-mail: dev-help@dlab.apache.org


[GitHub] [incubator-dlab] ppapou commented on a change in pull request #806: [DLAB-1720] Exploratory Billing report fix

Posted by GitBox <gi...@apache.org>.
ppapou commented on a change in pull request #806:
URL: https://github.com/apache/incubator-dlab/pull/806#discussion_r448975680



##########
File path: services/self-service/src/main/java/com/epam/dlab/backendapi/service/impl/BillingServiceImpl.java
##########
@@ -142,7 +142,7 @@ public BillingReport getExploratoryBillingData(String project, String endpoint,
         resourceNames.add(exploratoryName);
         List<BillingReportLine> billingData = billingDAO.findBillingData(project, endpoint, resourceNames)
                 .stream()
-                .peek(bd -> bd.setCost(BigDecimal.valueOf(bd.getCost()).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue()))
+                .peek(bd -> bd.setCost(BigDecimal.valueOf(bd.getCost()).doubleValue()))
                 .collect(Collectors.toList());

Review comment:
       the stream has been removed




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@dlab.apache.org
For additional commands, e-mail: dev-help@dlab.apache.org