https://flyte.org logo
#announcements
Title
# announcements
s

Stephen

04/01/2022, 9:48 AM
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

Prafulla Mahindrakar

04/01/2022, 12:56 PM
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

Ketan (kumare3)

04/01/2022, 1:27 PM
@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

Stephen

04/01/2022, 1:29 PM
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

Ketan (kumare3)

04/01/2022, 1:30 PM
This is what lyft / Spotify etc already do. So let me get back today
s

Stephen

04/01/2022, 1:31 PM
Thanks! I figured there was probably something existing already 🙇‍♂️
p

Prafulla Mahindrakar

04/01/2022, 1:33 PM
Thanks @Ketan (kumare3) for clarifying .
k

katrina

04/01/2022, 4:09 PM
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

Stephen

04/04/2022, 8:21 AM
Were you able to find the code somewhere @Ketan (kumare3)? 😄
k

Ketan (kumare3)

04/04/2022, 1:43 PM
As katrina said it is client side in lyft haha. But order is register then activate. Let me discuss with her
p

Prafulla Mahindrakar

04/07/2022, 5:04 AM
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

Stephen

04/07/2022, 10:20 AM
Yeah that would probably be very useful and helpful for us 😄
p

Prafulla Mahindrakar

04/07/2022, 12:17 PM
Sounds good.
🙏 1
k

Ketan (kumare3)

04/07/2022, 2:11 PM
How about an issue?
s

Stephen

04/07/2022, 2:11 PM
I can create one
k

Ketan (kumare3)

04/07/2022, 3:10 PM
Please do, will ensure we don't lose tracking
p

Prafulla Mahindrakar

04/07/2022, 3:59 PM
@Stephen created one here https://github.com/flyteorg/flyte/issues/2329 Let me know of any changes on it
🙏 1
27 Views