Do you think it’d make sense to use Launchplan wit...
# announcements
s
Do you think it’d make sense to use Launchplan with version
latest
for scheduled workflows? It’d be useful for us so that we wouldn’t have to archive/ activate launchplans for each change.
p
Launchplan key is basically this
Copy code
type LaunchPlanKey struct {
	Project string `gorm:"primary_key;index:lp_project_domain_name_idx,lp_project_domain_idx" valid:"length(0|255)"`
	Domain  string `gorm:"primary_key;index:lp_project_domain_name_idx,lp_project_domain_idx" valid:"length(0|255)"`
	Name    string `gorm:"primary_key;index:lp_project_domain_name_idx" valid:"length(0|255)"`
	Version string `gorm:"primary_key" valid:"length(0|255)"`
}
which is combination of all project-domain-name-version Now with what you are saying only one such entity can be having latest version . So no new changes can be used for latest version and that won’t work. Each launchplan entity with its version is also immutable. Also if we use another field as an alias for latest , still we would have stop old running latest and start running the new latest.
cc : @katrina
k
@Prafulla Mahindrakar latest is just a desc sort by time. I do not follow your comment
@Stephen you are right, but there exists one api to do this. @katrina can you please help here? Goal is when they deploy a new launchplan it is active and the old one is inactive
s
Yes exactly, I couldn’t find anything related to that in the
flytectl update launchplan
section but maybe it’s something else? https://docs.flyte.org/projects/flytectl/en/latest/gen/flytectl_update_launchplan.html
k
This is what lyft / Spotify etc already do. So let me get back today
s
Thanks! I figured there was probably something existing already 🙇‍♂️
p
Thanks @Ketan (kumare3) for clarifying .
k
yeah I believe at lyft we set it so that we registered all entities and then activated all the launch plans in one script. there isn't a single api to register & activate currently
s
Were you able to find the code somewhere @Ketan (kumare3)? 😄
k
As katrina said it is client side in lyft haha. But order is register then activate. Let me discuss with her
p
Hi @Stephen , we can reduce the steps by having the registration in flytectl accept activation flag which will archive the currently active one and activate the newly registered launch plan and if it has schedule then new one will get scheduled and old one descheduled .Will that work for you
s
Yeah that would probably be very useful and helpful for us 😄
p
Sounds good.
🙏 1
k
How about an issue?
s
I can create one
k
Please do, will ensure we don't lose tracking
p
@Stephen created one here https://github.com/flyteorg/flyte/issues/2329 Let me know of any changes on it
🙏 1
163 Views