-
Notifications
You must be signed in to change notification settings - Fork 582
feat: WIP WIP WIP gateway #3732
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
|
||
// NewCertificateChallenge creates a new certificate challenges workflow instance | ||
// and ensures that we have a valid ACME User | ||
func NewCertificateChallenge(config CertificateChallengeConfig) *CertificateChallenge { |
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.
since you have been writing a workflow from scratch, how did it feel?
what can we improve?
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 think we should add an indompoency id to a workflow run so if I spawn multiple tasks with the same one only the first one gets ran for a cooldown of XX duration
} | ||
|
||
func (u *AcmeUser) GetEmail() string { | ||
return fmt.Sprintf("%s@%s", u.WorkspaceID, "unkey.fun") |
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.
can we leave that email as is?
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 will make it configurable
} | ||
|
||
if !foundUser.RegistrationUri.Valid { | ||
// todo: finish registration |
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.
adding a comment so we don't forget this todo
proxyService, err := proxy.New(proxy.Config{ | ||
Logger: svc.Logger, | ||
MaxIdleConns: transport.MaxIdleConns, | ||
IdleConnTimeout: "90s", |
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.
why don't we use time.Duration?
import ( | ||
"context" | ||
"time" | ||
) | ||
|
||
// Store defines the interface for a key-value store with TTL support | ||
type Store interface { | ||
Get(ctx context.Context, key string) ([]byte, bool, error) | ||
Set(ctx context.Context, key string, workspaceID string, value []byte, ttl *time.Duration) error | ||
Delete(ctx context.Context, key string) error | ||
ListByWorkspace(ctx context.Context, workspaceID string, cursor int64, limit int) ([]KvEntry, error) | ||
} |
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.
cc @chronark do we even need this anymore?
|
||
import "google/protobuf/timestamp.proto"; | ||
|
||
message HandleCertificateVerificationRequest { |
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 open for a differen name
@coderabbitai review |
✅ Actions performedReview triggered.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
What does this PR do?
Fixes # (issue)
If there is not an issue for this, please create one first. This is used to tracking purposes and also helps use understand why this PR exists
Type of change
How should this be tested?
Checklist
Required
pnpm build
pnpm fmt
console.logs
git pull origin main
Appreciated