-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Error Handling When Reverting/Releasing App Version with V1 Mobile UCR References #35168
base: master
Are you sure you want to change the base?
Conversation
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.
This looks good to me.
Aren't we showing user a message even when they just view the app? or is that a different ticket?
<div class="alert alert-warning alert-build"> | ||
<h4 class="alert-heading"> | ||
<i class="fa fa-exclamation-circle"></i> | ||
{% trans "Warning while making new version" %}</h4> |
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.
Since we are letting user make a new version, you could consider framing this as
Warning for the version {version}
or just Warning
since the message already has the version number.
Saying, warning while making a new version
is a bit confusing because the version was made and was not blocked which seems right since warnings are non blocking but usually a warning isn't a result of an action, an error is, which this is not. So, just for a better user experience, good to keep that text more clear.
@@ -313,9 +315,9 @@ def languages_mapping(): | |||
if not mapping: | |||
with open('submodules/langcodes/langs.json', encoding='utf-8') as langs_file: | |||
lang_data = json.load(langs_file) | |||
mapping = dict([(l["two"], l["names"]) for l in lang_data]) | |||
mapping = dict([(lang["two"], lang["names"]) for lang in lang_data]) |
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 ( | ||
MOBILE_UCR_V1_FIXTURE_IDENTIFIER in form.source | ||
or re_mobile_ucr_v1_all_refs.search(form.source) | ||
): |
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.
nit: I assume you want to keep this explicit/clean and so you are using the if block instead of doing
return (MOBILE_UCR_V1_FIXTURE_IDENTIFIER in form.source or re_mobile_ucr_v1_all_refs.search(form.source))
I like explicit.
Product Description
One of two alert messages can be shown to the user depending on whether the app version still has V1 set as the mobile UCR restore version or if the app version contains any V1 fixture references:
The following conditions will cause one of the new alert messages to be shown:
Technical Summary
Link to ticket here.
This PR introduces some guard rails to ensure that users are not able to release app versions which contain any mobile UCR V1 references. The feature is currently undergoing a process of migrating to V2, and so these extra checks are being put in place to ensure that V1 of the feature is able to be deprecated.
Feature Flag
MOBILE_UCR
Safety Assurance
Safety story
The checks implemented in this PR will only apply to domains that have the
MOBILE_UCR
feature flag enabled.Automated test coverage
Automated tests have been created for the new helper function to ensure that it correctly identifies when one or more forms in an app are using mobile UCR V1 fixtures.
QA Plan
QA to be completed. Ticket is available here.
Rollback instructions
Labels & Review