Skip to content
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

Merged
merged 1 commit into from
Aug 29, 2024
Merged

Conversation

JAORMX
Copy link
Contributor

@JAORMX JAORMX commented Aug 28, 2024

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:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@JAORMX JAORMX marked this pull request as draft August 28, 2024 13:16
@JAORMX JAORMX force-pushed the rm-eea-entities-columns branch 2 times, most recently from 2fe0b41 to 207de6e Compare August 28, 2024 14:33
Copy link
Contributor

@blkt blkt left a 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!

Comment on lines 321 to 337
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
}
Copy link
Contributor

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.

@JAORMX JAORMX force-pushed the rm-eea-entities-columns branch 3 times, most recently from 3a6800a to 11e0ba1 Compare August 29, 2024 05:37
@JAORMX JAORMX marked this pull request as ready for review August 29, 2024 05:39
@coveralls
Copy link

coveralls commented Aug 29, 2024

Coverage Status

coverage: 53.961% (+0.01%) from 53.947%
when pulling db18589 on rm-eea-entities-columns
into e0376fe on main.

dmjb
dmjb previously approved these changes Aug 29, 2024
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]>
@JAORMX JAORMX merged commit 22600c4 into main Aug 29, 2024
21 checks passed
@JAORMX JAORMX deleted the rm-eea-entities-columns branch August 29, 2024 10:37
@JAORMX JAORMX restored the rm-eea-entities-columns branch September 4, 2024 06:29
@JAORMX JAORMX deleted the rm-eea-entities-columns branch September 4, 2024 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove per-entities table references in EEA
6 participants