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

DATAUP-266 staging refresh #1886

Merged
merged 7 commits into from
Oct 23, 2020
Merged

DATAUP-266 staging refresh #1886

merged 7 commits into from
Oct 23, 2020

Conversation

briehl
Copy link
Member

@briehl briehl commented Oct 23, 2020

Description of PR purpose/changes

As reported in DATAUP-266, when a user finishes uploading a file, the file viewer doesn't refresh automatically anymore. This restores that functionality. I also noticed some browser slowdown / lockup when uploading a lot of small files at one time, which trigger a refresh (and a list call to the staging service) when each file ends. If the files are small enough, or the user's upload speed is fast enough, this might cause problems. So the refresh is only allowed to run up to once per second.

A side effect of this is setting the local config.json to use the dev environment. This is currently needed to be able to run tests against CI, and will have no effect on either the built image or deployment.

Jira Ticket / Issue

e.g. https://kbase-jira.atlassian.net/browse/DATAUP-X

  • Added the Jira Ticket to the title of the PR e.g. (DATAUP-69 Adds a PR template)

Testing Instructions

  • Details for how to test the PR:
    Just upload a file, and it should refresh and appear right away.
  • Tests pass in travis and locally
  • Changes available by spinning up a local narrative and navigating to X to see Y

Dev Checklist:

  • My code follows the guidelines at https://sites.google.com/truss.works/kbasetruss/development
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have run Black and Flake8 on changed Python Code manually or with git precommit (and the travis build passes)

@coveralls
Copy link

coveralls commented Oct 23, 2020

Coverage Status

Coverage increased (+0.03%) to 17.007% when pulling 318407c on DATAUP-266-staging-refresh into 0322e93 on truss.

Comment on lines +86 to +91
it('gets user info and parsed into whether or not the user is linked to globus', async () => {
const $dummyNode = $('<div>'),
stagingWidget = new StagingDataTab($dummyNode);
const userInfo = await stagingWidget.getUserInfo();
expect(userInfo).toEqual({user: fakeUser, globusLinked: true});
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

extra tests! 🎉

Copy link
Collaborator

@ialarmedalien ialarmedalien left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarcloud
Copy link

sonarcloud bot commented Oct 23, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@@ -88,6 +88,12 @@
cursor: pointer;
}

.kb-data-staging__container {
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@briehl briehl merged commit a30f5aa into truss Oct 23, 2020
@briehl briehl deleted the DATAUP-266-staging-refresh branch October 23, 2020 23:41
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.

None yet

3 participants