You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "weizhouapache (via GitHub)" <gi...@apache.org> on 2025/07/03 11:31:19 UTC

[PR] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

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

   ### Description
   
   This PR 
   - add test for https server
   - fix the test failure
   
   <!--- 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)
   - [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)
   - [ ] 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?
   
   <!-- 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] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3038310358

   @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


Re: [PR] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3057106811

   closing now
   will revisit later


-- 
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] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3040357058

   <b>[SF] Trillian test result (tid-13686)</b>
   Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
   Total time taken: 54503 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11132-t13686-kvm-ol8.zip
   Smoke tests completed. 141 look OK, 0 have errors, 0 did not run
   Only failed and skipped 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


Re: [PR] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3044614031

   @shwstppr 
   can you review if this change makes sense or not ? thanks


-- 
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] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3046069846

   @weizhouapache I'm not entirely sure about these changes (we discussed this earlier!?).
   My understanding of the sslverification flag is that when set to true, it should enforce certificate validation—i.e., the webhook delivery service should validate the server's certificate using the trusted certificates available in the JRE.
   
   However, with the current change, it seems we're using a "trust all" approach even when sslverification is set to true.
   
   In my understanding, the correct way to test this would be to set up a server using self-signed certificates, explicitly add those certificates to the trusted store on the management server, and then verify that delivery works as expected when sslverification is set to true.


-- 
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] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3046296668

   > @weizhouapache I'm not entirely sure about these changes (we discussed this earlier!?).
   > My understanding of the sslverification flag is that when set to true, it should enforce certificate validation—i.e., the webhook delivery service should validate the server's certificate using the trusted certificates available in the JRE.
   > 
   > However, with the current change, it seems we're using a "trust all" approach even when sslverification is set to true.
   > 
   > In my understanding, the correct way to test this would be to set up a server using self-signed certificates, explicitly add those certificates to the trusted store on the management server, and then verify that delivery works as expected when sslverification is set to true.
   
   @shwstppr thanks for the reply.
   agree with your last paragraph, I think the best way is to implement the same behaviour as direct download , refer to #11113
   However, then we have to manage the certificates (similar to direct download, but not on kvm host). I think trust all is the workaround , and it is the expected behavior currently. Without the change, the new test (https server) will fail.


-- 
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] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3036011446

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


-- 
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] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3038312731

   @weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) 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


Re: [PR] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3036004991

   @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] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3055406715

   > @weizhouapache upto you. Without any change in Java code I feel the new test would fail because it is using a self-signed certificate and SSL verification is set to true. For the test or a user's use-case sslverification can be set to false which should allow delivery to work fine.
   
   Thanks @shwstppr 
   
   I understand a bit on your logic now.
   - if ssl certfication is false, use trust all.
   - if ssl cerification is true, use the default ssl trust store.
   
    I think the logic is correct. Maybe one thing can be improved is, adding the cloudstack mangement store to trust store, so the https server which uses the certificate issued by cloudstack CA,  such as the https server in the new test, can work.
   
   I will update the PR (java code) so the logic will be kept, and new test with https server will pass too.
   
   


-- 
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] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3047287481

   @weizhouapache upto you. Without any change in Java code I feel the new test would fail because it is using a self-signed certificate and SSL verification is set to true. For the test or a user's use-case sslverification can be set to false which should allow delivery to work fine.


-- 
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] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3036600396

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


-- 
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] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "shwstppr (via GitHub)" <gi...@apache.org>.
shwstppr commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3055577166

   Thanks @weizhouapache. Make sense. Using something similar to what you've used in #11113 and then in the test, either using some existing certificate from MS or using `uploadCustomCertificate`.
   Thanks for catching and improving this case


-- 
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] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache closed pull request #11132: webhook: add test for https in test_webhook_delivery.py and fix the failure
URL: https://github.com/apache/cloudstack/pull/11132


-- 
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] webhook: add test for https in test_webhook_delivery.py and fix the failure [cloudstack]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #11132:
URL: https://github.com/apache/cloudstack/pull/11132#issuecomment-3031948171

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/11132?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.00%. Comparing base [(`5790091`)](https://app.codecov.io/gh/apache/cloudstack/commit/5790091b25de4a170e12f1558c12dcd4424a25c7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`913099d`)](https://app.codecov.io/gh/apache/cloudstack/commit/913099da2698074d699f4d407d2b34969dcf5769?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 8 commits behind head on 4.20.
   
   > :exclamation:  There is a different number of reports uploaded between BASE (5790091) and HEAD (913099d). Click for more details.
   > 
   > <details><summary>HEAD has 1 upload less than BASE</summary>
   >
   >| Flag | BASE (5790091) | HEAD (913099d) |
   >|------|------|------|
   >|unittests|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@              Coverage Diff              @@
   ##               4.20   #11132       +/-   ##
   =============================================
   - Coverage     16.15%    4.00%   -12.16%     
   =============================================
     Files          5657      402     -5255     
     Lines        497898    32612   -465286     
     Branches      60374     5791    -54583     
   =============================================
   - Hits          80441     1305    -79136     
   + Misses       408496    31158   -377338     
   + Partials       8961      149     -8812     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/11132/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/11132/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.00% <ø> (-0.01%)` | :arrow_down: |
   | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/11132/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/11132?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).
   
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


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