You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2024/01/09 22:09:00 UTC
[PR] chore: Technical Debt Metrics [superset]
rusackas opened a new pull request, #26442:
URL: https://github.com/apache/superset/pull/26442
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
This is a reboot of an antique branch/PR, for cleanliness. It does the following:
* Adds a new eslintrc file that's custom-built to track/warn on technical debt metrics
* Adds a custom eslint transformer that splits the eslint report into aggregated stats and individual offenses
* aggregated stats are added to one google sheet tab
* individual offenses are added to an eslint TODO tab in the same google sheet.
* adds an npm script to run this
* adds a github action to run the script on mergest to master
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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] chore: Technical Debt Metrics [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #26442:
URL: https://github.com/apache/superset/pull/26442#discussion_r1451578664
##########
superset-frontend/scripts/eslint-metrics-uploader.js:
##########
@@ -0,0 +1,126 @@
+const { google } = require('googleapis');
Review Comment:
Actually, no, I don't think you can without adding a typescript build/compilation step. I'm not sure if that's worth all the hassle here :/
--
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] chore: Technical Debt Metrics [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #26442:
URL: https://github.com/apache/superset/pull/26442
--
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] chore: Technical Debt Metrics [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #26442:
URL: https://github.com/apache/superset/pull/26442#discussion_r1451575741
##########
superset-frontend/package.json:
##########
@@ -53,6 +53,7 @@
"format": "npm run _prettier -- --write",
"lint": "npm run _lint && npm run type",
"lint-fix": "npm run _lint -- --fix && npm run type",
+ "lint-stats": "eslint -f ./scripts/eslint-metrics-uploader.js --no-eslintrc -c scripts/eslintrc_metrics.js --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx . ",
Review Comment:
I figure the flexibility to call multiple scripts from one Action would be the way to make this easier to scale and troubleshoot
--
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] chore: Technical Debt Metrics [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #26442:
URL: https://github.com/apache/superset/pull/26442#issuecomment-1883883320
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/26442?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Comparison is base [(`a23825c`)](https://app.codecov.io/gh/apache/superset/commit/a23825c23c8c0809c0acaa5f54ff7099b988eb32?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 69.16% compared to head [(`f881ff5`)](https://app.codecov.io/gh/apache/superset/pull/26442?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 58.94%.
> Report is 1 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #26442 +/- ##
===========================================
- Coverage 69.16% 58.94% -10.22%
===========================================
Files 1948 1948
Lines 76054 76054
Branches 8493 8493
===========================================
- Hits 52601 44833 -7768
- Misses 21273 29041 +7768
Partials 2180 2180
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/26442/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hive](https://app.codecov.io/gh/apache/superset/pull/26442/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/26442/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/26442/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/26442/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.63% <ø> (ø)` | |
| [python](https://app.codecov.io/gh/apache/superset/pull/26442/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `61.59% <ø> (-21.27%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/26442/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit](https://app.codecov.io/gh/apache/superset/pull/26442/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.86% <ø> (ø)` | |
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 Sentry](https://app.codecov.io/gh/apache/superset/pull/26442?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).
--
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] chore: Technical Debt Metrics [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #26442:
URL: https://github.com/apache/superset/pull/26442#discussion_r1447232147
##########
superset-frontend/scripts/eslintrc_metrics.js:
##########
@@ -0,0 +1,95 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * TODO (@rusackas)
Review Comment:
Nice!
##########
superset-frontend/package.json:
##########
@@ -53,6 +53,7 @@
"format": "npm run _prettier -- --write",
"lint": "npm run _lint && npm run type",
"lint-fix": "npm run _lint -- --fix && npm run type",
+ "lint-stats": "eslint -f ./scripts/eslint-metrics-uploader.js --no-eslintrc -c scripts/eslintrc_metrics.js --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx . ",
Review Comment:
I wonder if we should have multiple scripts here or just one call `tech-debt` that invokes all the others.
##########
superset-frontend/scripts/eslint-metrics-uploader.js:
##########
@@ -0,0 +1,126 @@
+const { google } = require('googleapis');
Review Comment:
Can scripts be Typescript files?
--
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] chore: Technical Debt Metrics [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #26442:
URL: https://github.com/apache/superset/pull/26442#discussion_r1451575971
##########
superset-frontend/scripts/eslint-metrics-uploader.js:
##########
@@ -0,0 +1,126 @@
+const { google } = require('googleapis');
Review Comment:
Yeahhhhhhh... it might be too hypocritical if not.
--
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] chore: Technical Debt Metrics [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #26442:
URL: https://github.com/apache/superset/pull/26442#issuecomment-1890605787
Accidentally deleted my TODO from the code... adding it here so I can maybe start a kanban board or something...
/**
* TODO (@rusackas)
* - SIP-61 content organization
* https://github.com/apache/superset/issues/13632
* - Component/Design system rules
* - Organization of folders in Storybook
* - All components have a description page
* - Props have controls
* - Components have figma links
* - Anything from frontent style guidelines
* https://github.com/apache/superset/wiki/Frontend-Style-Guidelines
* - Hex colors!
*/
--
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