Skip to content

chore: cherry-pick #17934 into 2.22 #17952

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

Merged
merged 2 commits into from
May 20, 2025
Merged

chore: cherry-pick #17934 into 2.22 #17952

merged 2 commits into from
May 20, 2025

Conversation

dannykopping
Copy link
Contributor

Cherry-pick of #17934

ThomasK33 and others added 2 commits May 20, 2025 21:05
This PR optimizes the agent API by using the `workspace.OwnerUsername` field directly instead of making an additional database query to fetch the owner's username. The change removes the need to call `GetUserByID` in the manifest API and workspace agent RPC endpoints.

An issue arose when the agent token was scoped without access to user data (`api_key_scope = "no_user_data"`), causing the agent to fail to fetch the manifest due to an RBAC issue.

Change-Id: I3b6e7581134e2374b364ee059e3b18ece3d98b41
Signed-off-by: Thomas Kosiewski <tk@coder.com>
Signed-off-by: Danny Kopping <dannykopping@gmail.com>
@bpmct bpmct changed the title Cherry-pick #17934 into 2.22 chore: cherry-pick #17934 into 2.22 May 20, 2025
@bpmct bpmct merged commit 8708d81 into release/2.22 May 20, 2025
37 checks passed
@bpmct bpmct deleted the patch-2.22 branch May 20, 2025 19:27
@github-actions github-actions bot locked and limited conversation to collaborators May 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants