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

Application Instances: Live statuses #1926

Merged
merged 17 commits into from
Apr 11, 2023
Merged

Conversation

Pezmc
Copy link
Contributor

@Pezmc Pezmc commented Apr 6, 2023

Description

  • Adds start/resart/suspend/delete to the Application Overview
  • Adds polling of instance status to Team > Applications, Application > Overview and Instance > Overview

Related Issue(s)

Fixes #1911
Fixes #1919

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • [-] Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • [-] Changes flowforge.yml?
    • Issue/PR raised on flowforge/helm to update ConfigMap Template
    • Issue/PR raised on flowforge/CloudProject to update values for Staging/Production

Labels

  • Backport needed? -> add the backport label
  • Includes a DB migration? -> add the area:migration label

@Pezmc Pezmc requested a review from joepavitt April 6, 2023 14:03
@joepavitt
Copy link
Contributor

joepavitt commented Apr 7, 2023

State doesn't seem to refresh after "stopped" when doing a restart. Doing "suspend" and then a "start" works well.

Screen.Recording.2023-04-07.at.09.32.54.mov

@joepavitt
Copy link
Contributor

We seem to get 3 different values for "last updated/deployed" depending on which screen we look at, which I'm guessing means a different API call?

No Data:

This appears on the Team > Applications screen. Looking at the API responses for /applications and /status, we don't ever seem to return data that could populate here.

Screenshot 2023-04-07 at 10 12 50

Last Deployed in Node-RED

This value aligns with when the "Deploy" button was last clicked inside Node-RED:

Screenshot 2023-04-07 at 10 12 41

Last Edited

This seems to align with when there was any change to the Instance itself, e.g. restarted/suspended?

Screenshot 2023-04-07 at 10 12 57

@joepavitt
Copy link
Contributor

Just also raising recent test failure here as this looks like a strange one:

⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  test/unit/frontend/utils/elapsedTime.spec.js > elapsedTime > compares relative to now if only a to date is passed
AssertionError: expected '30 minutes, 14 seconds' to be '30 minutes, 15 seconds' // Object.is equality
 ❯ test/unit/frontend/utils/elapsedTime.spec.js:58:35
     56|         soon.setSeconds(soon.getSeconds() + 15)
     57| 
     58|         expect(elapsedTime(soon)).toBe('30 minutes, 15 seconds')
       |                                   ^
     59|     })
     60| 

  - Expected   "30 minutes, 15 seconds"
  + Received   "30 minutes, 14 seconds"

@Pezmc
Copy link
Contributor Author

Pezmc commented Apr 11, 2023

Looks like the restarting issue isn't reproducible on the stub driver, am looking into it!

@Pezmc
Copy link
Contributor Author

Pezmc commented Apr 11, 2023

Let's split out the last updated issue separately so this PR can move forward since a bunch of the others depend on it!

@joepavitt I ended up fixing them as part of this PR, now all refer to the last flow update.

@joepavitt
Copy link
Contributor

joepavitt commented Apr 11, 2023

Screenshot 2023-04-11 at 09 15 13

Screenshot 2023-04-11 at 09 14 02

now seeing all of my instances in "Starting" state as returned by the API, despite them all actually having been started or suspended (showing as "unknown" in API response at Application level)

@joepavitt
Copy link
Contributor

hmm, just went back to the overview again, and now they're all showing as "running" as they should have. Suspect this was a delay from restarting FlowForge? but it's still odd...

The "unknown" state is still an issue

@joepavitt
Copy link
Contributor

Unfortunately, this has now completely broken status for Node-RED instances. Restarting gets them stuck in "starting"

@Pezmc
Copy link
Contributor Author

Pezmc commented Apr 11, 2023

Joe and I looked into this and confirmed most of the issues outlined above were only on his local (with the localfs driver). We're doing another round of click testing now.

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