Skip to content
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

Add UI components and polling for zip downloads #906

Merged
merged 19 commits into from
Aug 17, 2021
Merged

Conversation

mcannalte
Copy link
Contributor

@mcannalte mcannalte commented Aug 12, 2021

Jira Ticket: https://ctds-planx.atlassian.net/browse/HP-365

New Features

  • A user can select one or more studies to request for download. This dispatches a sower job which is monitored until it either sends back an s3 presigned url, or fails with an error description.

Deployment Changes

@mcannalte mcannalte changed the title feat(download): add UI components and polling for zip downloads Add UI components and polling for zip downloads Aug 12, 2021
@mcannalte mcannalte marked this pull request as ready for review August 12, 2021 16:04
Copy link
Collaborator

@mfshao mfshao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you deploy this feature somewhere so ppl can test?

Also would suggest to move the large amount of text in your current PR comment to descriptions and for those individual sections (New features, Improvements, Bug fixes etc), you should only keep a few brief bullet points as summerization. So it can be picked up by the gen3-release-helper script better when releasing

Also you should mention this feature depends on the 2 other PRs as deployment changes

ZakirG and others added 7 commits August 12, 2021 23:22
Data Access -> Data Availability, new n/a icon
Fix visual bug when Adv Search filter is disabled
Sort accessible data to top of table by default
Add new n/a icon to table
#):
feat(download): add UI components and polling for zip downloads
Copy link
Collaborator

@mfshao mfshao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you have added more config field into portal config, can you also update https://github.com/uc-cdis/data-portal/blob/master/docs/portal_config.md

},
).catch(handleJobError);
} else {
setTimeout(pollForJobStatusUpdate, 5000);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause the component stuck in an infinite loop if uid is not returned from https://github.com/uc-cdis/data-portal/pull/906/files#diff-1ac68dcc0067af6b35b142c058129318cc50ee20bfa9195afdb3d99f150d9d15R81

You can reproduce it now in qa-heal, since the mock auth is turned on, you will be login by default as a test account, which doesn't have sower access. The job dispatch request will return as 403 error, and no uid is returned, but this section of code will repeatly checking with uid=undefined

Better to handle fetched response with HTTP status code, rather than plain text

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. I will add some checks for HTTP status code for cases like this. For the /status calls, however, the status code from Sower is 200 regardless of job state, so I will have to keep some plain text checks in there

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sense! probably only the first call to /job/dispatch needs a status code check

Copy link
Contributor

@ZakirG ZakirG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well, good job ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants