openshift-online / maestro

Maestro Service Repo
Apache License 2.0
8 stars 15 forks source link

Introduce "external_id" #67

Closed clyang82 closed 2 months ago

clyang82 commented 3 months ago

if you post the same resource, i believe you'd get dupes. Maestro isn't inspecting the generic payload. not sure this is even practical. it might be best, then, to include an "external_id" that CS can provide (its own PK for that record, for example) that is unique. in this way: TX1: CS persists to db, gets a PK TX2: CS posts resource w/ the PK. it would fail if the same resource is posted more than once. TX3: Maestro can have many copies of this resource in the queue. resources are applied idempotently in the cluster.

FYI @markturansky

clyang82 commented 2 months ago

working on this issue.

markturansky commented 2 months ago

@clyang82 is this a moot point now that name is provided by the caller and enforced for uniqueness?

markturansky commented 2 months ago

see https://github.com/openshift-online/maestro/pull/63

clyang82 commented 2 months ago

Yes. I think it can be. if the name is provided, then we use it and enforce for uniqueness. if the name is not provided, then we use ID as the name.