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

chore(sourcemaps): Add sourcemapped subcolumn to errors #6772

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jangjodi
Copy link
Member

@jangjodi jangjodi commented Jan 15, 2025

Add sourcemapped subcolumn to exception_frames column in errors table
Model changes: #6773

Copy link

github-actions bot commented Jan 15, 2025

This PR has a migration; here is the generated SQL for ./snuba/migrations/groups.py ()

-- start migrations

-- forward migration events : 0025_add_sourcemapped_subcolumn_exception_frames
Local op: ALTER TABLE errors_local ADD COLUMN IF NOT EXISTS exception_frames.sourcemapped Array(Nullable(UInt8)) AFTER exception_frames.stack_level;
Distributed op: ALTER TABLE errors_dist ADD COLUMN IF NOT EXISTS exception_frames.sourcemapped Array(Nullable(UInt8)) AFTER exception_frames.stack_level;
-- end forward migration events : 0025_add_sourcemapped_subcolumn_exception_frames




-- backward migration events : 0025_add_sourcemapped_subcolumn_exception_frames
Distributed op: ALTER TABLE errors_dist DROP COLUMN IF EXISTS exception_frames.sourcemapped;
Local op: ALTER TABLE errors_local DROP COLUMN IF EXISTS exception_frames.sourcemapped;
-- end backward migration events : 0025_add_sourcemapped_subcolumn_exception_frames

@jangjodi jangjodi changed the title [WIP] chore(sourcemaps): Add sourcemap subcolumn to errors [WIP] chore(sourcemaps): Add sourcemapped subcolumn to errors Jan 15, 2025
Copy link
Member

@enochtangg enochtangg left a comment

Choose a reason for hiding this comment

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

We have a check that doesn't allow migrations and snuba application code changes to be coupled in one PR. You could need to make two separate PRs (first merging the migration, then the yaml changes).

@jangjodi
Copy link
Member Author

We have a check that doesn't allow migrations and snuba application code changes to be coupled in one PR. You could need to make two separate PRs (first merging the migration, then the yaml changes).

Thank you @enochtangg! I've separated out the yaml change into a separate PR

@jangjodi jangjodi marked this pull request as ready for review January 15, 2025 21:13
@jangjodi jangjodi requested a review from a team as a code owner January 15, 2025 21:13
@jangjodi jangjodi requested review from a team and enochtangg January 15, 2025 21:13
@jangjodi jangjodi changed the title [WIP] chore(sourcemaps): Add sourcemapped subcolumn to errors chore(sourcemaps): Add sourcemapped subcolumn to errors Jan 16, 2025
Copy link

codecov bot commented Jan 16, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
12 1 11 0
View the top 1 failed tests by shortest run time
tests.test_api.TestApi::test_count
Stack Traces | 31.2s run time
Traceback (most recent call last):
  File ".../snuba/tests/test_api.py", line 53, in setup_teardown
    self.generate_fizzbuzz_events()
  File ".../snuba/tests/test_api.py", line 154, in generate_fizzbuzz_events
    self.write_events(events)
  File ".../snuba/tests/test_api.py", line 76, in write_events
    write_processed_messages(self.storage, processed_messages)
  File ".../snuba/tests/helpers.py", line 29, in write_processed_messages
    ).write(rows)
      ^^^^^^^^^^^
  File ".../snuba/snuba/writer.py", line 31, in write
    return self.__writer.write(map(self.__encoder.encode, values))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../snuba/clickhouse/http.py", line 368, in write
    batch.join(timeout=batch_join_timeout)
  File ".../snuba/clickhouse/http.py", line 282, in join
    raise ClickhouseWriterError(message, code=code, row=row)
snuba.clickhouse.errors.ClickhouseWriterError: DB::Exception: Elements 'exception_frames.abs_path' and 'exception_frames.sourcemapped' of Nested data structure 'exception_frames' (Array columns) have different array sizes. (SIZES_OF_ARRAYS_DONT_MATCH) (version 23.8.11.29.altinitystable (altinity build))

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@jangjodi jangjodi marked this pull request as draft January 17, 2025 19:35
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