cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

feature: webhooks

Open shwstppr opened this issue 1 year ago • 112 comments

Description

Feature spec: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Webhooks

Webhooks allow external services to be notified when certain events happen.

To implement and make Webhook work as an event bus, changes have been made to publish messages on multiple active message buses. Fixes #6778

Documentation PR: https://github.com/apache/cloudstack-documentation/pull/385

Types of changes

  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [x] 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

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [ ] Major
  • [ ] Minor

Bug Severity

  • [ ] BLOCKER
  • [ ] Critical
  • [ ] Major
  • [ ] Minor
  • [ ] Trivial

Screenshots (if appropriate):

Screenshot from 2024-02-20 13-54-49 Screenshot from 2024-02-20 13-55-19 Screenshot from 2024-02-20 13-56-31

How Has This Been Tested?

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

shwstppr avatar Feb 19 '24 07:02 shwstppr

Codecov Report

Attention: Patch coverage is 58.53324% with 605 lines in your changes are missing coverage. Please review.

Project coverage is 31.34%. Comparing base (a0b642c) to head (b054e0c). Report is 1 commits behind head on main.

Files Patch % Lines
.../cloudstack/mom/webhook/WebhookApiServiceImpl.java 62.42% 80 Missing and 41 partials :warning:
ui/src/views/tools/CreateWebhook.vue 0.00% 82 Missing :warning:
ui/src/components/view/WebhookDeliveriesTab.vue 0.00% 69 Missing :warning:
ui/src/components/view/TestWebhookDeliveryView.vue 0.00% 52 Missing :warning:
...che/cloudstack/mom/webhook/WebhookServiceImpl.java 69.86% 37 Missing and 7 partials :warning:
.../cloudstack/mom/webhook/WebhookDeliveryThread.java 74.80% 23 Missing and 9 partials :warning:
...rg/apache/cloudstack/mom/webhook/vo/WebhookVO.java 49.18% 31 Missing :warning:
ui/src/config/section/tools.js 0.00% 30 Missing :warning:
ui/src/views/tools/TestWebhookDelivery.vue 0.00% 22 Missing :warning:
ui/src/components/view/SearchView.vue 5.26% 18 Missing :warning:
... and 19 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8674      +/-   ##
============================================
+ Coverage     30.91%   31.34%   +0.43%     
- Complexity    33734    34355     +621     
============================================
  Files          5404     5432      +28     
  Lines        380289   381645    +1356     
  Branches      55489    55655     +166     
============================================
+ Hits         117550   119634    +2084     
+ Misses       247104   246194     -910     
- Partials      15635    15817     +182     
Flag Coverage Δ
simulator-marvin-tests 25.20% <68.63%> (+0.66%) :arrow_up:
uitests 4.31% <1.38%> (-0.03%) :arrow_down:
unit-tests 16.89% <18.97%> (+0.01%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 19 '24 07:02 codecov[bot]

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Feb 19 '24 09:02 github-actions[bot]

@blueorangutan package

shwstppr avatar Feb 20 '24 04:02 shwstppr

@shwstppr 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 avatar Feb 20 '24 04:02 blueorangutan

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

blueorangutan avatar Feb 20 '24 05:02 blueorangutan

@blueorangutan test keepEnv

shwstppr avatar Feb 20 '24 05:02 shwstppr

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

blueorangutan avatar Feb 20 '24 05:02 blueorangutan

@blueorangutan package

shwstppr avatar Feb 20 '24 07:02 shwstppr

@shwstppr 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 avatar Feb 20 '24 07:02 blueorangutan

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

blueorangutan avatar Feb 20 '24 08:02 blueorangutan

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

Test Result Time (s) Test File

blueorangutan avatar Feb 20 '24 18:02 blueorangutan

@shwstppr do you have any description of the feature?

GutoVeronezi avatar Feb 20 '24 19:02 GutoVeronezi

@shwstppr do you have any description of the feature?

@GutoVeronezi yes, I've added a feature spec at https://cwiki.apache.org/confluence/display/CLOUDSTACK/Webhooks This is still in WIP so some specific details around namings may change over time.

shwstppr avatar Feb 21 '24 06:02 shwstppr

@blueorangutan package

shwstppr avatar Feb 22 '24 04:02 shwstppr

@shwstppr 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 avatar Feb 22 '24 04:02 blueorangutan

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

blueorangutan avatar Feb 22 '24 05:02 blueorangutan

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

blueorangutan avatar Feb 23 '24 11:02 blueorangutan

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Feb 26 '24 14:02 github-actions[bot]

@blueorangutan package

DaanHoogland avatar Feb 26 '24 14:02 DaanHoogland

@DaanHoogland 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 avatar Feb 26 '24 14:02 blueorangutan

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

blueorangutan avatar Feb 26 '24 16:02 blueorangutan

@blueorangutan package

shwstppr avatar Feb 27 '24 18:02 shwstppr

@shwstppr 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 avatar Feb 27 '24 18:02 blueorangutan

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

blueorangutan avatar Feb 27 '24 19:02 blueorangutan

@blueorangutan package

shwstppr avatar Feb 28 '24 10:02 shwstppr

@shwstppr 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 avatar Feb 28 '24 10:02 blueorangutan

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

blueorangutan avatar Feb 28 '24 11:02 blueorangutan

@DaanHoogland thanks. Will address logging changes together with any remaining review comments

shwstppr avatar Feb 29 '24 07:02 shwstppr

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Mar 04 '24 08:03 github-actions[bot]

@blueorangutan package

shwstppr avatar Mar 04 '24 15:03 shwstppr