-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Force async processing for large data sources on restricted domains #35465
base: master
Are you sure you want to change the base?
Conversation
a91feee
to
cc37c7b
Compare
cc37c7b
to
e279bc0
Compare
Why don't we mark it automatically for the user if know the data source covers a lot of data? It doesn't seem like a good UX when we only tell a user that they should have done something after they've tried to do it, especially if we can know that beforehand. Any thoughts? |
Hey @Charl1996 Great points. Couple of things that I considered:
Happy to reconsider if you think we are adding unnecessary step for the user. I was just thinking of being more explicit. |
I don't have too strong feelings either way, so fine to go with the way you have it. It does have the benefit of being more explicit and making the user aware of the setting. |
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 good. Just some minor nits.
@@ -1216,6 +1216,8 @@ def post(self, request, *args, **kwargs): | |||
return HttpResponseRedirect(reverse( | |||
EditDataSourceView.urlname, args=[self.domain, config._id]) | |||
) | |||
else: | |||
messages.error(request, _('Data source not saved!')) | |||
except BadSpecError as e: | |||
messages.error(request, str(e)) |
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 isn't part of your changes so feel free to ignore, but it seems we are returning an exception message back to the user here. Might be good to confirm that this is simply returning a general message and not any sort of stack trace.
Product Description
When saving a large data source (current default threshold is 1M), users will see the following error message to enforce asynchronous processing
Additionally, Minor improvement to show an error message on top if save fails for a data source configuration
Technical Summary
https://dimagi.atlassian.net/browse/SC-4001
Reused the existing feature flag that limits data source rebuilds to enforce asynchronous processing & slightly modifying the existing restriction by that feature flag to apply only for synchronous data sources.
Feature Flag
RESTRICT_DATA_SOURCE_REBUILD
Safety Assurance
Safety story
Tested locally.
Automated test coverage
QA Plan
https://dimagi.atlassian.net/browse/QA-7317
Rollback instructions
Labels & Review