You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/11/22 13:25:35 UTC

[GitHub] [cloudstack] weizhouapache opened a new pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

weizhouapache opened a new pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704


   ### Description
   
   This PR fixes an issue with findActiveAccountById in AccountDaoImpl.java
   
   This method is used in some processes. The impact is unknown.
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] 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
   - [x] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] weizhouapache merged pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
weizhouapache merged pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] weizhouapache commented on pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704#issuecomment-979110661


   Merged based on 2 approvals and trillian test result


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704#issuecomment-978102784


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


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704#issuecomment-977833203


   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] rhtyd commented on pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704#issuecomment-978102261


   @blueorangutan test


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704#issuecomment-976412044


   @rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] weizhouapache commented on pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704#issuecomment-979020367


   > @weizhouapache code looks ok, but what is the sense of searching for a bunch of fields _and_ the id. The id is unique so this search makes no sense to me. Do you know how it is used and why it is a bug there?
   
   @DaanHoogland 
   as I said in description, the issue is with findActiveAccountById
   
   https://github.com/apache/cloudstack/blob/85373e62191ce18b9d968d366661d3e2efa5909d/engine/schema/src/main/java/com/cloud/user/dao/AccountDaoImpl.java#L199-L203
   
   this method search records by id, but "id" is not supported in AllFieldsSearch.
   therefore the result is same as (id/accountid is ignored)
   
   ```
       @Override
       public Account findActiveAccountById(Long accountId, Long domainId) {
           SearchCriteria<AccountVO> sc = AllFieldsSearch.create();
           sc.setParameters("domainId", domainId);
           return findOneBy(sc);
       }
   ```


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] rhtyd commented on pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704#issuecomment-976411708


   @blueorangutan package
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704#issuecomment-979065175


   > > @weizhouapache code looks ok, but what is the sense of searching for a bunch of fields _and_ the id. The id is unique so this search makes no sense to me. Do you know how it is used and why it is a bug there?
   > 
   > @DaanHoogland as I said in description, the issue is with findActiveAccountById
   > 
   > https://github.com/apache/cloudstack/blob/85373e62191ce18b9d968d366661d3e2efa5909d/engine/schema/src/main/java/com/cloud/user/dao/AccountDaoImpl.java#L199-L203
   > 
   > this method search records by id, but "id" is not supported in AllFieldsSearch. therefore the result is same as (id/accountid is ignored)
   > 
   > ```
   >     @Override
   >     public Account findActiveAccountById(Long accountId, Long domainId) {
   >         SearchCriteria<AccountVO> sc = AllFieldsSearch.create();
   >         sc.setParameters("domainId", domainId);
   >         return findOneBy(sc);
   >     }
   > ```
   
   Ah, you are right. I was confusing `SearchBuilder` with `SearchCriteria`.
   Nowhere else in the file the `id` is used in conjunction with the `AllFieldsSearch` so I think we are good.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] rhtyd commented on pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
rhtyd commented on pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704#issuecomment-977832317


   cc @weizhouapache pl check for failures, I'll rekick pkging 
   @blueorangutan package
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704#issuecomment-978983296


   @weizhouapache code looks ok, but what is the sense of searching for a bunch of fields *and* the id. The id is unique so this search makes no sense to me. Do you know how it is used and why it is a bug there?


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704#issuecomment-976500135


   Packaging result: :heavy_multiplication_x: el7 :heavy_multiplication_x: el8 :heavy_multiplication_x: debian :heavy_multiplication_x: suse15. SL-JID 1768


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704#issuecomment-978777484


   <b>Trillian test result (tid-2585)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 31440 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5704-t2585-kvm-centos7.zip
   Smoke tests completed. 91 look OK, 0 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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



[GitHub] [cloudstack] blueorangutan commented on pull request #5704: engine/schema: fix findActiveAccountById in AccountDaoImpl.java

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #5704:
URL: https://github.com/apache/cloudstack/pull/5704#issuecomment-977894337


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 1780


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

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