Duke-GCB / bespin-ui

An ember.js application frontend for bespin-api
MIT License
2 stars 2 forks source link

Duke DS Project listing occasionally incomplete #59

Open dleehr opened 7 years ago

dleehr commented 7 years ago

Need to troubleshoot further, but sometimes when I start picking files for a workflow, only 2-3 projects appear in my listing. This may be an issue in bespin-api, perhaps not fetching all pages. But it's visible here, so we'll start in bespin-ui.

dleehr commented 7 years ago

Reloading the page seems to work around the issue, but it causes the job name to be lost

johnbradley commented 7 years ago

@dleehr I have been unable to reproduce this issue. I tried chrome, safari and firefox creating a new job and opening the --Select a Project-- dropdown. After a second it finished loading and populates with all my projects. Perhaps bug this is specific to your list of projects?

dleehr commented 7 years ago

Just revisiting. In Safari I can reproduce this if I navigate to /jobs/new/build-answer-set/3 and quickly click the dropdown. Only 4 projects show for me:

screen shot 2017-09-01 at 11 55 22 am

The bug doesn't seem to be on the bespin-api side, if I look at the API request that my browser made, I can see that /api/dds-projects/ returned a JSON object with 43 projects in it.

dleehr commented 7 years ago

Happened in chrome too. Same four projects. If I look in the ember inspector, I can see that 43 dds-projects are loaded, but the control only shows 4.

dleehr commented 7 years ago

I can reproduce it consistently in safari with private mode. Maybe there's something happening in the sortBy

dleehr commented 7 years ago

I'm still seeing this and I think I understand why. The list of projects are output projects - places that my bespin jobs have uploaded data.

  1. When I first view the list of jobs and their statuses, any completed jobs will include a link to the DDS project (or the readme)
  2. The component that renders this link uses a job-output-dir model (soon to be job-dds-output-project). That model has a 1:1 relationship with a dds-project. Rendering this list causes those few dds-projects to be loaded into the store.
  3. When I create a new job and browse for my projects, the dds-projects service finds all the records in the store. The output projects are already in the store and this doesn't seem to fetch additional records from the server
  4. Reloading the page fixes the issue because it discards the entire application instance. On the next findAll(), there are no projects in the store, so it fetches them from the server.