You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "msyavuz (via GitHub)" <gi...@apache.org> on 2026/08/17 11:44:40 UTC

[PR] fix(datasets): keep metric certified_by when certification details are typed next [superset]

msyavuz opened a new pull request, #43255:
URL: https://github.com/apache/superset/pull/43255

   ### SUMMARY
   
   Certifying a metric in Edit dataset → Metrics saves the certification details but drops **Certified by**, so nobody can see who certified the metric.
   
   `Fieldset` rebuilds the whole record on every field edit — `onChange({ ...item, [fieldKey]: val })` — where `item` is the value captured when that render was on screen. `TextControl` commits through a `FAST_DEBOUNCE` (250 ms) debounce, so when two adjacent fields are filled in one visit to the expanded row, the second field's callback was built before the first field's value had been applied. It rebuilds the metric from that older snapshot and the first field is gone. Certification is the visible case because it is the only pair of adjacent text fields users fill back to back; the saved `extra` came out as `{"certification":{"details":"Metric cert details"}}`.
   
   Reading the item off a ref merges each edit into the latest committed record instead of a snapshot. `Fieldset` is shared, so the dataset column fieldsets get the same fix.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before / after, from the new test's `buildExtraJsonObject` output for the same keystrokes:
   
   ```
   - {"certification":{"details":"Metric cert details"}}
   + {"certification":{"certified_by":"Metric Certifier","details":"Metric cert details"}}
   ```
   
   ### TESTING INSTRUCTIONS
   
   1. Data → Datasets → Edit a dataset → Metrics tab → expand a metric.
   2. Type into **Certified by**, then into **Certification details**, then Save.
   3. Reopen the dataset and expand the same metric — both fields are still there.
   
   Automated: `npm run test -- DatasourceEditorMetricCertification`. The new test drives the real editor and fails on master.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue: No — reported through Preset support.
   - [ ] Required feature flags: None.
   - [x] Changes UI: Only in that edits stop being dropped; no visual change.
   - [ ] Includes DB Migration: No.
   - [ ] Introduces new feature or API: No.
   - [ ] Removes existing feature or API: No.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(datasets): keep metric certified_by when certification details are typed next [superset]

Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz merged PR #43255:
URL: https://github.com/apache/superset/pull/43255


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(datasets): keep metric certified_by when certification details are typed next [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43255:
URL: https://github.com/apache/superset/pull/43255#issuecomment-5315588822

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(datasets): keep metric certified_by when certification details are typed next [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #43255:
URL: https://github.com/apache/superset/pull/43255#issuecomment-5315733256

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/43255?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 66.66%. Comparing base ([`d114eb6`](https://app.codecov.io/gh/apache/superset/commit/d114eb638b7a10b5e3c7eea78a43ed0019639e7a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`ba30914`](https://app.codecov.io/gh/apache/superset/commit/ba30914c0aa4abd34231b1389667a9d1ddd3c7a4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #43255   +/-   ##
   =======================================
     Coverage   66.66%   66.66%           
   =======================================
     Files        2873     2873           
     Lines      163654   163657    +3     
     Branches    37771    37771           
   =======================================
   + Hits       109093   109095    +2     
   - Misses      52432    52433    +1     
     Partials     2129     2129           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/43255/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [javascript](https://app.codecov.io/gh/apache/superset/pull/43255/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.78% <100.00%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/43255?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org