You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "abh1sar (via GitHub)" <gi...@apache.org> on 2025/01/22 04:52:52 UTC
[PR] Delete account [cloudstack]
abh1sar opened a new pull request, #10232:
URL: https://github.com/apache/cloudstack/pull/10232
### Description
This PR Fixes https://github.com/apache/cloudstack/issues/9480
<!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
<!-- Fixes: # -->
<!--- ******************************************************************************* -->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!--- ******************************************************************************* -->
### 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)
- [x] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] build/CI
- [ ] test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [x] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] 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 -->
#### How did you try to break this feature and the system with this change?
<!-- 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
Re: [PR] Allow delete account only once it is disabled. Extra checks in UI. [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on code in PR #10232:
URL: https://github.com/apache/cloudstack/pull/10232#discussion_r1925031221
##########
server/src/main/java/com/cloud/user/AccountManagerImpl.java:
##########
@@ -850,6 +850,10 @@ protected boolean lockAccount(long accountId) {
public boolean deleteAccount(AccountVO account, long callerUserId, Account caller) {
long accountId = account.getId();
+ if (account.getState() != State.DISABLED) {
Review Comment:
@weizhouapache understood, will do
--
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
Re: [PR] Allow delete account only once it is disabled. Extra checks in UI. [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #10232:
URL: https://github.com/apache/cloudstack/pull/10232#issuecomment-2606979079
@abh1sar ,can you rebase on 4.19, please?
--
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
Re: [PR] Allow delete account only once it is disabled. Extra checks in UI. [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10232:
URL: https://github.com/apache/cloudstack/pull/10232#issuecomment-2606436873
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12159
--
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
Re: [PR] Allow delete account only once it is disabled. Extra checks in UI. [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #10232:
URL: https://github.com/apache/cloudstack/pull/10232#issuecomment-2606300300
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/10232?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 4.01%. Comparing base [(`c94d0ab`)](https://app.codecov.io/gh/apache/cloudstack/commit/c94d0abab49a178f4f6e403ed37b8f2f8448fce2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`5214b8c`)](https://app.codecov.io/gh/apache/cloudstack/commit/5214b8c5095eba7a906d34912fda3a48cc5f1678?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 81 commits behind head on main.
> :exclamation: There is a different number of reports uploaded between BASE (c94d0ab) and HEAD (5214b8c). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (c94d0ab) | HEAD (5214b8c) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #10232 +/- ##
=============================================
- Coverage 16.06% 4.01% -12.06%
=============================================
Files 5641 395 -5246
Lines 493791 32425 -461366
Branches 59858 5727 -54131
=============================================
- Hits 79318 1301 -78017
+ Misses 405691 30976 -374715
+ Partials 8782 148 -8634
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/10232/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/10232/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.01% <ø> (-0.01%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/10232/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/10232?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
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
Re: [PR] Allow delete account only once it is disabled. Extra checks in UI. [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10232:
URL: https://github.com/apache/cloudstack/pull/10232#issuecomment-2606457609
@abh1sar a Jenkins job has been kicked to build UI QA env. 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
Re: [PR] Allow delete account only once it is disabled. Extra checks in UI. [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #10232:
URL: https://github.com/apache/cloudstack/pull/10232#issuecomment-2606456239
@blueorangutan ui
--
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
Re: [PR] Allow delete account only once it is disabled. Extra checks in UI. [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10232:
URL: https://github.com/apache/cloudstack/pull/10232#issuecomment-2606481784
UI build: :heavy_check_mark:
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/10232 (QA-JID-519)
--
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
Re: [PR] Allow delete account only once it is disabled. Extra checks in UI. [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #10232:
URL: https://github.com/apache/cloudstack/pull/10232#issuecomment-2606355240
@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
Re: [PR] Allow delete account only once it is disabled. Extra checks in UI. [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #10232:
URL: https://github.com/apache/cloudstack/pull/10232#discussion_r1925096091
##########
server/src/main/java/com/cloud/user/AccountManagerImpl.java:
##########
@@ -850,6 +850,10 @@ protected boolean lockAccount(long accountId) {
public boolean deleteAccount(AccountVO account, long callerUserId, Account caller) {
long accountId = account.getId();
+ if (account.getState() != State.DISABLED) {
Review Comment:
thanks @abh1sar
The changes on unit tests are not needed
is it applicable for 4.19 ?
--
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
Re: [PR] Allow delete account only once it is disabled. Extra checks in UI. [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar closed pull request #10232: Allow delete account only once it is disabled. Extra checks in UI.
URL: https://github.com/apache/cloudstack/pull/10232
--
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
Re: [PR] Allow delete account only once it is disabled. Extra checks in UI. [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #10232:
URL: https://github.com/apache/cloudstack/pull/10232#issuecomment-2606356450
@abh1sar a [SL] 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.
--
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
Re: [PR] Allow delete account only once it is disabled. Extra checks in UI. [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #10232:
URL: https://github.com/apache/cloudstack/pull/10232#discussion_r1924806875
##########
server/src/main/java/com/cloud/user/AccountManagerImpl.java:
##########
@@ -850,6 +850,10 @@ protected boolean lockAccount(long accountId) {
public boolean deleteAccount(AccountVO account, long callerUserId, Account caller) {
long accountId = account.getId();
+ if (account.getState() != State.DISABLED) {
Review Comment:
@abh1sar
this is what was concerned about.
for users who do not use cloudstack UI (for example api or terraform, ansible), they will have to add an additional step when delete an account.
I advice you to remove the java code changes.
--
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
Re: [PR] Allow delete account only once it is disabled. Extra checks in UI. [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on code in PR #10232:
URL: https://github.com/apache/cloudstack/pull/10232#discussion_r1928133158
##########
server/src/main/java/com/cloud/user/AccountManagerImpl.java:
##########
@@ -850,6 +850,10 @@ protected boolean lockAccount(long accountId) {
public boolean deleteAccount(AccountVO account, long callerUserId, Account caller) {
long accountId = account.getId();
+ if (account.getState() != State.DISABLED) {
Review Comment:
removed unit tests. rebased to 4.19 : https://github.com/apache/cloudstack/pull/10242
##########
server/src/main/java/com/cloud/user/AccountManagerImpl.java:
##########
@@ -850,6 +850,10 @@ protected boolean lockAccount(long accountId) {
public boolean deleteAccount(AccountVO account, long callerUserId, Account caller) {
long accountId = account.getId();
+ if (account.getState() != State.DISABLED) {
Review Comment:
@weizhouapache removed unit tests. rebased to 4.19 : https://github.com/apache/cloudstack/pull/10242
--
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