helpful-application-7107
09/09/2024, 8:24 PMid
and ensure that I don't create twice the same resource (I think I was kind of abusing the API in that sense).
I don't think our REST API ever let set the id
directly, but maybe you were hitting the internal API endpoints directly, or maybe the yaml file allowed you to specify an id
?
> This means that I need to pull the "state" from the endpoint (e.g. the current list of projects), do the diff with the config in git and then adjust my call depending on whether I need to delete, create or update the items to reflect my new "state" (I'm basically creating a poor man's version of terraform to manage my configs).
I agree that currently you have to check against what is already in the database and get the ID for the matching property (relying on names, probably for your own purposes) and then updating it rather than recreating it.
Let me ask someone more familiar with this kind of system to chime in.helpful-application-7107
09/09/2024, 8:26 PMyaml
file is one approach, but then other asset management will have to happen in the way I describe above (getting + updating asset if it exists, creating it otherwise).nutritious-easter-80486
09/09/2024, 8:34 PMwooden-butcher-11824
09/10/2024, 9:04 AMadd new definition & local test -> submit MR -> merge & deploy to preprod -> final QA -> release & deploy to prod
. This way I can audit and validate the creation and modification of metrics and ensure "stability" of prod (preprod would also be used to check upgrades of Growthbook).
Another side effect that I appreciate is that I can ensure naming conventions, auto tagging/projects.
I hope it clarifies my case which I know is quite convoluted 😅
PS: I'm hoping to be able to open source this project in case other folks are interestednutritious-easter-80486
09/10/2024, 4:29 PMid
field to create directly. I don't have a ton of guidance to add right now, it seems like it'll be a case of finding other fields per object type that you can use to ensure uniqueness. I'm personally not familiar enough with our metric related objects to have any easy answers to that initial question of yours, but I can agree that overall it seems like a reasonable approach to me.wooden-butcher-11824
09/12/2024, 1:12 PMid
and pass the object as data
. The other endpoints related to FactTable/FactMetrics/etc. are actually more classical if one can sayhelpful-application-7107
09/18/2024, 12:06 PM