Open DiegoTavares opened 3 months ago
FYI @n-jay this is a good first issue to get involved on pycue and cuebot while also touching the database
Ack @DiegoTavares, thanks! Will check this out. Also, could I be assigned to this? I'll start working on it on the side and get in fully once the addon CI work is at a satisfactory level.
Will send any questions/doubts in a new mail thread.
@DiegoTavares, I'm gradually shifting to work on this. To make sure if I've properly understood this;
The implementation involves adding a new api call to the proto layer, implementing the client call on pycue and the server logic on cuebot.
show_alias
and show
tables currently exist. Correct me if I'm wrong but I believe they are in V1_initial_schema.sql
, yes?
The new API should add a new entry to show_alias
and concatenate the _archived
suffix to the existing entry in the show
table.
the flow is as follows:
pycue (API) ▶️ proto layer (new CreateShowAlias
rpc) ▶️ cuebot logic (writing data to the show_alias
table and updating show
table).
I think you got it all right. One thing that might need to be added is a property on cuebot indicating what show be used as a default as an alias for archive shows, and maybe the api function can take an optional argument to provide another show if needed.
from opencue import api
shows = api.findShow("wam")
if shows:
show = shows[0]
show.archive(alias_to="trn")
One thing that might need to be added is a property on cuebot indicating what show be used as a default as an alias for archive shows
Noted @DiegoTavares. Will send my initial PR and clarify my doubts on it as I make progress.
Feature request
Add a new methods to the
show
api wrapper to allow archiving a show that has been inactive for a while.Example of the usage:
Context
Archiving a show is useful because it enables jobs to be submitted to the archived show to be executed by allocations subscribed to the show it has been alias to. For example, if a facility has a show called ABC that has wrapped, but its content might still be useful for training purposes, a show calls TRN (training) could be created with small group of hosts assigned to it and ABC could be aliased to TRN which would make jobs submitted to ABC to be picked up by hosts assigned to TRN.
Mechanism
Shows can already be aliased on the database, the current process requires going to the database and adding an entry with the aliased show to the
show_alias
table and renaming the existing show on theshow
table to append.archived
. Ideally this should be a hidden feature on the API.The implementation involves adding a new api call to the proto layer, implementing the client call on pycue and the server logic on cuebot.
To help with the development of this feature, here's a database function that can be triggered to archive a show on demand.