- Notifications
You must be signed in to change notification settings - Fork1k
feat: add managed agent license limit checks#18937
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
- Adds a query for counting managed agent workspace builds between two timestamps- The "Actual" field in the feature entitlement for managed agents is now populated with the value read from the database- The wsbuilder package now validates AI agent usage against the limit when a license is installed
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.
LGTM, couple minor points; I don't need to re-review.
ifnextTransition!="" { | ||
builder:=wsbuilder.New(ws,nextTransition). | ||
builder:=wsbuilder.New(ws,nextTransition,*e.buildUsageChecker.Load()). |
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 could panic; can you add some protection for it?
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.
The atomic pointer is preloaded with a value before the AGPL API gets constructed, so there's no opportunity for it to be misused or ever hold nil. We also have many other atomic pointers that get dereferenced like this, such as*api.Auditor.Load()
which is used in every auditable API endpoint.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
} | ||
builder:=wsbuilder.New(workspace,database.WorkspaceTransition(createBuild.Transition)). | ||
builder:=wsbuilder.New(workspace,database.WorkspaceTransition(createBuild.Transition),*api.BuildUsageChecker.Load()). |
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 panic
Uh oh!
There was an error while loading.Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
9a6dd73
intomainUh oh!
There was an error while loading.Please reload this page.
Most of the code is new tests and updating old ones.
Closescoder/internal#777