Repository: Cloud-CV/EvalAI
Issue: [Backend] Show fargate worker status on manage tab
Root cause: Unimplemented Feature Gap

### Description

Using the manage tab challenge hosts can start/stop/restart the challenge workers but they don't get any feedback from EvalAI when worker started/stopped/restarted successfully other than notification when action was executed. As fargate worker takes a few minutes to complete start/stop/restart hosts don't know the status of the challenge worker. We want to show status of fargate worker for each challenge in the manage tab. This status will be updated every 30 seconds (poll duration can be discussed), we will need a polling setup to poll the worker status using boto3 APIs.

### Expected deliverables

1. Polling setup to fetch challenge worker status using boto3 APIs
2. APIs on the backend to fetch worker status
3. Frontend changes to show status on the manage tab

@Ram81 could I please work on the issue?

@burnerlee  sure, go ahead

@Ram81 how do I interact with the containers in the development environment for testing? It says that I can't perform actions on container in the development mode

also @Ram81, I think this is the function I would need to fetch the details. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/eks.html#EKS.Client.describe_fargate_profile. Could you please confirm it once 😅 
![Screenshot from 2021-03-11 20-54-01](https://user-images.githubusercontent.com/55936223/110810579-efda1f00-82ab-11eb-8a84-b21dc2927d71.png)



I am planning to call it repeatedly after an interval of poll-time similar to what is done to fetch logs

>@Ram81 how do I interact with the containers in the development environment for testing? It says that I can't perform actions on container in the development mode

@burnerlee you won't be able to test fargate setup locally. You can look at boto3 APIs and code it up. Once you have a PR ready I can help you with testing.

>also @Ram81, I think this is the function I would need to fetch the details. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/eks.html#EKS.Client.describe_fargate_profile. Could you please confirm it once 😅

@burnerlee you have to look for APIs in ECS [here](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ecs.html#ECS.Client.describe_tasks). For prediction upload challenges we don't run workers on EKS. You have to find an API which lets you fetch tasks for a particular task definition and show the status of task on the UI. Each of our challenge has a unique task definition but they all run in one ECS cluster

>I am planning to call it repeatedly after an interval of poll-time similar to what is done to fetch logs

Yes, this sounds good

thank you so much @Ram81... also, this status is to be shown on the frontend_v1 only? Cause you mentioned the manage tab. In frontend_v2, I found It in the settings tab for the challenge

@Ram81 @Alabhya268 is there some issue on the frontend_v1? i am not able to run localhost:8888 in my browser. I've tried building the project again as well

@burnerlee , Seems to be working fine in my pc.

> @Ram81 @Alabhya268 is there some issue on the frontend_v1? i am not able to run localhost:8888 in my browser. I've tried building the project again as well

Could you please show error its showing ?


oh, i just figured out the problem... thank you for your help @Alabhya268 , I had a formatting error in the code while I was editing it 

hey @Ram81  i want to make contribution for this issue can i go ahead