Skip to content

Conversation

@sureshanaparti
Copy link
Contributor

@sureshanaparti sureshanaparti commented Aug 22, 2024

Description

This PR updates the project account (which is the resource owner id rather than the calling user account id) for all the events with project account owner, except for create project event.

Project events are not missed, but calling account is added to scheduled events and project account is added to started, completed events. So, some of the events for the operation are in Default view and others in project View, which is confusing. This PR keeps project account for all events with with project account except for create project event.

Fixes #9432

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)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Manually performed below operations and checked the events before & after fix.
(i) Create project
(ii) Add account to project
(iii) Add user to project from the account in step (ii) - will Fail
(iv) Add user to project from another account.

Before Fix =>

Default View Events:

DefaultView_ProjectEvents_BeforeFix

Project View Events:

ProjectView_ProjectEvents_BeforeFix

Project Events DB:

ProjectEvents_DB_BeforeFix_1

After Fix =>

Default View Events:

DefaultView_ProjectEvents_AfterFix DefaultView_ProjectEvents_AfterFix_1

Project View Events:

ProjectView_ProjectEvents_AfterFix

Project Events DB:

ProjectEvents_DB_AfterFix_1

How did you try to break this feature and the system with this change?

@codecov
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 56.25000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 15.08%. Comparing base (1a403f1) to head (97a3fb7).
Report is 7 commits behind head on 4.19.

Files Patch % Lines
...in/java/com/cloud/projects/ProjectManagerImpl.java 0.00% 5 Missing ⚠️
.../api/command/user/account/AddUserToProjectCmd.java 0.00% 1 Missing ⚠️
...rc/main/java/com/cloud/event/ActionEventUtils.java 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               4.19    #9572    +/-   ##
==========================================
  Coverage     15.08%   15.08%            
- Complexity    11181    11184     +3     
==========================================
  Files          5406     5406            
  Lines        472915   473067   +152     
  Branches      58400    58992   +592     
==========================================
+ Hits          71336    71381    +45     
- Misses       393637   393744   +107     
  Partials       7942     7942            
Flag Coverage Δ
uitests 4.30% <ø> (ø)
unittests 15.80% <56.25%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@sureshanaparti sureshanaparti changed the title Keep project account for all the events with project account owner, except for create project event Update project account for all the events with project account owner, except for create project event Aug 22, 2024
@blueorangutan
Copy link

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

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10755

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✖️ debian ✔️ suse15. SL-JID 10760

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10761

@sureshanaparti
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-11146)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 45881 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9572-t11146-kvm-ol8.zip
Smoke tests completed. 133 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@sureshanaparti
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10808

Copy link

@rajujith rajujith left a comment

Choose a reason for hiding this comment

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

LGTM

Project events are visible in the default view and project view as expected. Events 'completed' are also visible.

@DaanHoogland DaanHoogland merged commit 674129c into apache:4.19 Aug 27, 2024
@DaanHoogland DaanHoogland deleted the project-events-account-update branch August 27, 2024 10:37
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Aug 30, 2024
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.

Missing completion events on project operations

5 participants