Skip to content

Commit

Permalink
Don't allow LinkableMetrics for case when entity reference is in enti…
Browse files Browse the repository at this point in the history
…ty links (#1200)

### Description
Some users have run into a scenario where the entity reference can be
found in the entity links for some `LinkableEntities`. I haven't yet
been able to reproduce that error with our test configs. Releasing
metrics as dimensions is blocked on this edge case, so I'm skipping that
scenario here to ensure that customers won't run into it until when
using `LinkableMetrics` until we can debug further. This will allow us
to release the feature and handle this case in a follow up version.
  • Loading branch information
courtneyholcomb authored May 11, 2024
1 parent 16c4504 commit ad64e01
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ def __init__(
)
for linkable_entities in linkable_element_set_for_metric.path_key_to_linkable_entities.values():
for linkable_entity in linkable_entities:
# TODO: some users encounter a situation in which the entity reference is in the entity links. Debug why.
if linkable_entity.reference in linkable_entity.entity_links:
logger.info(f"Found entity reference in entity links for linkable entity: {linkable_entity}")
continue
metric_subquery_join_path_element = MetricSubqueryJoinPathElement(
metric_reference=metric_reference,
derived_from_semantic_models=defined_from_semantic_models,
Expand Down

0 comments on commit ad64e01

Please sign in to comment.