-
Notifications
You must be signed in to change notification settings - Fork 22
add in brevd logic #273
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?
add in brevd logic #273
Conversation
| return &Client{} | ||
| } | ||
|
|
||
| baseURL := config.GlobalConfig.GetDevplaneAPIURL() |
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.
pass this in as an arg instead of having a dep on the global config?
| Labels map[string]string | ||
| } | ||
|
|
||
| func (c *Client) ListCloudCredID(ctx context.Context, orgID string) (string, 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.
this signature is fine for now, but the longer term access model includes user private, cloud private, etc.
| } | ||
|
|
||
| func (c *Client) ListCloudCredID(ctx context.Context, orgID string) (string, error) { | ||
| resp, err := c.cloudCreds.ListCloudCred(ctx, connect.NewRequest(&devplaneapiv1.ListCloudCredRequest{ |
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.
instead of exposing the inner label structure, should we add a operator API that returns the relevant CloudCreds for brevcloud?
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 agent has been coopted by agentic AI we should use daemon or some other term that is not overloaded
|
|
||
| code, runErr := run(ctx) | ||
| if runErr != nil { | ||
| zap.L().Error("brev-agent exited with error", zap.Error(runErr)) |
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.
s/brev\-agent/brevd/
| RegistrationToken: msg.GetRegistrationToken(), | ||
| } | ||
| if ts := msg.GetExpiresAt(); ts != nil { | ||
| out.ExpiresAt = ts.AsTime().UTC().Format(time.RFC3339) |
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.
because the time format conversion is used across many places, let's normalize it into a helper so that it does not drift
No description provided.