-
Notifications
You must be signed in to change notification settings - Fork 41
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
Release changes using launch darkly plus minor tweaks #1052
Conversation
Up the version. Feature flag breaking changes.
Codecov Report
@@ Coverage Diff @@
## main #1052 +/- ##
===========================================
+ Coverage 79.31% 91.68% +12.37%
===========================================
Files 21 162 +141
Lines 1426 10558 +9132
===========================================
+ Hits 1131 9680 +8549
- Misses 295 878 +583
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -2,6 +2,9 @@ | |||
"flagValues": { | |||
"string-flag": "a string value", | |||
"bool-flag": true, | |||
"integer-flag": 10 | |||
"integer-flag": 10, | |||
"NEW_REFUNDED_STATUSES": true, |
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.
in PROD (will need to setup):
NEW_REFUNDED_STATUSES = false (Might need to wait a month)
CSO_BCOL_FIX = false (January to enable)
BAD_CSO_SERVICE_FEE = true (January to disable)
@@ -41,6 +41,7 @@ | |||
def create_app(run_mode=os.getenv('FLASK_ENV', 'production')): | |||
"""Return a configured Flask App using the Factory method.""" | |||
app = Flask(__name__) | |||
app.env = run_mode |
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.
Had to add this, otherwise in test mode it wouldn't read from the config file.
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.
that's weird. Was it not getting any values or just not setting the test config version of them?
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.
Oh was it just not getting ff values?
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.
I'd run the unit tests in the debugger, would always be set to PRODUCTION strangely even though it was set as something different in the app.configuration
@classmethod | ||
def _build_reversal_comment(cls, operation: ReverseOperation): | ||
"""Build the comment for the reversal.""" | ||
return { |
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.
Put this in to make it a bit more robust. Going to confirm with CAS.
Top two exist already.
For Correction
, the idea was to increment cas_version_suffix
, and append it to a routing slip number if it's > 1
EX.
234054347
, cas_version_suffix
incremented becomes 234054347R2
... 234054347R3
etc..
@@ -151,13 +151,14 @@ def _release_payment(invoice: Invoice): | |||
|
|||
@staticmethod | |||
def _refund_and_create_credit_memo(invoice: InvoiceModel): | |||
from pay_api.services import flags # pylint: disable=import-outside-toplevel |
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.
If I didn't put the import here, ran into circular dependency troubles or flags not having is_on
@@ -49,6 +49,7 @@ def get_payment_system_code(self): | |||
def create_invoice(self, payment_account: PaymentAccount, # pylint: disable=too-many-locals | |||
line_items: [PaymentLineItem], invoice: Invoice, **kwargs) -> InvoiceReference: | |||
"""Create Invoice in PayBC.""" | |||
from pay_api.services import flags # pylint: disable=import-outside-toplevel |
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.
If I didn't put the import here, ran into circular dependency troubles or flags not having is_on
@@ -284,6 +284,7 @@ def find_by_corp_type_and_filing_type( # pylint: disable=too-many-arguments | |||
**kwargs | |||
): | |||
"""Calculate fees for the filing by using the arguments.""" | |||
from pay_api.services import flags # pylint: disable=import-outside-toplevel |
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.
If I didn't put the import here, ran into circular dependency troubles or flags not having is_on
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.
Looks right to me
Deploying this to DEV, just to do a smoke test. |
Fix teardown, which causes launch darkly flags only to be updated at runtime.
@@ -59,12 +60,6 @@ def init_app(self, app): | |||
client = ldclient_get() | |||
|
|||
app.extensions['featureflags'] = client | |||
app.teardown_appcontext(self.teardown) | |||
|
|||
def teardown(self, exception): # pylint: disable=unused-argument; flask method signature |
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.
Kudos, SonarCloud Quality Gate passed!
|
We're wanting to have three changes under feature flags. Two for CSO directly. One for the new PAD invoice refund statuses.
Also changes to the reverse receipt process.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-pay license (Apache 2.0).