Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

real time deck support #579

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Yicheng-Lu-llll
Copy link
Member

@Yicheng-Lu-llll Yicheng-Lu-llll commented Jun 22, 2023

TL;DR

This PR adds real-time deck support.

Previously:

  1. Propeller would only send a node event to the admin when there was a change in the node state (e.g., from 'Queued' to 'Running', or from 'Running' to 'Succeeding').
  2. The deck URI was only added to the node event if the URI existed in remote storage(S3) and the task had succeeded.
  3. If deck URI is in node event, the deck URI would be stored in the admin and later fetched by the console.

With this PR:

  1. Propeller will continue to send node events to the admin upon any changes in node state.
  2. Propeller will now always add the deck URI to the event at non-final state(like at running time, so it is possible deck uri actually does not exist).
  3. Once the task is in final state(succeeded or failed), deck URI will be removed in node event if not exists.
  4. the deck URI will be stored in the admin and fetched by the console, even while the task is running. During running time, it is possible the deck URI is stored though actually not exists. But once the task is finished, deck URI will be removed if not exists.

Why not only add deck URI to event when the URI exists?

Due to constraints within Propeller, we cannot determine if a user has enabled deck or when they will upload the deck.html to remote storage. Therefore, without constantly checking the existence of the URI at every reconciliation (which would be too costly), it's impossible to know when the URI becomes available.

More details

As node events are only sent when the node state changes, the only chance we have to send the deck URI with the event is when the state changes from 'Queued' to 'Running'. As explained above, it is not feasible to send additional events once the deck URI exists, as we cannot accurately determine when the URI will become available.

Checks and behaviors

  1. Running a task with deck disabled. Deck URI should appears during the task running time but will not shown when task succeeded or failed.
  • running:
image - succeeded: image - failed: image
  1. Running a task with deck enabled. Deck URI should appears during the task running time as well as when task succeed or failed.
  • running:
image - succeeded: image - failed: image

real time deck support includes:

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Signed-off-by: Yicheng-Lu-llll <[email protected]>
Signed-off-by: Yicheng-Lu-llll <[email protected]>
Signed-off-by: Yicheng-Lu-llll <[email protected]>
Signed-off-by: Yicheng-Lu-llll <[email protected]>
Signed-off-by: Yicheng-Lu-llll <[email protected]>
@Yicheng-Lu-llll Yicheng-Lu-llll changed the title [WIP]real time deck support real time deck support Jun 23, 2023
@Yicheng-Lu-llll Yicheng-Lu-llll marked this pull request as ready for review June 23, 2023 21:55
@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #579 (ce0d4a0) into master (7b104d3) will increase coverage by 0.43%.
The diff coverage is 66.66%.

❗ Current head ce0d4a0 differs from pull request most recent head 4e0adf1. Consider uploading reports for the commit 4e0adf1 to get more accurate results

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