Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(coderd): handle deletes and links for new agent/app audit resources#16670

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

Merged
mafredri merged 1 commit intomainfrommafredri/fix-coderd-audit-links
Feb 26, 2025

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedFeb 24, 2025
edited
Loading

These code-paths were overlooked in#16493.

@mafredrimafredri self-assigned thisFeb 24, 2025
@mafredrimafredri requested a review fromEmyrkFebruary 24, 2025 12:24
if xerrors.Is(err, sql.ErrNoRows) {
return true
}
api.Logger.Error(ctx, "unable to fetch workspace", slog.Error(err))
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Review: This code-path is confusing, I feel we should return an explicit boolean here, but I simply followed existing convention.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I agree. Do we run a db query for every single audit log row? I was unaware this function existed tbh

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yeah, sure looks like we call it as part ofconvertAuditLog 😰. I'm surprised the API response isn't slower TBH.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I created an issue:#16718

Copy link
Member

@EmyrkEmyrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This follows our existing patterns. I agree both this functions feel a bit off, and feel inefficient too.

Do we really do these functions for every audit log row?!

if xerrors.Is(err, sql.ErrNoRows) {
return true
}
api.Logger.Error(ctx, "unable to fetch workspace", slog.Error(err))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I agree. Do we run a db query for every single audit log row? I was unaware this function existed tbh

@mafredri
Copy link
MemberAuthor

Do we really do these functions for every audit log row?!

Yeah, I was pretty surprised as well. I'm going to merge this but let's create a follow-up issue to track improvements to this code-path.

@mafredrimafredri merged commitb94d2cb intomainFeb 26, 2025
34 checks passed
@mafredrimafredri deleted the mafredri/fix-coderd-audit-links branchFebruary 26, 2025 17:16
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 26, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EmyrkEmyrkEmyrk approved these changes

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@mafredri@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp