Merged
Conversation
…ped into the CDM' to 'File uploaded is still being processed' in dashboard views when files have started but not finished being uploaded
joaorafaelalmeida
approved these changes
Jan 9, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change misleading message in dashboard views ("uploader/db_hash/dashboard/") when a file is still being uploaded but has not yet finished.
Description
When a file is uploaded but has not yet finished (that is, an upload history record was still not created) the uploader views (endpoint "uploader/db_hash/dashboard/") gives the message 'No data available: This database was not yet mapped into the CDM', which is not accurate.
This PR changes this message displayed for these cases to 'File uploaded is still being processed', by looking into the pending uploads and search for the latest one for the given data source, verifying if it is in the started state. This verification only occurs if there is no upload history for the given database/datasource.
Related Issue
Fixes #261
Motivation and Context
This change addresses the problem of a misleading message that is given in the uploader views.
Currently, the process of uploading a file can take too much time, for the case of large amounts of data, as previous processing tasks can still be executing (namely the refresh of materialized views). Therefore, the user, expecting that the results are available after a certain period of time, will be presented with the message "No data available: This database was not yet mapped into the CDM" in the endpoint "uploader/db_hash/dashboard/", which may be misleading as the user actually uploaded a file, but the full upload process has not finished, which may be related to the problem initially described.
This PR, for the cases where an upload has started but not yet completed, changes the message presented to the user to "File uploaded is still being processed", which represents a more accurate message.