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(DC): Bring EntityContainsColumnsValidator back to config entities #3540

Merged
merged 6 commits into from
Jan 9, 2023

Conversation

volokluev
Copy link
Member

Due to a bug in our testing, we have not been including the EntityContainsColumnsValidator in the entities built with config. Having a place where the built in validators are defined makes it easier to auto-convert entities as we can skip the default ones in the config.

Blast Radius

This will affect only config entities (metrics) and this is re-introducing a columns validator which is turned off. This is essentially a no-op.

@volokluev volokluev requested a review from a team as a code owner December 16, 2022 22:54
@codecov-commenter
Copy link

codecov-commenter commented Dec 16, 2022

Codecov Report

Base: 92.20% // Head: 92.17% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (cf538f0) compared to base (6327881).
Patch coverage: 89.47% of modified lines in pull request are covered.

❗ Current head cf538f0 differs from pull request most recent head a900abc. Consider uploading reports for the commit a900abc to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3540      +/-   ##
==========================================
- Coverage   92.20%   92.17%   -0.03%     
==========================================
  Files         723      720       -3     
  Lines       33832    33779      -53     
==========================================
- Hits        31195    31137      -58     
- Misses       2637     2642       +5     
Impacted Files Coverage Δ
snuba/datasets/entities/discover.py 100.00% <ø> (ø)
snuba/datasets/entities/events.py 100.00% <ø> (ø)
snuba/datasets/entities/functions.py 95.23% <ø> (ø)
snuba/datasets/entities/generic_metrics.py 97.87% <0.00%> (ø)
snuba/datasets/entities/metrics.py 100.00% <ø> (ø)
snuba/datasets/entities/outcomes.py 100.00% <ø> (ø)
snuba/datasets/entities/outcomes_raw.py 95.65% <ø> (ø)
snuba/datasets/entities/profiles.py 96.00% <ø> (ø)
snuba/datasets/entities/replays.py 100.00% <ø> (ø)
snuba/datasets/entities/sessions.py 98.83% <ø> (ø)
... and 9 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -61,24 +61,30 @@ def _config_matches_python_definition(
self, config_path: str, entity: Type[Entity], entity_key: EntityKey
) -> None:
config_entity = build_entity_from_config(config_path)
print(config_entity.get_validators())
Copy link
Contributor

Choose a reason for hiding this comment

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

EntityColumnSet(self.columns), ColumnValidationMode.DO_NOTHING
)
]
return []
Copy link
Contributor

Choose a reason for hiding this comment

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

@volokluev volokluev merged commit d5d00ef into master Jan 9, 2023
@volokluev volokluev deleted the volo/fix_required_columns branch January 9, 2023 19:42
volokluev added a commit that referenced this pull request Jan 9, 2023
volokluev added a commit that referenced this pull request Jan 9, 2023
volokluev added a commit that referenced this pull request Jan 9, 2023
…#3579)

A repeat of #3540 but fixing two bad lines of code which should not have been merged

Due to a bug in our testing, we have not been including the EntityContainsColumnsValidator in the entities built with config. Having a place where the built in validators are defined makes it easier to auto-convert entities as we can skip the default ones in the config. 

### Blast Radius

This will affect only config entities (metrics) and this is re-introducing a columns validator which is turned off. This is essentially a no-op.
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.

3 participants