#Checks TUI

1 messages ยท Page 1 of 1 (latest)

covert depot
#

To get this to work I made a change to how checks work: now you can return an EnvironmentCheck instead of a Result, which will be evaluated recursively. I had to do this so that it gets evaluated top-down instead of bottom-up, otherwise the nested parent-child relationships don't work.

devout socket
# covert depot To get this to work I made a change to how checks work: now you can return an `E...

Ah okay, good to know. Did you make the change so that it has to be an EnvironmentCheck or did you just handle both the case where it's an EnvironmentCheck and an EnvironmentCheckResult?

Either is totally fine, just curious because pretty much all of these different entrypoint types have ended up with slightly different behaviors/requirements in terms of what the SDKs are expected to return.

Has been very useful to explore the whole landscape of possibilities, but resulted in tons of kludge everywhere, so one of the followups as part of starting to merge all this stuff w/ clean implementations is going to be to try to find a more cohesive+simple model rather than special handling all over the place

covert depot
#

And yeah, it's honestly kind of fun defining what each type means for each entrypoint. Feels sort of like building out a little language. Just have to make sure it doesn't feel like total hackery in the end (i.e. internally consistent, never a time where you want two different behaviors from one return type, etc).

devout socket
# covert depot And yeah, it's honestly kind of fun defining what each type means for each entry...

Yeah I agree, there's some interesting tradeoffs here. On one hand, it's great for user code to be flexible and intuitive (i.e. a Check should be implementable as just returning (string, error), returning just error, returning a CheckResult, returning a Check, etc.), but that means either:

  1. Every SDK needs to have special handling for this, which is (work * numSDKs) and also could lead to confusing divergence
  2. The graphql server needs to handle the polymorphism, which is less work for SDKs but creates incredibly convoluted code in the server and will require pretty thorough SDK-developer docs on the exact contract

I think we'll definitely want to try going with 2 and just figure out ways of structuring our code such that it's clear and clean

covert depot
#

Agree, I have some loose ideas for 2, like using something like {"type":"Container","id":"eyJ..."} so we can distinguish ID types. Or potentially changing ID to include the type.

devout socket
covert depot
#

changing IDs to something like Container:eyJ... could be slightly helpful for debugging too ๐Ÿค”

#

i vaguely remember there being some kind of standard for this...

devout socket
covert depot
#

(not that we need to solve this now)