Martin Hwasser
10/21/2022, 12:29 PMflytekit.LaunchPlan.get_or_create
. However, when I try to register this archive with the launchplans, it fails on a particular one with the name: a-cst-old
, giving the error: Error: rpc error: code = InvalidArgument desc = missing name
It’s just this name and the fixed input (string) that’s changed, nothing else, if I prefix this name with something else like, it works.
And on a related note, is there a way to delete, not just archive, all launchplans?Shivay Lamba
10/21/2022, 3:44 PMPrafulla Mahindrakar
10/26/2022, 4:46 PMfunc TestUnmarshalProtoLaunchPlan(t *testing.T) {
pbBytes, err := os.ReadFile("/Users/praful/Downloads/17_a-cst-old_3.pb")
lp := &admin.LaunchPlan{}
err = proto.Unmarshal(pbBytes, lp)
assert.Nil(t, err)
assert.Equal(t, "a-cst-old", lp.Id.Name)
}
func TestUnmarshalProtoTaskSpec(t *testing.T) {
pbBytes, err := os.ReadFile("/Users/praful/Downloads/17_a-cst-old_3.pb")
lp := &admin.TaskSpec{}
err = proto.Unmarshal(pbBytes, lp)
assert.Nil(t, err)
assert.Equal(t, "a-cst-old", lp.Template.Id.Name)
}
Haytham Abuelfutuh
message RegistrationEntity {
oneof item {
TaskTemplate task = 1;
WorkflowTemplate workflow = 2;
...
}
}
There is no way around backward compatibility ugliness here, we will have to fallback to existing logic. Both options require changes in flytekit. I do think the second option a tad better since it doesn’t rely on string comparisons and doesn’t assume the existence of “files” to begin with (this logic works just fine with REST APIs and programmatic APIs)…
If we don’t have one already, we should file an issue on this and list these (and other?) options considered and maybe move the discussion there..
CC @Yee @Ketan (kumare3) @Eduardo Apolinario (eapolinario)Prafulla Mahindrakar
11/01/2022, 6:39 AM