Skip to content

fix(coderd): check if timings can be read #14697

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
Sep 17, 2024
Merged

Conversation

BrunoQuaresma
Copy link
Collaborator

No description provided.

Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Screenshot 2024-09-17 at 14 52 33

@@ -1792,6 +1792,10 @@ func (q *querier) GetProvisionerJobByID(ctx context.Context, id uuid.UUID) (data
}

func (q *querier) GetProvisionerJobTimingsByJobID(ctx context.Context, jobID uuid.UUID) ([]database.ProvisionerJobTiming, error) {
_, err := q.GetProvisionerJobByID(ctx, jobID)
Copy link
Contributor

Choose a reason for hiding this comment

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

This approach raised my eyebrow, and I was going to suggest not doing it this way but I see we have precedent for this in GetProvisionerJobByID itself. Please add a comment explaining this.

Copy link
Member

Choose a reason for hiding this comment

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

I'm sure we use a similar pattern for workspace builds or templates.

@BrunoQuaresma
Copy link
Collaborator Author

Screenshot 2024-09-17 at 14 52 33

LOL, but in my defense, the title is pretty descriptive and it is just 5 lines of code change

@BrunoQuaresma BrunoQuaresma merged commit 370f0b9 into main Sep 17, 2024
26 checks passed
@BrunoQuaresma BrunoQuaresma deleted the bq/fix-dbauthz-check branch September 17, 2024 13:57
@github-actions github-actions bot locked and limited conversation to collaborators Sep 17, 2024
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