ansible / azure-aap-deployment-driver

Apache License 2.0
2 stars 13 forks source link

AAP-9450 Present useful message when engine is dead #114

Closed bhavenst closed 9 months ago

bhavenst commented 9 months ago

Description

This PR adds a message "Deployment Engine unavailable, please re-deploy" when the login form receives a 502, which happens when the backend is timed out. This is a partial fix, since it doesn't take care of an already logged in screen. Maybe we should add a message on the UI that shows itself when the backend goes away too.

Commit message reminder

Commit messages are important because they will be used to build list of items included in Errata when the deployment driver container image is built and QE will use that list to figure out what to test before the image is published.

PR task checklist

Jira

This PR is for JIRA item: https://issues.redhat.com/browse/AAP-9450

Testing

Steps to test

  1. Pull down the PR
  2. Start deployment
  3. Wait for engine to end naturally or connect to container and kill it ('server' process).
  4. Attempt to log in, see new message.

Expected result

With the changes in this PR you will see a new message when attempting to log in when engine is down.

bhavenst commented 9 months ago

Screenshot from 2024-01-26 11-27-49

New commit changes Driver to Engine.

bhavenst commented 9 months ago

While this approach works and adds better handling of 502 error, we should follow up with a solution that checks status of the engine and present user with better, static page.

@tznamena Does this mean we need changes or OK as is?

Do you think we should also pop up a message on the main page if the backend goes away (GET on /steps starts failing, which could be a trigger).

tznamena commented 9 months ago

While this approach works and adds better handling of 502 error, we should follow up with a solution that checks status of the engine and present user with better, static page.

@tznamena Does this mean we need changes or OK as is?

Do you think we should also pop up a message on the main page if the backend goes away (GET on /steps starts failing, which could be a trigger).

This PR is OK as is, we will need another Jira work item to implement a status API for the engine and whole new static page. We can then add a logic that re-routes user to it once engine goes away.