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

feat(issue-search): Add group_first_release_id to the GroupAttributes table #5986

Merged
merged 4 commits into from
Jun 7, 2024

Conversation

snigdhas
Copy link
Member

@snigdhas snigdhas commented May 30, 2024

Add a new column, group_first_release_id to the GroupAttributes table. This column will be backfilled as part of the issue search improvements, with data from Group.first_release_id.

This column will help speed up searches for firstRelease. We'll still handle firstRelease queries using Postgres if the query includes the environment.

@snigdhas snigdhas marked this pull request as ready for review May 30, 2024 18:33
@snigdhas snigdhas requested a review from a team as a code owner May 30, 2024 18:33
@snigdhas snigdhas requested a review from a team May 30, 2024 18:33
Copy link

github-actions bot commented May 30, 2024

This PR has a migration; here is the generated SQL

-- start migrations

-- forward migration group_attributes : 0003_add_first_release_id_to_group_attributes
Local op: ALTER TABLE group_attributes_local ADD COLUMN IF NOT EXISTS group_first_release_id Nullable(UUID) AFTER group_priority;
Distributed op: ALTER TABLE group_attributes_dist ADD COLUMN IF NOT EXISTS group_first_release_id Nullable(UUID) AFTER group_priority;
-- end forward migration group_attributes : 0003_add_first_release_id_to_group_attributes




-- backward migration group_attributes : 0003_add_first_release_id_to_group_attributes
Distributed op: ALTER TABLE group_attributes_dist DROP COLUMN IF EXISTS group_first_release_id;
Local op: ALTER TABLE group_attributes_local DROP COLUMN IF EXISTS group_first_release_id;
-- end backward migration group_attributes : 0003_add_first_release_id_to_group_attributes

Copy link
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

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

This looks good to me. first_release_id also exists on GroupEnvironment, are we also planning to replicate that somehow?

storage_set=StorageSetKey.GROUP_ATTRIBUTES,
table_name="group_attributes_local",
column=Column(
"group_first_release_id", UInt(8, Modifiers(nullable=True))
Copy link
Member

Choose a reason for hiding this comment

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

Question, is this actually a full release ID? Is that really a UInt8 only? Aren't releases UUIDs?

Copy link
Member Author

Choose a reason for hiding this comment

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

UUID makes sense, thanks

@snigdhas
Copy link
Member Author

snigdhas commented Jun 6, 2024

This looks good to me. first_release_id also exists on GroupEnvironment, are we also planning to replicate that somehow?

We'll handle firstRelease queries using Postgres if the query includes the environment. Adding this column will still help improve queries that don't include an anv.

@snigdhas snigdhas requested a review from wedamija June 6, 2024 22:07
@snigdhas snigdhas merged commit b79a63b into master Jun 7, 2024
30 checks passed
@snigdhas snigdhas deleted the snigdha/add-first-release-migration branch June 7, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants