Skip to content

Conversation

@WilliamDee
Copy link
Contributor

@WilliamDee WilliamDee commented Nov 3, 2025

Problem

Currently, metrics can be created by measures from proxy through the create_metric:true flag. It was flagged that the config.meta was not being propagated correctly to that metric even though when config.meta is listed in the semantic model all downstream elements gets that and in this case if the metric is a proxy to the measure, we should also get that value. Similarly, the expr should take from measure.expr first before using the measure.name, otherwise it is incorrect logic.

Note that metric.expr doesn't get used for measure proxy metrics currently so it won't change any behaviour atm, but will start to get used when measures gets removed in the coming quarter.

Solution

Update the parser to pass the config.meta field during when handling create_metric=True

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

@WilliamDee WilliamDee requested a review from a team as a code owner November 3, 2025 05:57
@cla-bot cla-bot bot added the cla:yes label Nov 3, 2025
@WilliamDee WilliamDee changed the title Properly propogate config for metric when created from measure Properly propagate config for metric when created from measure Nov 3, 2025
@github-actions github-actions bot added the community This PR is from a community member label Nov 3, 2025
@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.89%. Comparing base (65a122b) to head (df292db).
⚠️ Report is 6 commits behind head on main.

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12135      +/-   ##
==========================================
- Coverage   91.95%   91.89%   -0.06%     
==========================================
  Files         203      203              
  Lines       24846    24849       +3     
==========================================
- Hits        22846    22835      -11     
- Misses       2000     2014      +14     
Flag Coverage Δ
integration 88.76% <100.00%> (-0.14%) ⬇️
unit 65.15% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 65.15% <0.00%> (-0.01%) ⬇️
Integration Tests 88.76% <100.00%> (-0.14%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@WilliamDee WilliamDee force-pushed the will/fix-create-metric-propagation branch from a312f54 to df292db Compare November 3, 2025 19:27
Copy link
Contributor

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@QMalcolm QMalcolm merged commit b9e5c14 into main Nov 6, 2025
56 of 58 checks passed
@QMalcolm QMalcolm deleted the will/fix-create-metric-propagation branch November 6, 2025 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes community This PR is from a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants