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(errors): Add YAML definitions for new features columns #6724

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cmanallen
Copy link
Member

@cmanallen cmanallen commented Jan 8, 2025

Adds YAML definitions for the new features columns and index. These columns will allow us to search for errors by feature flag.

TODO:

  • Needs killswitch definition for: events_features_hash_map_enabled. Where is this defined?

DACI: https://www.notion.so/sentry/DACI-Search-for-Errors-by-Feature-Flag-1288b10e4b5d8014976dcbfbf335bc37?pvs=4#1288b10e4b5d805eb476d313eecae009
Depends on: #6723
Closes: https://github.com/getsentry/team-replay/issues/519

@cmanallen cmanallen marked this pull request as ready for review January 8, 2025 16:41
@cmanallen cmanallen requested review from a team as code owners January 8, 2025 16:41
Copy link

codecov bot commented Jan 8, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
304 1 303 1
View the top 1 failed tests by shortest run time
tests.test_replacer.TestReplacer::test_delete_tag_promoted_insert
Stack Traces | 0.311s run time
Traceback (most recent call last):
  File ".../snuba/clickhouse/native.py", line 200, in execute
    result_data = query_execute()
                  ^^^^^^^^^^^^^^^
  File ".../snuba/clickhouse/native.py", line 183, in query_execute
    return conn.execute(  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../local/lib/python3.11.............../site-packages/clickhouse_driver/client.py", line 373, in execute
    rv = self.process_ordinary_query(
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../local/lib/python3.11.............../site-packages/clickhouse_driver/client.py", line 571, in process_ordinary_query
    return self.receive_result(with_column_types=with_column_types,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../local/lib/python3.11.../sentry_sdk/integrations/clickhouse_driver.py", line 112, in _inner_end
    res = f(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^
  File ".../local/lib/python3.11.............../site-packages/clickhouse_driver/client.py", line 204, in receive_result
    return result.get_result()
           ^^^^^^^^^^^^^^^^^^^
  File ".../local/lib/python3.11.../site-packages/clickhouse_driver/result.py", line 50, in get_result
    for packet in self.packet_generator:
  File ".../local/lib/python3.11.............../site-packages/clickhouse_driver/client.py", line 220, in packet_generator
    packet = self.receive_packet()
             ^^^^^^^^^^^^^^^^^^^^^
  File ".../local/lib/python3.11.............../site-packages/clickhouse_driver/client.py", line 237, in receive_packet
    raise packet.exception
clickhouse_driver.errors.ServerException: Code: 16.
DB::Exception: No such column features.key in table default.errors_local (342c278c-4d03-472b-80d5-e2b55098bdf9). Stack trace:

0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000c61ff37 in ............................................................................../usr/bin/clickhouse
1. DB::Exception::Exception<String const&, String>(int, FormatStringHelperImpl<std::type_identity<String const&>::type, std::type_identity<String>::type>, String const&, String&&) @ 0x0000000007b85e67 in ............................................................................../usr/bin/clickhouse
2. DB::InterpreterInsertQuery::getSampleBlock(std::vector<String, std::allocator<String>> const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&) const @ 0x0000000011e9be54 in ............................................................................../usr/bin/clickhouse
3. DB::InterpreterInsertQuery::getSampleBlock(DB::ASTInsertQuery const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&) const @ 0x0000000011e9b4bd in ............................................................................../usr/bin/clickhouse
4. DB::InterpreterInsertQuery::execute() @ 0x0000000011e9e6bf in ............................................................................../usr/bin/clickhouse
5. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000122bfe15 in ............................................................................../usr/bin/clickhouse
6. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) @ 0x00000000122bb5b5 in ............................................................................../usr/bin/clickhouse
7. DB::TCPHandler::runImpl() @ 0x0000000013137519 in ............................................................................../usr/bin/clickhouse
8. DB::TCPHandler::run() @ 0x00000000131498f9 in ............................................................................../usr/bin/clickhouse
9. Poco::Net::TCPServerConnection::start() @ 0x0000000015b42834 in ............................................................................../usr/bin/clickhouse
10. Poco::Net::TCPServerDispatcher::run() @ 0x0000000015b43a31 in ............................................................................../usr/bin/clickhouse
11. Poco::PooledThread::run() @ 0x0000000015c7a667 in ............................................................................../usr/bin/clickhouse
12. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000015c7893c in ............................................................................../usr/bin/clickhouse
13. ? @ 0x00007f9a0cb71609 in ?
14. ? @ 0x00007f9a0ca96353 in ?


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File ".../snuba/tests/test_replacer.py", line 155, in test_delete_tag_promoted_insert
    self.replacer.flush_batch([processed])
  File ".../snuba/snuba/replacer.py", line 468, in flush_batch
    count = query_executor.execute(replacement, count)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../snuba/snuba/replacer.py", line 187, in execute
    self.__runner(self.__connection, query, records_count, self.__metrics)
  File ".../snuba/snuba/replacer.py", line 359, in run_query
    connection.execute_robust(query)
  File ".../snuba/clickhouse/native.py", line 370, in execute_robust
    raise e
  File ".../snuba/clickhouse/native.py", line 321, in execute_robust
    return self.execute(
           ^^^^^^^^^^^^^
  File ".../snuba/clickhouse/native.py", line 285, in execute
    raise ClickhouseError(e.message, code=e.code) from e
snuba.clickhouse.errors.ClickhouseError: DB::Exception: No such column features.key in table default.errors_local (342c278c-4d03-472b-80d5-e2b55098bdf9). Stack trace:

0. DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000c61ff37 in ............................................................................../usr/bin/clickhouse
1. DB::Exception::Exception<String const&, String>(int, FormatStringHelperImpl<std::type_identity<String const&>::type, std::type_identity<String>::type>, String const&, String&&) @ 0x0000000007b85e67 in ............................................................................../usr/bin/clickhouse
2. DB::InterpreterInsertQuery::getSampleBlock(std::vector<String, std::allocator<String>> const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&) const @ 0x0000000011e9be54 in ............................................................................../usr/bin/clickhouse
3. DB::InterpreterInsertQuery::getSampleBlock(DB::ASTInsertQuery const&, std::shared_ptr<DB::IStorage> const&, std::shared_ptr<DB::StorageInMemoryMetadata const> const&) const @ 0x0000000011e9b4bd in ............................................................................../usr/bin/clickhouse
4. DB::InterpreterInsertQuery::execute() @ 0x0000000011e9e6bf in ............................................................................../usr/bin/clickhouse
5. DB::executeQueryImpl(char const*, char const*, std::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum, DB::ReadBuffer*) @ 0x00000000122bfe15 in ............................................................................../usr/bin/clickhouse
6. DB::executeQuery(String const&, std::shared_ptr<DB::Context>, bool, DB::QueryProcessingStage::Enum) @ 0x00000000122bb5b5 in ............................................................................../usr/bin/clickhouse
7. DB::TCPHandler::runImpl() @ 0x0000000013137519 in ............................................................................../usr/bin/clickhouse
8. DB::TCPHandler::run() @ 0x00000000131498f9 in ............................................................................../usr/bin/clickhouse
9. Poco::Net::TCPServerConnection::start() @ 0x0000000015b42834 in ............................................................................../usr/bin/clickhouse
10. Poco::Net::TCPServerDispatcher::run() @ 0x0000000015b43a31 in ............................................................................../usr/bin/clickhouse
11. Poco::PooledThread::run() @ 0x0000000015c7a667 in ............................................................................../usr/bin/clickhouse
12. Poco::ThreadImpl::runnableEntry(void*) @ 0x0000000015c7893c in ............................................................................../usr/bin/clickhouse
13. ? @ 0x00007f9a0cb71609 in ?
14. ? @ 0x00007f9a0ca96353 in ?

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

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.

1 participant