-
Notifications
You must be signed in to change notification settings - Fork 41
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
Finally remove per-entity columns from EEA #4305
Conversation
2fe0b41
to
207de6e
Compare
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.
It looks great so far!
database/migrations/000102_eea_rm_per_entities_columns.down.sql
Outdated
Show resolved
Hide resolved
func (e *EEA) buildPullRequestInfoWrapper( | ||
ctx context.Context, | ||
repoID uuid.NullUUID, | ||
prID uuid.UUID, | ||
projID uuid.UUID, | ||
prID uuid.NullUUID, | ||
) (*entities.EntityInfoWrapper, error) { | ||
providerID, pr, err := getPullRequest(ctx, e.querier, projID, repoID.UUID, prID.UUID) | ||
providerID, repoID, pr, err := getPullRequest(ctx, e.querier, projID, prID) | ||
if err != nil { | ||
return nil, fmt.Errorf("error getting pull request: %w", err) | ||
} | ||
|
||
return entities.NewEntityInfoWrapper(). | ||
WithRepositoryID(repoID.UUID). | ||
WithRepositoryID(repoID). | ||
WithProjectID(projID). | ||
WithPullRequest(pr). | ||
WithPullRequestID(prID.UUID). | ||
WithPullRequestID(prID). | ||
WithProviderID(providerID), nil | ||
} |
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.
nit: it feels that code might get shorter both here and inside getPullRequest
(and the others) if you pass eiw
down to it instead of returning data to add.
3a6800a
to
11e0ba1
Compare
992e089
to
57c0d06
Compare
Now that the queries aren't using it and the main logic actually uses the central entity instances table, we can drop these. Closes: #4169 Signed-off-by: Juan Antonio Osorio <[email protected]>
57c0d06
to
db18589
Compare
Summary
Now that the queries aren't using it and the main logic actually uses
the central entity instances table, we can drop these.
Closes: #4169
Change Type
Mark the type of change your PR introduces:
Testing
Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.
Review Checklist: