-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Backend supporting changes for Bot creation flow #37348
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
Changes from all commits
40b9f96
dc91632
5fe78cd
00fae16
9811ec5
1260da9
09123cb
fe49ade
4f23e30
18ce482
7af6e1e
6824ffc
daff149
3751467
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,6 +108,13 @@ const ( | |
| // assistantLimiterCapacity is the total capacity of the token bucket for the assistant rate limiter. | ||
| // The bucket starts full, prefilled for a week. | ||
| assistantLimiterCapacity = assistantTokensPerHour * 24 * 7 | ||
| // webUIFlowLabelKey is a label that may be added to resources | ||
| // created via the web UI, indicating which flow the resource was created on. | ||
| // This label is used for enhancing UX in the web app, by showing icons related, | ||
| // to the workflow it was added, or providing unique features to those resources. | ||
| // Example values: | ||
| // - github-actions-ssh: indicates that the resource was added via the Bot GitHub Actions SSH flow | ||
| webUIFlowLabelKey = "teleport.internal/ui-flow" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Neither the comment, nor the name actually explains what is the general purpose of this label, and thus, I'm confused. What does "web UI flow" mean in this context? So far, there's just one value, could you give a speculative example of what other values may be? What decision will we make using this label's value?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The initial purpose of this is showing icons in the Bot listing pages based on the workflow used to create the bot, and providing a special editing page to those bots. I've updated the comment daff149: // webUIFlowLabelKey is a label that may be added to resources
// created via the web UI, indicating which flow the resource was created on.
// This label is used for enhancing UX in the web app, by showing icons related,
// to the workflow it was added, or providing unique features to those resources.
// Example values:
// - github-actions-ssh: indicates that the resource was added via the Bot GitHub Actions SSH flowPlease let me know if we should add more context. |
||
| ) | ||
|
|
||
| // healthCheckAppServerFunc defines a function used to perform a health check | ||
|
|
@@ -933,6 +940,8 @@ func (h *Handler) bindDefaultEndpoints() { | |
| h.GET("/webapi/sites/:site/machine-id/bot/:name", h.WithClusterAuth(h.getBot)) | ||
| // Create Machine ID bots | ||
| h.POST("/webapi/sites/:site/machine-id/bot", h.WithClusterAuth(h.createBot)) | ||
| // Create bot join tokens | ||
| h.POST("/webapi/sites/:site/machine-id/token", h.WithClusterAuth(h.createBotJoinToken)) | ||
| } | ||
|
|
||
| // GetProxyClient returns authenticated auth server client | ||
|
|
||
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.
Comment doesn't add value, consider skipping.
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.
Even when not adding value, it seems we always add a godoc comment to any public field.