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

fix(group-attributes): Modify the column type for group_first_release_id to bigint #6040

Merged
merged 5 commits into from
Jun 20, 2024

Conversation

snigdhas
Copy link
Member

@snigdhas snigdhas commented Jun 18, 2024

The group_first_release_id column was added to GroupAttributes as UUID but release IDs are bigints. The processor and YAML changes must be reverted first in #6039 so we can safely update the column type here. The column is not yet in use and has no data.

Will get tests passing once the revert is in.

@snigdhas snigdhas force-pushed the snigdha/fix-column-type-for-group-release branch from 8c0979e to 9ca11b6 Compare June 18, 2024 21:01
Copy link

github-actions bot commented Jun 18, 2024

This PR has a migration; here is the generated SQL

-- start migrations

-- forward migration group_attributes : 0004_fix_group_first_release_id_type
Local op: ALTER TABLE group_attributes_local MODIFY COLUMN group_first_release_id Nullable(UInt64);
Distributed op: ALTER TABLE group_attributes_dist MODIFY COLUMN group_first_release_id Nullable(UInt64);
-- end forward migration group_attributes : 0004_fix_group_first_release_id_type




-- backward migration group_attributes : 0004_fix_group_first_release_id_type
Distributed op: ALTER TABLE group_attributes_dist MODIFY COLUMN group_first_release_id Nullable(UUID);
Local op: ALTER TABLE group_attributes_local MODIFY COLUMN group_first_release_id Nullable(UUID);
-- end backward migration group_attributes : 0004_fix_group_first_release_id_type

Copy link

codecov bot commented Jun 18, 2024

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 1192 tests with 1 failed, 1189 passed and 2 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
pytest

Test name:
tests.migrations.test_runner::test_no_schema_differences

Envs:
- default
Traceback (most recent call last):
File ".../tests/migrations/test_runner.py", line 455, in test_no_schema_differences
assert (
AssertionError: Schema mismatch: group_attributes_local does not match schema
assert ["Column 'group_first_release_id' type differs between local ClickHouse and "\n 'schema! (expected: UInt(64)[MigrationModifiers(nullable=True, '\n 'low_cardinality=False, default=None, materialized=None, codecs=None, '\n "ttl=None)], is: FlattenedColumn(None, 'group_first_release_id', "\n 'UUID()[SchemaModifiers(nullable=True, readonly=False)]))'] == []
Left contains one more item: "Column 'group_first_release_id' type differs between local ClickHouse and schema! (expected: UInt(64)[MigrationModifi...l=None)], is: FlattenedColumn(None, 'group_first_release_id', UUID()[SchemaModifiers(nullable=True, readonly=False)]))"
Full diff:
[
- ,
+ "Column 'group_first_release_id' type differs between local ClickHouse and "
+ 'schema! (expected: UInt(64)[MigrationModifiers(nullable=True, '
+ 'low_cardinality=False, default=None, materialized=None, codecs=None, '
+ "ttl=None)], is: FlattenedColumn(None, 'group_first_release_id', "
+ 'UUID()[SchemaModifiers(nullable=True, readonly=False)]))',
]

@snigdhas snigdhas marked this pull request as ready for review June 19, 2024 00:26
@snigdhas snigdhas requested a review from a team as a code owner June 19, 2024 00:26
@snigdhas snigdhas requested a review from a team June 19, 2024 00:26
@evanh
Copy link
Member

evanh commented Jun 20, 2024

I think the test is failing because the other PR needs to be merged first. Try running it again after the other PR is merged.

@snigdhas snigdhas merged commit 270e64b into master Jun 20, 2024
28 checks passed
@snigdhas snigdhas deleted the snigdha/fix-column-type-for-group-release branch June 20, 2024 18:52
@getsentry-bot
Copy link
Contributor

PR reverted: 0618522

getsentry-bot added a commit that referenced this pull request Jun 20, 2024
…t_release_id` to bigint (#6040)"

This reverts commit 270e64b.

Co-authored-by: snigdhas <16563948+snigdhas@users.noreply.github.com>
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.

3 participants