-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client and Adapter config #30
Conversation
@@ -27,6 +27,10 @@ data class RegistrationRequestPayload( | |||
val v: String, | |||
) | |||
|
|||
enum class InngestSyncResult { |
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.
ignore this for now.
was initially planning to redo the registration but didn't touch it this time.
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.
looks good. so it looks like in priority order
- Inngest client is configured with constructor arguments
- configure with environment variables
- use default fallbacks
is that right?
EventApiBaseUrl("INNGEST_BASE_URL"), | ||
ApiBaseUrl("INNGEST_API_BASE_URL"), |
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.
FYI these 2 aren't in the spec, dunno if they should be https://github.com/inngest/inngest/blob/main/docs/SDK_SPEC.md#32-optional-variables
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.
spec is likely not fully up to date.
https://github.com/inngest/inngest-js/blob/1b9f101ca6cd310e429cebcf8bceaf2faf309624/packages/inngest/src/helpers/consts.ts#L25-L34
cc @jpwilliams @goodoldneon
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.
You can also see it in the docs as well.
https://www.inngest.com/docs/sdk/environment-variables
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 know about INNGEST_API_BASE_URL
because I asked it to be added. Otherwise the SDK won't work with our staging environment.
Dev("dev"), | ||
Prod("prod"), | ||
Other("other"), |
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.
On the inngest dashboard I see there's a concept of branch environments or user created environment names, would Other
be able to cover all those?
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.
Branch should be other values.
I don't remember exactly if this should be the case. Could be a question for @jpwilliams
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.
actually, I think we can skip branch environments for now. that's only for Vercel integration atm, and Vercel users don't use Java.
there might be cases where we have better integration with AWS Lambda or GCP Cloud Function to simulate branch environments but we're not there yet.
"1" -> InngestEnv.Dev | ||
else -> { | ||
var other = InngestEnv.Other | ||
other.value = sysDev |
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'm not sure if value
can be set to anything besides "other" 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.
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.
hm I guess it's just an instance variable and nothing is stopping you from having separate enums with the same value or changing the value either. Never thought about that before 🤷
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.
yup, exactly. probably not the best way to use it, so if we figure better ways in the future, we can swap it out.
The reason I know we want an other
is because some users want to run integration tests in CI using our Dev Server but want to not make it in dev
mode.
Correct 👍 |
Load client configuration and serve configuration following spec and existing SDKs.