Skip to content

[P0] Clicking 'Start Discovery' doesn't start discovery process #179

Description

@frankbria

When the user is on the project page: /projects/[id] and the project is not finished with discovery, there is a button 'Start Discovery' which should begin the discovery process. But, when the user clicks the button, the API (/projects/[id]/start) returns the following:

{message: "Project 1 is already running", status: "running"}
message
: 
"Project 1 is already running"
status
: 
"running"

Because of this message, the page does not kick off any discovery process.

Expected Behavior:

  1. Even if the project is already running, the Start Discovery button should begin the discovery process from scratch. Future issues address what happens if the project is part-way through the discovery process.
  2. The project page already queries the API (/projects/[id]/status) which in the case of a project that hasn't begun discovery returns the following:
{project_id: 1, name: "test-project", status: "running", phase: "discovery", workflow_step: 1,…}
name: "test-project"
phase: "discovery"
progress: {completed_tasks: 0, total_tasks: 0, percentage: 0}
completed_tasks: 0
percentage: 0
total_tasks: 0
project_id: 1
status: "running"
workflow_step: 1

This response should automatically indicate to the application that the discovery process has not begun and should now begin (or at least ask the user if they're ready to begin). So, the button and/or the status information should kick off the process. Currently, it does not.

In addition to solving the workflow issue, unit tests on the button and E2E tests on the workflow should have caught this but did not. They need to be updated in order to handle this workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0-blocker-betaCritical blocker - must fix before beta testingbugSomething isn't workingux

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions