-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff! One outstanding todo
@staticmethod | ||
def _get_env_var(env_var: str, default: Optional[str] = None) -> str: | ||
return os.environ.get(env_var, default) | ||
if not token: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may not need tenant id any more since the jwt wont be provisioned for a different tenant... something for a future pr
hatchet_sdk/loader.py
Outdated
def __hash__(self) -> int: | ||
return hash(json.dumps(self.model_dump(), default=str)) | ||
|
||
## TODO: Fix host port overrides here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
address todo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was planning to leave this for now since it's related to that outstanding PR in the non-fork - happy to address this now though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is done 👍
One other thought, it might be good to add a DEBUG config value so we're able to set via env var in addition to the client init. |
This seems reasonable to me - another option would be to make the default for that param be set to something like |
Copy of hatchet-dev#296
Overhauling the client config to use Pydantic to get rid of a lot of convoluted parsing + validation code.
Main things here:
One other important thing is I think we should remove all of the
load_dotenv()
stuff in favor of expecting that the person running the example has the correct env vars set, since this is more likely to be how the SDKs are used, and usingload_dotenv
creates race conditions between imports that rely on the env vars and when that line is runSome logs: