New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix rollback while creating a private gateway #8244
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #8244 +/- ##
============================================
+ Coverage 21.64% 29.16% +7.52%
- Complexity 21530 31072 +9542
============================================
Files 5052 5193 +141
Lines 343910 366294 +22384
Branches 49538 53554 +4016
============================================
+ Hits 74431 106827 +32396
+ Misses 258607 244825 -13782
- Partials 10872 14642 +3770
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definately an improvement. the try-catch this is embedded in is still to large though and the InvalidParameterValueException
s thrown are cought in an pokemon catch at the end of it. This createVpcPrivateGateway(..)
deserves further cleanup.
@blueorangutan package |
@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. |
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7780 |
@blueorangutan test |
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
[SF] Trillian Build Failed (tid-8342) |
[SF] Trillian test result (tid-8353)
|
@shwstppr , I added thois to 4.19 as it is a simple fix and comes with unittest... |
@DaanHoogland cc @hsato03 do we need any manual testing for this? |
@shwstppr, the failure case as @hsato03 describes could be encoded in an integration test. I don't think we have to make that conditional for this fix. Normal functionality is verified in existing smoke tests. |
ab30500
to
101511f
Compare
@shwstppr Yes, I think it would be interesting to have a third party testing.
@DaanHoogland I'll try to add the smoke tests. |
@blueorangutan package |
@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. |
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7810 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
it makes sense to validate the parameters before db changes
@blueorangutan package |
@weizhouapache 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. |
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7837 |
@blueorangutan test |
@weizhouapache a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
[SF] Trillian test result (tid-8394)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, also unit test coverage 👍
When creating a private gateway, if an ACL verification error occurs, the changes made up to that point are not rolled back, resulting in inconsistent records in the database. This PR intends to fix this bug and, if an error occurs during the creation of the private gateway, the changes will be rolled back.
Description
When creating a private gateway, if an ACL verification error occurs, the changes made up to that point are not rolled back, resulting in inconsistent records in the database.
This PR intends to fix this bug and, if an error occurs during the creation of the private gateway, the changes will be rolled back.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
I followed the same steps from
How did you try to break this feature and the system with this change?
and verified in the database that the network created to the private gateway was rolled back.How did you try to break this feature and the system with this change?
Private gateway and network acl are not in the same vpc
);networks
table in the database and the network created to the private gateway will be there.