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(devexp): Add required_time_column to storage #5889

Merged
merged 4 commits into from
May 10, 2024

Conversation

volokluev
Copy link
Member

In order to allow storage queries to be validated based on timestamp, we need to know what their timestamp is. Entities already have this so we add this optional field to storages as well.

@volokluev volokluev requested a review from a team as a code owner May 10, 2024 17:15
Copy link

codecov bot commented May 10, 2024

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

❌ Failed Test Results:

Completed 2130 tests with 1 failed, 2127 passed and 2 skipped.

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

Test name:
tests.query.snql.test_storage_query::test_parse_storage_query[basic_storage_query]

Envs:
- default
Traceback (most recent call last):
File ".../query/snql/parser.py", line 1554, in parse_snql_query
_post_process(query, [_replace_time_condition], settings)
File ".../query/snql/parser.py", line 1490, in _post_process
func(query)
File ".../query/snql/parser.py", line 1323, in _replace_time_condition
new_top_level = _align_max_days_date_align(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../query/snql/parser.py", line 1355, in _align_max_days_date_align
data_source = get_storage(key)
^^^^^^^^^^^^^^^^
File ".../datasets/storages/factory.py", line 76, in get_storage
storage = _storage_factory().get(storage_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../datasets/storages/factory.py", line 34, in get
return self._all_storages[storage_key]
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: StorageKey.METRIC_SUMMARIES

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File ".../query/snql/test_storage_query.py", line 185, in test_parse_storage_query
query = parse_snql_query(query_body, events)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../query/snql/parser.py", line 1565, in parse_snql_query
raise PostProcessingError(query)
snuba.query.parser.exceptions.PostProcessingError: None

@volokluev volokluev merged commit e326a1d into master May 10, 2024
30 checks passed
@volokluev volokluev deleted the volo/devexp/required_time_storage branch May 10, 2024 19:03
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.

2 participants